Random Web Server App

When I was younger and had just learned to use nmap, it was a hobby of mine to scan the internet and browse random web servers. At the time, I used very aggressive scans( nmap -A -iR 500 –top-ports 30 –open ) and found some incredibly interesting servers(It is amazing how many computers on the internet are blatantly compromised). When I first started doing it, it was a completely manual process: I would start the scan, scroll through pages of IP addresses and port information, and manually copy and paste interesting IPs and ports into Firefox. Eventually I automated the process using a shell script and some python that scanned and filtered IP addresses, noted interesting ports, and automatically opened a browser to the IP.

Between a couple dozen OS installs, this script was lost. To remake this experience, I made randomsite.lhackworth.com. It’s some spaghetti code slapped together using nmap, Django, uwsgi, and Nginx that does something similar to what I used to do, albeit less noisily. It scans IPV4 addresses for an open port 80 and sticks seemingly good IP addresses into a database. Then when you go to randomsite.hackworth.com/go/, it redirects you to a random IPV4 web server.

It does not aggressively scan like the old scripts did, it only scans for servers at port 80. Unfortunately, since port 80 is the correct port for web servers, many of these sites are much less interesting than the sorts of things I found back in the day. At the request of a few users on Hacker News, I implemented a filter to prune out sites with certain errors like 400, 404, 500, and others, which greatly improved the signal-to-noise ratio of the redirects. It was fun to cobble together. This site is now unmaintained, and the site pruning software has now been disabled. If you want specifics on how I did it, email me at contact@lhackworth.com.

On Frugality

I am an incredibly frugal man. I drive a 2005 Toyota Corolla with over 180,000 miles on it. I have my wife cut my hair instead of paying to get it cut. At home, I regularly wear shirts that I had in high school. To most people, this sounds incredibly odd, but I do this because frugality brings a freedom that needless spending doesn’t.

With this said, I am not cheap. If a purchase warrants it, I will gladly spend 3x as much as a cheaper alternative. When I make a purchase, I almost always consider at least four things: Cost over time, opportunity cost, risk, and return on investment.

Cost over time is seen in Sam Vimes Theory of Economic Injustice, which discusses how someone buying a good quality pair of leather boots often pays less over time than someone who buys cheap shoes that break down in a few months, requiring repeated purchases. I cringe at buying brand-name T-shirts, fancy utensils, or decorations, yet I will happily pay several hundred dollars for leather shoes, put forth large sums of money towards vehicle maintenance instead of ignoring issues, and pay for gym equipment to use at home instead of paying for a monthly subscription that adds up over time.

Opportunity cost is an important consideration in my purchases as well. I have interests in all sorts of topics, and am cyclically obsessed with topics ranging from microcontrollers to psychiatric medications to the evolution of eels. I could easily drop hundreds or thousands of dollars into these obsessions and turn them into full-fledged hobbies, but I choose not to; I choose instead to try to focus on productive or potentially productive ventures.

Return on investment and risk go hand in hand. Going to a top university in an expensive city would almost definitely provide a fantastic return on investment, but it would be fraught with considerable risk: Risk of not completing university, of failing to gain the social capital required to shine, of not being able to escape the financial snowball that is large student loans. Balancing potential return on investment while managing risk is an ever-evolving skill with me, and one that I shall continue to attempt to refine.

This framework of incorporating frugality in my life has led to an incredible amount of anxiety reduction. I used to be constantly stressed about money, worrying about how I would respond if my scooter broke down, if I cut a limb, or if I got sick. Such stress is toxic, and affected me massively, causing panic attacks and sleepless nights regularly. My stress levels have dropped inversely with my savings account, meaning the more money I’ve collected, the less stressed I’ve become.

It will probably be easy for readers to see what I say and think “Pssh, it’s easy for you to say, you’re rich!” This is true to an effect; while our household income is still below median for the nation, we are still making more than many families making minimum wage. However, it’s important to know that we didn’t start this way. When my wife and I began saving up our emergency fund, we both worked minimum wage jobs while going to college. We obviously couldn’t save much, but it was enough to significantly reduce our stress and prepare for the inevitable expenses that hit everyone.

If you are reading this and don’t have one, please consider building an emergency fund. It will change your life for the better.