Re:Bored? How about trying a Linux speed run?
by datenwolf on Sunday April 12, 2020 @02:51PM
(#22850259)
> Or just get a static tar and xz static build, they must be somewhere.
That is, that you can find them in an uncompressed form. If you fees adventurous you can probably coax the compressed data somehow through the bootloader decompressor, or the xz or deflate implementation found in the Linux kernel. Unfortunately these days modules tend to be compressed as well, but it should be possible to convice libdl to open a .ko file. If not you can always mmap it PROT_READ|PROT_EXEC and follow the symbols entries through the TLD yourself.
Re:Bored? How about trying a Linux speed run?
by anthk on Sunday April 12, 2020 @06:56PM
(#22851643)
Busybox has these in binary form, in either HTTP/FTP/Gopher servers or who knows which other protos. Pick your poison. Once you set a barebones connection to a gopher server from stdin using a little of C socket establishing code, you can just send the commands to fetch the binary, redirect it to a file and chmod(2) +x it with ease.
Re:Bored? How about trying a Linux speed run?
by chrisbroadfoot on Sunday April 12, 2020 @04:11PM
(#22850709)
> telnet, nc, ftp, ncftp, lftp, wget, curl, lynx, links? Luxury! Gone.
No nc.
Re:Bored? How about trying a Linux speed run?
by anthk on Sunday April 12, 2020 @06:16PM
(#22851403)
Ok, switch the C compiler to a Go one:
https://github.com/kisom/goat/blob/master/goat.go
Well, JK. A simple, braindead, ugly and fast netcat clone (client only) can be done in C in few functions.
Better: busybox build. It already has tar, xz and wget.
You just need to compile a simple HTTP client, or better:
find a gopher mirror. Bare netcat would work against that.
gopher://ftp.icm.edu.pl:70/1/vol/rzm6/busybox/binaries
With NetCat:
echo vol/rzm6/busybox/binaries/1.21.1/ | nc ftp.icm.edu.pl 70
echp vol/rzm6/busybox/binaries/1.21.1/busybox-i586 | nc ftp.icm.edu.pl 70 > busybox
Then ln all the binaries. Or run busybox wget.
Accesign the rest of the files is the same, just redirect the nc command to a file.
If tar is missing, you can just get for sure an static build and compile it. Or try to find an sltar mirror to github ;).
But that busybox has ustar, so look how easy it was with just netcat and Gopher, so writting an nc clone (openbsd's netcat portable version is really easy, altough there are another ones many more times dumbed down) would be the easiest win.