Tag Archives: #linux

Positive, comparative, and the code used in a linux

I read a thread where OpenBSD community were discussing the code for the network time daemon, and some figures stated there seemed almost unreal. Out of the pure curiosity, that has nothing to do with deeper understanding of the ntp daemon code, I ran “a test” used there on an OpenBSD, a FreeBSD and a Linux machine. The results are truly staggering:

uname -rms ; pwd ; for i in $(find . -name “*.[ch]”); do cat $i >> allcode; done ; egrep -v ‘[:blank:]*/?\*’ allcode | grep -v “^ *$” | wc -l
OpenBSD 5.6 amd64
/usr/src/usr.sbin/ntpd
2898

uname -rms ; pwd ; for i in $(find . -name “*.[ch]”); do cat $i >> allcode; done ; egrep -v ‘[:blank:]*/?\*’ allcode | grep -v “^ *$” | wc -l
FreeBSD 11.0-CURRENT amd64
/usr/src/contrib/ntp/ntpd
40055

uname -rms ; pwd ; for i in $(find . -name “*.[ch]”); do cat $i >> allcode; done ; egrep -v ‘[[:blank:]]*/?\*’ allcode | grep -v “^ *$” | wc -l
Linux 3.17.6-200.fc20.x86_64 x86_64
/tmp/ntp-4.2.8/ntpd
102214

Project OpenBSD proved itself time and again as a proper place if you want to learn coding!

irssi, Tor and SSL on linux

I’ve noticed that I cannot connect to an SSL port of an IRC server running on an .onion address using torsocks on a linux. Using the OpenBSD’s irssi-0.8.15p3-socks works fine, though, just as using Xchat with usewithtor option. For instance, using

vanja@ip:~> usewithtor irssi

and then

/connect -ssl tn3zho2yrhkdpmo7.onion 6697

simply hangs the connection. There are a few traces in the terminal about the problem:

libtorsocks(17204): The symbol res_querydomain() was not found in any shared library. The error reported was: not found!

Similar traces get spilled in the very irssi’s window if proxychains are used:

-!- Irssi: Unable to connect server tn3zho2yrhkdpmo7.onion port 6697
[Connection refused]

and

[(status)] |DNS-request| tn3zho2yrhkdpmo7.onion
|S-chain|-<>-127.0.0.1:9050-<>-127.0.0.1:8123-<–timeout
|DNS-response|: tn3zho2yrhkdpmo7.onion is not exist

The solution that works well for irssi on OpenSuSE 13.1, Debian 7, and Scientific Linux 6.5 is to use socat, just like it is explained at Tor’s pages for irssi:

$ socat TCP4-LISTEN:4242,fork SOCKS4A:localhost:tn3zho2yrhkdpmo7.onion:6697,socksport=9050

and then from within irssi:

/connect -ssl localhost 4242

That should allow irssi to connect to an SSL port of an IRC server running on an .onion address.