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.

HardCIDR will query ARIN and a pool of BGP route servers

85 pointsby crystalPalaceabout 8 years ago

10 comments

natchabout 8 years ago
Beware, this script will hose &#x2F; clobber and then silently clean up (delete) a ton of various different files if files with those names happen to already exist. To see the exact file names you&#x27;ll have to carefully pick through the script. So obviously? run it in its own directory, which is no guarantee of safety, but should be safer.<p>If you have a subdirectory where you run it named after your email hostname (such as &quot;example&#x2F;&quot; for &quot;example.com&quot;), then it will prompt you to &quot;overwrite the contents of the directory&quot; and then, if you accept, it will not only overwrite the contents, it will remove the entire contents with:<p><pre><code> cd $outdir rm * 2&gt;&#x2F;dev&#x2F;null </code></pre> There&#x27;s a slight violation of user expectations here. Removing and replacing the contents isn&#x27;t quite the same as overwriting the contents. It may be a fine line, but it&#x27;s better to err on the side of protecting the user&#x27;s files, not deleting them, when deciding where to come down on that fine line.<p>And if $outdir is empty or not there, it tries to detect that by first doing a check for -d $outdir, but this won&#x27;t save the user if $outdir gets moved aside by another process while they are reading the prompt and before the cd happens, leaving them in another directory. Hopefully the user has rm aliased to rm -i but that still won&#x27;t help since the rm is being run in its own shell in the script.<p>I know we&#x27;re not supposed to focus on the negative here on HN. I&#x27;m sure the script is awesome for whatever it does. Just be careful out there!
评论 #13900387 未加载
评论 #13901536 未加载
评论 #13900328 未加载
jauerabout 8 years ago
OK, but what does it <i>do</i>? The README is pretty sparse. Some examples would really help.<p>Edit: the header from the script is good, toss it into the README for great success.
评论 #13899965 未加载
评论 #13899838 未加载
mixologicabout 8 years ago
This might give it some more context: <a href="https:&#x2F;&#x2F;www.trustedsec.com&#x2F;march-2017&#x2F;classy-inter-domain-routing-enumeration&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.trustedsec.com&#x2F;march-2017&#x2F;classy-inter-domain-ro...</a>
评论 #13899889 未加载
javajoshabout 8 years ago
Note that this script installs &quot;ipcalc&quot; (or really, whatever is in <a href="http:&#x2F;&#x2F;jodies.de&#x2F;ipcalc-archive&#x2F;ipcalc-0.41.tar.gz" rel="nofollow">http:&#x2F;&#x2F;jodies.de&#x2F;ipcalc-archive&#x2F;ipcalc-0.41.tar.gz</a>) without user interaction.<p>I&#x27;m generally pretty <i>not okay</i> with scripts that curl | tar things (or apt-get install things, which this does if it&#x27;s run on a linux) from the interwebs without my explicit consent.
评论 #13900085 未加载
packetizedabout 8 years ago
Oh, this is superfly. Easy way to build your own up-to-date ASN DB, similar to the one from Maxmind. Think: embellishing Apache&#x2F;Nginx logs with up-to-date information about the IP address of the client, including ASN&#x2F;OrgId. Useful for identifying snowshoers spreading their footprint across a lot of discontiguous IP addresses in one ASN&#x2F;Org.
评论 #13900013 未加载
评论 #13899839 未加载
评论 #13899811 未加载
评论 #13899918 未加载
simplehumanabout 8 years ago
I guess this is on hn because it sounds cool? It&#x27;s impossible to understand what it is.
评论 #13899716 未加载
TheRealPomaxabout 8 years ago
Those are some cool acronyms that I&#x27;ve never heard of. Reading the README does not explain any more. It&#x27;s quite the mystery how this got to the top-30...
评论 #13899990 未加载
popol12about 8 years ago
I can&#x27;t find how to make it work for european companies. For instance, fnac.com doesn&#x27;t give any result with the -r option. Did I miss something ?
natchabout 8 years ago
&gt;The script with no specified options will query ARIN and a pool of BGP route servers.<p>To what end?
blockfinderabout 8 years ago
see also blockfinder:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;ioerror&#x2F;blockfinder" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ioerror&#x2F;blockfinder</a>