Skip to content

Instantly share code, notes, and snippets.

/gist:3416945
Created Aug 21, 2012

Embed
What would you like to do?
#!/usr/bin/python
#-*- encoding: Utf-8 -*-
from socket import socket, AF_INET, SOCK_STREAM
# Script pour afficher de l'ascii art sur la tribune.
cookie = 'linuxfr.org_session=xxxxx'
art = '''
##############
## ##
## ###
## ##
# ##
# ##
# ##
# # ##
## ## #
# ## #
# ## #
# ## ##
### ## ### #
########### ## ## ##
# ########### # ##
# ############# ## ##
# ####### ########### ##
# ####### ###### #### #
# ####### ####### ## ##
# ##### ###### ### ###
## ## #### #
# ##
## #
# ####################### #
## # # #
## # # #
## ## # #
## ## # #
## ## ### #
## ######### ##
## ##
### ###
###########
'''.split('\n')
art.reverse()
for i in art:
s = socket(AF_INET, SOCK_STREAM)
s.connect(('88.191.250.176', 80))
data = 'board[message]=<code>' + i + '</code>'
request = 'POST /board HTTP/1.1\r\n'
request += 'Host: linuxfr.org\r\n'
request += 'Referer: http://linuxfr.org/\r\n'
request += 'Content-Length: ' + str(len(data)) + '\r\n'
request += 'Cookie: ' + cookie + '\r\n\r\n'
s.send(request + data)
s.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.