Created
June 11, 2017 20:03
-
-
Save pawlos/faee704642cc4dab4de06fb110144359 to your computer and use it in GitHub Desktop.
Simple script to follow the hacker for SHA2017
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
| # -*- coding: utf-8 -*- | |
| #countries | |
| import requests | |
| country_list = requests.get('http://www.nirsoft.net/countryip/').text | |
| countries_ip = {} | |
| last_country = '' | |
| with requests.Session() as s: | |
| ip = '88.12.12.12' | |
| r = s.get("https://followme.stillhackinganyway.nl/", headers={'X-Forwarded-For':ip}) | |
| while True: | |
| country = r.text | |
| while '<div class="row"><div class="box" style="background:' in country: | |
| index = country.index('<div class="row"><div class="box" style="background:') | |
| country = country[index+52:] | |
| print country | |
| country = country[21:] | |
| index = country.index('</span>') | |
| country = country[:index] | |
| print country | |
| if last_country == country: | |
| print r.text | |
| break | |
| last_country = country | |
| if country == 'United States of America': | |
| country = 'United States' | |
| if country not in countries_ip: | |
| index = country_list.index(country) | |
| #print index | |
| link = country_list[index-9:index-2] | |
| #print link | |
| q = requests.get('http://www.nirsoft.net/countryip/'+link) | |
| ips = q.text | |
| index = ips.index('iptableheader') | |
| ips = ips[index:] | |
| #print ips | |
| index = ips.index('<td>') | |
| ip = ips[index+4:index+24] | |
| print ip | |
| index = ip.index('<td>') | |
| ip = ip[:index].strip() | |
| print 'Found ip:', ip | |
| countries_ip[country] = ip | |
| #break | |
| print "hop to: " | |
| ip = countries_ip[country] | |
| print ip | |
| r = s.get("https://followme.stillhackinganyway.nl/", headers={'X-Forwarded-For':ip}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment