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
| import requests | |
| import threading | |
| def get_thrasher(): | |
| req_get = requests.get('http://192.168.56.101/') | |
| threads = [] | |
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
| #The script collects the IP addresses from the apache log file. | |
| #It then uses the geoip2 database in order to find the geographical location of the IP. | |
| #More information for the geoip2 database can be found at http://dev.maxmind.com/geoip/geoip2/downloadable/ | |
| #The module used to capture the IPs from the apache log file requires a CustomLog format. It needs to be specified in the apache config file and in the script. The string used is | |
| #("%h <<%P>> %t %Dus \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %l %u" | |
| import geoip2.database | |
| import apache_log_parser | |
| #specify the log file we will capture the IP from. |
NewerOlder