Created
March 4, 2017 21:14
-
-
Save intrd/a6dbbb04940c619020fc08d1b525da38 to your computer and use it in GitHub Desktop.
Solution to Nullcon HackIM 2017 - prog300-jio-geo_challenge (hit the server from 40 different countries)
This file contains hidden or 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 | |
## Solution to Nullcon HackIM 2017 - prog300-jio-geo_challenge (hit the server from 40 different countries) | |
# @author intrd - http://dann.com.br/ (based on https://www.phillips321.co.uk/2013/08/31/multi-threading-python-a-quick-example/) | |
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/ | |
import re, sys, time, os | |
sys.path.append("../../LIBS/") | |
from int_netcat import Netcat | |
import socket | |
import socks | |
from random import randint | |
from hashlib import md5 | |
use_tor = True | |
use_proxy = True | |
if not use_tor: | |
use_proxy = True | |
if use_proxy: | |
socks.set_default_proxy(socks.SOCKS5, "94.70.196.104",port=45554) | |
socket.socket = socks.socksocket | |
if use_tor: | |
socks.set_default_proxy(socks.SOCKS5, "localhost",port=9050) | |
socket.socket = socks.socksocket | |
o=os.popen('service tor restart') | |
o=o.read() | |
time.sleep(3) | |
while 1: | |
nc = Netcat('52.90.9.177', 33333) | |
data=nc.read(1024) | |
print(data) | |
pay = "75bdf5e06df11aaa27297d363f88177a" | |
nc.write(pay.encode("utf-8")) | |
data=nc.read() | |
print(data) | |
data=nc.read() | |
print(data) | |
data=nc.read() | |
print(data) | |
nc.close() | |
## to save used ips | |
# ip=re.search(r"from (.*)", data).group(1) | |
# file = open("used_ips.txt", 'a') | |
# file.write(ip+"\n") | |
# file.close() | |
if use_tor: | |
o=os.popen('service tor restart') | |
o=o.read() | |
time.sleep(3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment