TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: I've Built a DHT Torrent Sniffer and Search Engine. Should I Release?

165 pointsby sylwesterover 2 years ago
Recently I was researching about DHTs and developed a DHT Sniffer in Go which connects to some known DHT Routers and sniffs all the annoucements. I&#x27;ve quickly added ZincSearch and it is now basically a search engine which can search for hashes, name or files contained in the torrents. It is able to index around 5-10k annoucements per second, so the index grows quite fast.<p>Now, I am thinking about releasing it as open-source for others to study, but not sure if I should, because it might be used for &quot;evil&quot;.

31 comments

boramalperover 2 years ago
I had been working on this successfully for a couple years in the past before I got tired of it and moved on. I still think it&#x27;s a magnificent idea, to be able to host your own torrent site and to decentralise the last centralised bit of BitTorrent.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;boramalper&#x2F;magnetico" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;boramalper&#x2F;magnetico</a>
评论 #33308456 未加载
评论 #33309394 未加载
评论 #33307620 未加载
mutantover 2 years ago
<a href="https:&#x2F;&#x2F;github.com&#x2F;boramalper&#x2F;magnetico" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;boramalper&#x2F;magnetico</a><p>Someone else did this a while back, universe continues to exist.
brobinsonover 2 years ago
Let it rip. DHT has been around for so long now that whatever bad actors&#x2F;evil use cases you&#x27;re imagining have already happened. It sounds like a cool project, and I&#x27;d be interested to see it.
评论 #33306388 未加载
majestic5762over 2 years ago
I wrote a similar solution 8 years ago. I repurposed the system to identify IPs owned by the government, and notified them if a malicious copy of Windows (but not limited to) was seeded by them. Meaning there was a chance that an unknown actor had a backdoor in my government&#x27;s network. If you wanna discuss, I&#x27;m happy to talk and even contribute towards a commercial solution majestic.hn@fastmail.com. I didn&#x27;t pursue this opportunity for money at that time, but I had my fair share of &quot;shoutz&quot;. Won&#x27;t be bad to pick this up again
tmtvlover 2 years ago
Just AGPL it, I hear it&#x27;s an effective ward against Alphabet.
评论 #33306460 未加载
retonatoover 2 years ago
I have been operating a BitTorrent search engine for a few years (it is closed now), here is some advice if you want to launch it as a public website:<p>1. There is no absence of people opening the kind of torrent indexers, which you have in mind. In 2010s there were 5-10 such sites launched each year, even nowadays there are at least a few new indexers yearly. Almost all are closed within a year or two (at most). There are reasons for that, some are less obvious than others.<p>2. Most likely you will close your site after some time as well, here is why:<p>2.1. It will be difficult to find a hosting, which will tolerate it. Forget about Linode or Digital Ocean or any similar hosting providers - they will suspend your server (first) and account (later) after receiving a few automated DCMA emails. You can use some &quot;second-tier&quot; providers for some time, but eventually even they will get tired of you, you will be out the moment they receive the first paper letter from some law company, which represents some movie company or alike. You can use proxy servers or some other arrangement for some time, but eventually you will decide that it isn&#x27;t worth the effort.<p>2.2. The same thing is true for domain provider. Yes, there are a few, which are more resilient, than others, but don&#x27;t expect that they will protect you and your domain indefinitely for $15 per year. If your site is popular enough - the only option may remain to register a new domain every few months and hop between them. Eventually you will get tired of that. It may take half a year or a few years, but you will.<p>2.3. There are no money in torrenting nowadays. Forget about ads or donations - even thepiratebay cannot earn money that way, you will not be able to do that either.<p>2.4. Sadly, torrents are not that popular nowadays as they were 5-10-15 years ago. Some people still use them, but in most developed countries that&#x27;s more like an exception, than the rule. The rule is netflix, spotify and alike. As a result, if you imagine large and happy community of users around your site - just don&#x27;t, most likely there won&#x27;t be any.<p>2.5. Don&#x27;t expect just to launch a site and rest. You will spend at least 5-10-20 hours per week on its maintenance (fixing bugs, importing&#x2F;cleaning data, adding new features, etc). It will feel fine at first, but more and more tiring as the months and years go by. Eventually you will get bored and stop any maintenance. Users don&#x27;t like old&#x2F;unmaintained sites, so they will be less and less interested in it. Eventually you will decide, that it isn&#x27;t worth the effort to run it at all.
评论 #33309949 未加载
sascha_slover 2 years ago
I mean, it already exists. [1] Always fun to see what my neighbors behind the same NAT download.<p>[1]: <a href="https:&#x2F;&#x2F;iknowwhatyoudownload.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;iknowwhatyoudownload.com&#x2F;</a>
评论 #33307661 未加载
评论 #33318044 未加载
评论 #33309388 未加载
评论 #33308623 未加载
评论 #33306792 未加载
the8472over 2 years ago
Having seen other indexers before I suspect your implementation isn&#x27;t spec-compliant or well-behaved (perhaps spoofing node-IDs? causing more traffic than necessary?)<p>If you want to build an indexer you should write a normal implementation and then use <a href="http:&#x2F;&#x2F;bittorrent.org&#x2F;beps&#x2F;bep_0051.html" rel="nofollow">http:&#x2F;&#x2F;bittorrent.org&#x2F;beps&#x2F;bep_0051.html</a>
评论 #33309037 未加载
r3trohack3rover 2 years ago
You should absolutely open source this. Working with the DHT is a lot of fun, and a great learning exercise.<p>I adapted my local “torrent roulette” application to an electron app that can be shared. My local version downloads the files, but the one I share only fetches the torrents metadata (easy to adapt it back to my roulette approach). I call it Taboo: <a href="https:&#x2F;&#x2F;github.com&#x2F;retrohacker&#x2F;taboo" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;retrohacker&#x2F;taboo</a><p>The amount of “evil” on the DHT is pretty low. I’ve run mine for a long time, and very rarely get anything evil. I suspect it’s because of how poorly BitTorrent plays with privacy tools like VPN and Tor, IIUC it’s easy to leak identifying information with BT and its high bandwidth.<p>Nearly every “evil” file I’ve found is either: a honeypot with not-evil content or password encrypted (maybe to remove the plausible deniability of a random download?). I don’t know if the encrypted files actually contain evil content, I don’t bother trying to crack them and promptly gshred them.<p>What you will find:<p>* a lot of content illegal under US copyright law<p>* a lot of porn (also illegal under US copyright law)<p>* a metric tonne of fascinating content from other cultures you’d otherwise not be exposed to (also probably illegal under US copyright law)<p>There is very little “legal” content on the DHT, but most of it is falling on the wrong side of intellectual property law. Sometimes password&#x2F;credit card dumps. I once found some very sketchy schematics of Eastern European military equipment. But that stuff is also really rare in my experience.<p>If you do play with these systems, I’ll leave the same warning I left on the Taboo repo:<p>&gt; Note: I AM NOT A LAWYER! To my knowledge, there aren&#x27;t any other systems doing this that you can run on your laptop. I suspect the nuance of how Taboo works isn&#x27;t going to be appreciated by your local law enforcement. If you don&#x27;t want to test the legality of Taboo in court, I&#x27;d strongly recommend either: running a VPN (less safe) or not using Taboo (most safe). If you want to use Taboo with a VPN, may I suggest putting some money in an envelope and sending it to Mullvad?<p>Adding this on after reading your comments elsewhere in the threads:<p>If you&#x27;re worried about Intellectual Property enforcers using this for evil, I wouldn&#x27;t worry too much about it. BTDigg already exists. Not that what you&#x27;re doing isn&#x27;t novel or exciting (great work on this BTW) - but DHT indexing is an art thats already being practiced. Cat is out of the bag.
评论 #33308494 未加载
评论 #33309011 未加载
0dayzover 2 years ago
I would recommend writing down the worst and best case scenarios that could happen with your software, then determine if you notice either that through severity or quantity the software outweighs the positives, don&#x27;t release it.
jrm4over 2 years ago
<i>Please</i> do. This old-ish timer is kind of blown away by the idea that you shouldn&#x27;t.<p>Nothing evil about being a modern archivist&#x2F;librarian, despite what big companies would tell you.
pdimitarover 2 years ago
I imagine any bad actors who store IPs of torrent seeders have done so a long time ago already so your software will not do any harm that hasn&#x27;t been done already.<p>Go for it and open-source it.
hardwaresoftonover 2 years ago
Would you mind explainng why you chose ZincSearch? Curious on why you picked it over some of the other non-ElasticSearch&#x2F;OpenSearch alternatives (Meilisearch, Typesense)
BLKNSLVRover 2 years ago
I&#x27;ll add to the chorus of people saying &quot;yes, release it&quot;.<p>If you&#x27;re worried about blowback as a result of &quot;evil&quot; uses &#x2F; users, is there a way to release it (somewhat) anonymously, so it&#x27;s difficult to be traced back to you?
qualudeheartover 2 years ago
Which evil usages are you concerned about? I think it would be very useful for the public.
评论 #33306338 未加载
icpmolesover 2 years ago
Is it basically btdig.com ?
评论 #33306608 未加载
评论 #33306507 未加载
keroroover 2 years ago
torrent-paradise [0] is a go project which seems to do the same as your project and has existed since 2019. It’s since gone down but remains up on IPFS [1] but its index hasn’t updated since January.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;urbanguacamole&#x2F;torrent-paradise" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;urbanguacamole&#x2F;torrent-paradise</a><p>[1] <a href="https:&#x2F;&#x2F;cloudflare-ipfs.com&#x2F;ipfs&#x2F;QmQjsKamNFZRvCMXDvZXQmRYjsmSkmZG5pBCTY4LtMj8hs&#x2F;about.html" rel="nofollow">https:&#x2F;&#x2F;cloudflare-ipfs.com&#x2F;ipfs&#x2F;QmQjsKamNFZRvCMXDvZXQmRYjsm...</a>
评论 #33309031 未加载
compressedgasover 2 years ago
Consider that such already is available as open source in Go even.
joeman1000over 2 years ago
Please release it. We are in dire need of good torrent search without ad-trackers or other nasty stuff.
navjack27over 2 years ago
That would be very useful... Just release the code and building instructions.
arthurcolleover 2 years ago
Magnetissimo did this too, and he&#x27;s still around.
bArrayover 2 years ago
At the very least, please do a write-up for us on how you&#x27;re achieving 5-10k announcements a second.
gwnywgover 2 years ago
I was planning to start learning GO, I&#x27;d be definitely interested to learn from your project :)
gloosxover 2 years ago
You should def release it, what else can you do with it? Just let it rot and fade away?
2Gkashmiriover 2 years ago
yes please. you are not responsible for any &quot;Evil&quot; users of the software might do. This is not even about enabling bad stuff, this is just natural progression of technology.
评论 #33305828 未加载
hombre_fatalover 2 years ago
This is a good example of our hubris as developers. We like to think our project will have some impact on the world when in reality you’re extremely lucky if anybody notices much less cares. ;)
thinkmcflyover 2 years ago
I think you should. From my understanding, use of DHT is already dead in the eyes of most torrenters
acehwover 2 years ago
it&#x27;s a tool. What people use it for is their business.
yieldcrvover 2 years ago
yeah release it
ehPRethover 2 years ago
please do!
dontbenebbyover 2 years ago
&gt;Now, I am thinking about releasing it as open-source for others to study, but not sure if I should, because it might be used for &quot;evil&quot;.<p>For evil? I wouldn&#x27;t worry about <i>that</i>. Not now.<p>You should put prominent warnings it&#x27;s not &quot;consumer grade&quot; or whatever, but I think there&#x27;s more value in sharing your code than there is risk someone will perform an attack they otherwise couldn&#x27;t. Conversely, the second amendment wasn&#x27;t just meant to apply to guns -- in America, &quot;arms&quot; can absolutely mean &quot;cyber&quot;.<p>Now, to be fair... the NRA is basically a way for boomers old enough to get &quot;reoccurring income&quot; to write off donations to the GRU on their taxes at this point, but there was a time in this country[0] when they used to give people who had a re-occurring subscription were sent a video called &quot;Stop! Don&#x27;t touch!!&quot; (or something to that effect), which was meant to be their first lesson on guns -- and make no mistake, when you &quot;cyber&quot;, you&#x27;re reaching into the toolbox.<p>There was a period in the 2000s where it was EXTREMELY difficult to get some of these tools up and running, and then, in parallel, you could also experience hardware or driver issues, and people quite rightfully used to scare the everloving shit out of the type of person who would bring esoteric knowledge to light too quickly.<p>Even if you knew exactly which commands to run, in which order, you had to deal with stuff like the fact the drivers for Airport literally won&#x27;t go into monitor mode, which is when you tell the radio in your laptop to store not just the packets addressed to it, but any packets that happen to... drift on by.<p>I really cannot emphasize enough how hilarious it was to me that it took until about twenty goddamn twenty[-1] for some folks to realize the main benefit to &quot;cyber&quot; is that it&#x27;s remote -- since I was about twelve years old, I&#x27;ve run into people who do... very rude things with the computer, paired with wielding the fact that in the united states, possession of what is now being called &quot;CSAM&quot; was what&#x27;s called a &quot;strict liability&quot; offense -- pair that with gatekeeping access to the title &quot;security researcher&quot; and it led to a <i>very</i> uneven playing field.<p>(They&#x27;d also do things like say oh, gee, you can&#x27;t get a security clearance if you engage in software piracy, while also telling folks it&#x27;s probably better to just torrent stuff than use some shady torrent site... and mentioning they have a security clearance in another thread or whatever.)<p>Now, if this program was, say, a script that spiders through a hard drive using the Luhn algorithm[1] to suss out if the drive contains PII or automates bringing down one&#x27;s wireless interface, changing the MAC address, then bringing it back up... that might be something you might not want to give to your enemies by putting onto Github or whatever.<p>Myself, I usually still stick to the Pirate Bay -- I&#x27;ve still got a backlog of stuff I haven&#x27;t watched... it feels like just a short time ago I was getting all emo I had no one to watch &quot;Cats&quot;[2] with, ha-HA!!<p>But this? I think you&#x27;re good to go, and I thank you for taking the time to learn the version control system and share your code.<p>If anything, you&#x27;ll be aiding public health. Streaming services are abusive... I own very few movies since I&#x27;ve moved around so much -- it became a running gag with my exes -- but it&#x27;s like back when cable briefly wasn&#x27;t going to have commercials, then within pretty much one generation they added them right back in addition to collecting the subscription money[3]... those sorts of people should be shown that video from the 80s of the one KGB defector explaining that America is unique, and there is nowhere else to defect to.<p>(He was right, and if you abuse your access folks might be unwelcoming.)<p>-- [-1] I purposefully waited about two years to make <i>that</i> joke... at least two times.<p>[0] (I&#x27;m posting from my home)<p>[1] I was told it&#x27;s used to verify something is a CC # but apparently it can get some false positives -- that wasn&#x27;t mentioned last time I looked it up, hehe: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Luhn_algorithm" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Luhn_algorithm</a><p>[2] Did you people forget that they called it Redphone because it was supposed to REDUCE tensions?<p>[3] <a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20150501092025&#x2F;nytimes.com&#x2F;1981&#x2F;07&#x2F;26&#x2F;arts&#x2F;will-cable-tv-be-invaded-by-commercials.html" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20150501092025&#x2F;nytimes.com&#x2F;1981&#x2F;...</a>