|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
||||
Who needs browsers? An opinionated look at the 4 HTTP clients in the base install ;^)
To shorten the time while we wait for 6.8 to hit the dance floor I'd like to entertain you with a tounge-in-cheek introduction to the four(!) HTTP-clients that come with OpenBSD.
#1: If you're lazy, you use ftp(1).
By the way, you can clean up most of the HTML-tags from the output with an sed statement like this one: Code:
(...) | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' #2: If you're 1337, you use nc(1). The equivalent of impressing your misguided Emacs-using friends with your cool ed(1) skills.
#3: If you're paranoid, you use perl(1) with HTTP::Tiny(3p), OpenBSD::Pledge(3p), and OpenBSD::Unveil(3p).
#4: If you're out of your mind, you use telnet(1).
That's it. I hope you enjoyed my little HTTP romp. And seriously, who needs browsers?! PS: Feel free to point out any errors if you see them. Thanks. |
|
||||
Thanks for the kind words. To use nc with HTTPS remember to set the -c flag, it's easy to overlook. I speak from experience. I actually didn't even look closely at the HTTP protocol. There are numerous ways in which this can fail. That being said, for what it is, it's actually pretty neat. I have a follow-up piece coming up regarding some of the popular image sites. And maybe a few other ideas. And there's probably some potential just waiting to be unlocked when it comes to HTTP::Tiny. After all it supports cookies, redirects, POST requests and whatnot.
In the meantime how about some quick'n'dirty gopher fun? Using technique #2 to access a gopher server (commands in green, follow-up target in red) Code:
$ printf "/fun/xkcd \r\n" | nc gopher.floodgap.com 70 1Floodgap Gopher Fun and Games /fun gopher.floodgap.com 70 i error.host 1 i 88 A Webcomic of Romance, 88 error.host 1 i 88 Sarcasm, Math & Language. 88 error.host 1 i 88 88 error.host 1 i8b, ,d8 88 ,d8 ,adPPYba, ,adPPYb,88 error.host 1 i `Y8, ,8P' 88 ,a8" a8" "" a8" `Y88 error.host 1 i )888( 8888[ 8b 8b 88 error.host 1 i ,d8" "8b, 88`"Yba, "8a, ,aa "8a, ,d88 error.host 1 i8P' `Y8 88 `Y8a `"Ybbd8"' `"8bbdP"Y8 error.host 1 i error.host 1 iCurrent comic: error.host 1 1xkcd - A Webcomic - Masks (2367) /fun/xkcd/comics/2360/2367 gopher.floodgap.com 70 i error.host 1 1Browse all xkcd comics /fun/xkcd/comics gopher.floodgap.com 70 i error.host 1 iWarning: this comic occasionally contains strong language (which error.host 1 imay be unsuitable for children), unusual humor (which may be error.host 1 iunsuitable for adults), and advanced mathematics (which may be error.host 1 iunsuitable for liberal-arts majors). error.host 1 iUpdates usually Monday/Wednesday/Friday. error.host 1 iSome older Gopher clients may not understand PNG itemtype. error.host 1 hAbout xkcd (WWW) URL:http://www.xkcd.com/about/ gopher.floodgap.com 70 i error.host 1 iComics reproduced from www.xkcd.com under license. error.host 1 hxkcd License (WWW) URL:http://www.xkcd.com/license.html gopher.floodgap.com 70 hxkcd Web Site (WWW) URL:http://www.xkcd.com/ gopher.floodgap.com 70 . Code:
$ printf "/fun/xkcd/comics/2360/2367 \r\n" | nc gopher.floodgap.com 70 1xkcd - A Webcomic of Romance, Sarcasm, Math and Language. /fun/xkcd gopher.floodgap.com 70 1Floodgap Gopher Fun and Games /fun gopher.floodgap.com 70 i error.host 1 ixkcd - A Webcomic - Masks (2367) error.host 1 i error.host 1 iImage: error.host 1 pmasks.png /fun/xkcd/comics/2360/2367/masks.png gopher.floodgap.com 70 i error.host 1 iHaunted Halloween masks from a mysterious costume shop that turn error.host 1 iyou evil and grow into your skin score a surprisingly high 80% error.host 1 ifiltration efficiency in R. L. Stine-sponsored NIOSH tests. error.host 1 i error.host 1 iComics reproduced from www.xkcd.com under license. error.host 1 hxkcd License (WWW) URL:https://www.xkcd.com/license.html gopher.floodgap.com 70 hxkcd Web Site (WWW) URL:https://www.xkcd.com/ gopher.floodgap.com 70 i error.host 1 iPrevious: error.host 1 1xkcd - A Webcomic - Amelia's Farm Fresh Cookies (2366) /fun/xkcd/comics/2360/2366 gopher.floodgap.com 70 . Code:
printf "/fun/xkcd/comics/2360/2367/masks.png \r\n" | nc gopher.floodgap.com 70 > masks.png Code:
printf "/ \r\n" | nc gopher.floodgap.com 70 Code:
telnet gopher.floodgap.com 70 |
|
||||
@the pic!
I haven't played with Tor, yet. But it's definitely on my long-term list of things to fool around with. There are howtos out there explaining how to 'torify' applications other than firefox, but it seems it's not recommended. Apparently the Firefox bloat is part of the camouflage when it comes to Tor. Not because of its bloat per se, but because everyone is using the same browser. As soon as you change that you're sticking out from the general traffic on the Tor network! And that's the first step to being tracked and/or de-anonymized. But that's definitely a discussion warranting a separate topic. Anyway, I have a few more neat little tricks coming up over the coming weeks. Stay tuned. |
|
|||
I have a neat trick up my sleeve too. In case someone is using the terminal and needs a map, just use:
Code:
telnet mapscii.me Regarding Tor there are some hints here. Last edited by bradley; 16th November 2020 at 02:52 AM. |
Tags |
ftp, nc, openbsd, perl, telnet |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Delay in keystroke with web browsers | roddierod | OpenBSD General | 5 | 27th November 2019 03:39 PM |
Xorg and OpenBSD security record on the Base Install. | shep | News | 3 | 27th October 2018 08:42 AM |
removing unused system daemons from the base install (for security) | puffyborg | OpenBSD Security | 2 | 24th August 2018 08:15 PM |
EFF: More than 80% of browsers have trackable signatures | J65nko | News | 0 | 18th May 2010 05:57 PM |
Limitations of Console Web Browsers | JMJ_coder | General software and network | 17 | 8th September 2008 06:06 PM |