nikolaischunk/discord-phishing-links

Maintaining a plain-text variant of the lists

Closed this issue · 6 comments

Hi, I run a Discord bot that I have routed through a Pihole installation. That is, the bot runs a DNS query whenever a link shows up in a Discord message, and if it fails to resolve (aka Pihole blocks it), then the bot deletes the message.

Problem is, Pihole and perhaps a few other platforms use plain text lists. Just one domain name per line, no formatting, no markup.

This list would be super useful to me and surely a lot of other Pihole users, but in its current state we cannot use it without cloning the list and making our own local scripts to edit it into plain text, and then re-host it somewhere where Pihole can find it. Has any consideration gone to maintaining both the original JSON and also a plaintext variant within the repo, presumably using some kind of script to keep both lists in sync at the same time?

Edit: Should clarify, I am aware plain text sources are available in the readme but running on the assumption that they may change over time, I think having your list as a collection of those sources, still available in plain text, would be a nice touch. That said if your objective is purely to JSON-ify it, that's understandable and I'll stick to sources only.

Hey @RedPanda4552 thankyou so much for your Idea.
Generally spoken, I support the Idea of a synced Plain Text List, but I don't have the time to keep it updated and sync with the List. If you or someone else has a Idea on how we could implement a automation to do this for us, you're very welcome to share it, atm i cannot think of a efficient and working solution!

No worries then, I can keep using the sources that you feed off of for my own use case. I don't really have any brilliant ideas on how to maintain it myself, so I'll let this one go for now. Take care!

I reopen the idea, its a good one and perhaps somebody that knows how to do that will see that issue ;)

Keeping two files constantly updated seems hard to me, but you could implement this on your end: get the array of URLs from the JSON, stringify it, remove all the quotes, replace all the commas with line breakes (\n), and you technically have the right string that you can write to a .txt file.
It's just an idea but it might work!

We can use GitHub actions to achieve this. I'll push a PR later.