bitnuts.de logo   Downloads About Contact

.access_log ASCII Art

Well, this post is absolute geeky-nerdish nonsense, but it was and is great fun anyway. The following python script lets you leave some ASCII Art via the user agent string. A friend of mine came up with this idea and leaved a squirrel in my logs (greetz to Serguei).

import urllib
import urllib2
import re
import time
doit = "true"

def open_url(user_agent):
		request = urllib2.Request("https://bitnuts.de", headers={'cache-control':'no-cache'})
		request.add_header("User-Agent", user_agent)
		opener = urllib2.build_opener()
		f = opener.open(request)
		doc = f.read()
		print f.info
		f.closewhile (doit=="true"):
		open_url("_____________XXXXXXXXXXXXXXXXXX")
		open_url("_________XXXX__________________XXXX")
		open_url("_______XXX________________________XXX")
		open_url("_____XXX____________________________XXX")
		open_url("___XXX________________________________XXX")
		open_url("__XXX_________XXX________XXX___________XXX")
		open_url("_XX___________XXX________XXX____________XX")
		open_url("_XX___________XXX________XXX_____________XX")
		open_url("_XX___________XXX________XXX_____________XX")
		open_url("_XX_____XXX____________________XXX_______XX")
		open_url("_XX_____XX______________________XX_______XX")
		open_url("_XX______XXX__________________XXX________XX")
		open_url("__XX_____XXXX________________XXXX_______XX")
		open_url("___XX_______XXXX__________XXXX_________XX")
		open_url("____XX_________XXXXXXXXXXXX___________XX")
		open_url("_____XXX____________________________XXX")
		open_url("_______XXXX______________________XXXX")
		open_url("__________XXXX________________XXXX")
		open_url("____________XXXXXX________XXXXX")
		open_url("__________________XXXXXXXXX")
		open_url("")
		open_url("			Have an awesome day!")
		time.sleep(0.05)