Created
August 21, 2012 16:15
-
-
Save anonymous/3416945 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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