HN user

mct

233 karma

http://github.com/mct

Posts2
Comments80
View on HN

I love that the networking stack uses SLIP and slattach(1)!

I was playing with a toy TCP/IP stack, and decided using SLIP over a pty on Linux was a great way to interface with the kernel. Unfortunately it looks like macOS previously shipped with slattach(1) a very long time ago, but no longer does.

I'm curios if other people have used SLIP on macOS to get a dead-simple, cross-platform API to the networking stack?

The alternative would be to use tun/tap on Linux and utun on macOS, but SLIP would be so much nicer.

Very interesting telnet site, thank you for sharing!

FYI, though, I think this may be looking at the wrong object ID. It selected "31", which appears to be the entry for one of the Lagrange points. Voyager 1 and 2 appear to have negative ID numbers, "-31" and "-32".

Internet Mail 2000 4 years ago

I have a domain I've been using for some 20 years as my primary email address. There are some gmail users I can send mail to without any problems at all. For other gmail users, my messages appear to go into a black hole, not even showing up in their spam folder. Looking at my postfix logs, I can see gmail's SMTP servers don't report any problems at delivery time. It's frustrating.

The post does a poor job explaining it, but the term "gaping security hole" comes from traditional netcat's source code. In order to enable the "-e" (exec) flag, it must be compiled with "-DGAPING_SECURITY_HOLE".

A “crash” is an unscheduled system reboot or halt. There is about one crash every other day; about two-thirds of them are caused by hardware-related difficulties such as power dips and inexplicable processor interrupts to random locations.

Youch. Was the PDP-11 really so unreliable?

Netcat.c 11 years ago

The README that Hobbit (author of the original netcat) wrote is a really good read. I learned a lot when I first read it years and years ago. I especially remember it describing how it is possible to get "in front" of another daemon. If the daemon has bound a listening socket to 0.0.0.0, as most do, you can bind to a more specific address on the same port and intercept inbound connections. Fun!

http://sysunconfig.net/unixtips/netcat_readme.html

I've been using a perl-based calc for a number of years now. It started as a one liner eval-ing expressions on the command line. My favorite feature is that if symlinked as "hex", "oct", or "bin", it prints the output in hexadecimal, octal, or binary. And, because the evaluation is done by perl, hexadecimal, octal, and binary numbers can be entered using "0x", "0", and "0b" prefixes. A minor improvement was the substitution of commas with underscores, which perl allows in numbers for easier readability. Entering "1,000,000" is much nicer on the eyes than carefully counting the number of trailing zeros.

Two weeks ago, after becoming fed up with having to copy and paste results from one line to the next, I wrapped it in a repl and added bc(1)-like support for "." expanding to the last value. Rather embarrassingly, I started to implement bc(1)-style variables, but then realized this was incredibly silly as you can simply use perl variables directly. :-)

https://github.com/mct/junkdrawer/commits/master/bin/calc

I fully support writing other calc implementations, especially in languages such as C! It's a great exercise, and can become very complex very quickly. bc(1) supports arbitrary precision (try: echo "scale=500; 4a(1) 42" | bc -l), which is super awesome. In C, I've only implemented RPN calculators, never infix, which would be fun to try.

Don't die without a will. If you do and you appoint an executor, you are giving them a very dirty job

This is one of the reasons I've been putting off completing a will :-( Is there a good option for going about this without naming an executor?

You're right, "missing" was a poor choice of words. I meant, "vim keybindings for these commands isn't supported".

They are keybindings my fingers reach for everyday without thinking about it, similar to how I use j, k, h, l without thinking about it.

I get my hopes up when I see another vim emulation project, but after using it for just a few minutes, I already found a few missing vim features I use every day:

* Toggling if search results should be highlighted (:set hls, :set nohls)

* Opening the filename under the cursor in a new window (^W f)

Completely emulating an entirely different editor is very, very difficult :-(

I applaud everyone contributing to these projects, and hope they continue to improve! They've already come a very long way from evil, and viper-mode.

A few years ago, I heard an NPR interview with a doctor who's friend was terminally ill. Rather than opt for treatment, the friend spent his remaining time living with his doctor friend. He died a few months later. The doctor said that this is how she wanted to die, too. I've tried a number of times to find the story, but I haven't been able to. Does it ring a bell for anyone? I'd love to listen to it again.

Thanks!

I wish I had time to cite a reference, but my memory is that an ANY query is not guaranteed to return all RRs, anyway. Running a quick experiment against bind 9.8.4 (as packaged in Debian stable), I can confirm that:

* When no entry already exists in the cache, bind will forward the ANY query to an authoritative server and return the result.

* When some information is already present in the cache, bind will return only the information already cached, without querying more information from an authoritative server

Thus, if you need to know if a specific RR exists, you must query for that specific RR.

Still, to aid humans in debugging DNS problems, a nice compromise might be to allow ANY queries only over TCP. That would alleviate the spoofing problem.

Under what conditions do you have a usefully functioning system when the clock is so off you need to do multi minute jumps?

One example is embedded systems. Many don't have an RTC, or boot after the RTC has lost power. If a network connection finally comes up, NTP will instantly fast-forward the clock by years

I wrote the original tcptraceroute in 2001.

The article mentions many traceroute implementations change the source port to associate queries with responses. Another technique is to use the IP ID field, leaving the source port static. In tcptraceroute, you can choose either method using "--track-id" or "--track-port". By comparing the two, you can sometimes see traffic being load-balanced across multiple links.

I just did a quick write up of this at https://gist.github.com/mct/2ae1dbc2d596f59f5aff (which I should add to the examples.txt file)

There is a similar feature in Linux which I've used a number of times over the years to simulate various network problems, and to modify packets flowing through my router in interesting ways.

You can select packets to be sent to userspace with the "-j QUEUE" iptables target handler, and then read those packets using libnetfilter.

When I'm travelling internationally, a currency converter is always a good one to have.

You can try searching for public transit apps specific to the cities you'll be visiting. Depending on where you'll be travelling, there are some nice ones that have built-in maps of the transit system, trip planning, and real-time departure estimates. For a city like San Francisco, you may need more than one to cover the various public transit providers available (BART vs MUNI, etc). Lacking a specific app, you may want to just bookmark mobile versions of the public transit provider's website.

I also like installing a maps program that can make use of offline data. On Android, there's OsmAnd. That way, even if you no longer have data service, you can use the GPS to get a sense of where you are and what's nearby.

TripIt can be nice for keeping your travel itinerary easily accessible -- but of course it's always good to have hardcopies either on your person or in your carry-on.

Good luck!

Interestingly, there are a large number of non-gmail.com addresses in there, including 123k yandex.ru addresses, plus a (very) small number of yahoo.com and hotmail.com addresses. Here's the output of "cut -d@ -f2 | sort | uniq -c | sort -nr":

https://gist.github.com/anonymous/255959493c0a26cce856

The data hasn't been very well edited from whatever dump it came from. For example, there are lines that end in "gmail.com_xtube", "gmail.com7777", "gmail.com|login", etc, which are curious.