Intent
stringlengths 13
680
| Script
stringlengths 7
352
|
---|---|
For each link in links do nothing do nothing | for link in links: \n pass |
If the substring '!lazor' is in data of tcp in lower case do nothing | if '!lazor' in tcp.data.lower(): \n pass |
Else call the function printLinks with argument url | else: \n printLinks(url) |
Except do nothing | except: \n pass |
Else print metadata information associated with the given fileName | else: \n printMeta(fileName) |
Else assign to dst the tgt of options | else: \n dst = options.tgt |
If the method iptype with no argument of the function IPTEST with argument ipsrc is equal to "PRIVATE" then exit function with no argument | if IPTEST(ipsrc).iptype() == 'PRIVATE': \n return |
Try to call the method connect with a tuple made of target and 21 of s | try: \n s.connect((target,21)) |
try to call the method gethostbyname with argument tgtHost and assign the result to tgtIP | try: \n tgtIP = gethostbyname(tgtHost) |
For each row in c assign to url the result of function str with argument row at position 0 and assign to date the result of function str with argument row at position 1 | for row in c: \n url = str(row[0]) \n date = str(row[1]) \n |
Start the try block then call the function nlst with no argument from the library ftp and assign to dirList | try: \n dirList = ftp.nlst() |
For each sport in range from 1023 to 65535 assign to IPlayer the result of the function IP with src equals src and dst equals to tgt, assign to TCPlayer the result of the function TCP with argument sport equals sport and dport equals to 513, divide IPlayer by TCPlayer and assign it to pkt and call the function send with argument pkt | for sport in range(1024,65535): \n IPlayer = IP(src=src, dst=tgt) \n TCPlayer = TCP(sport=sport, dport=513) \n pkt = IPlayer / TCPlayer \n send(pkt) \n |
Else assign to synSpoof the sunSpoof of options, assign to srcSpoof the srcSpoof of options and assign to tgt the tgt of options | else: \n synSpoof = options.synSpoof \n srcSpoof = options.srcSpoof \n tgt = options.tgt \n |
If the src of options is equal to None create a random source IP | if options.src == None: \n src = '.'.join([str(randint(1,254)) for x in range(4)]) |
Try to call function pxssh of library pxssh with no arguments and assign it to s, call method login with arguments host, user and password and return the value s | try: \n s = pxssh.pxssh() \n s.login(host, user, password) \n return s |
for each tgtPort in tgtPorts call the function nmapScan with arguments tgtHost and tgtPort | for tgtPort in tgtPorts: \n nmapScan(tgtHost, tgtPort) |
if pathName is equal to None \n call the function exit with argument 0 | if pathName == None: \n exit(0) |
If the iface of options is equal to None assign to iface of conf the string 'eth0' | if options.iface == None: \n conf.iface = 'eth0' |
If synSpoof of options is equal to None or if srcSpoof of options is equal to None or if tgt of options is equal to None then call the exit function with argument 0 | if options.synSpoof == None or options.srcSpoof == None or options.tgt == None: \n |
If the absolute value of ttl casted to int minus the ttlValues at the hey ipsrc casted at int is more than THRESH do nothing | if abs(int(ttl) - int(ttlValues[ipsrc])) > THRESH: \n pass |
Try to get source and destination from an IP packet | try: \n eth = dpkt.ethernet.Ethernet(buf) \n ip = eth.data \n src = socket.inet_ntoa(ip.src) \n dst = socket.inet_ntoa(ip.dst) \n |
Except exit the cycle | except: \n break |
If the functions len with argument argv of sys returns a value less than 2 then call the function exit with argument 0 | if len(sys.argv) < 2: \n sys.exit(0) |
Start expect block and do nothing | except: \n pass |
Try to assign to longitude the field 'longitude' of rec, assign to latitude the field 'latitude' of rec, create the tuple kml with arguments '<Placemark>\n', '<name>%s</name>\n', '<Point>\n', '<coordinates>%6f, %6f</coordinates>\n', '</Point>\n' and '</Placemark>\n' and return the variable kml | try: \n longitude = rec['longitude'] \n latitude = rec['latitude'] \n kml = ( '<Placemark>\n', '<name>%s</name>\n', '<Point>\n', '<coordinates>%6f, %6f</coordinates>\n', '</Point>\n','</Placemark>\n') \n return kml \n |
Try to call the method pxssh with no arguments of the package pxssh and assign it to s, Call the method login with arguments host, user and password of s and Assign the value True to the variable Found | try: \n s = pxssh.pxssh() \n s.login(host, user, password) \n Found = True |
If the method haslayer with argument IP of pkt is equals to True assign to ipsrc the src of the method getlayer with argument IP of pkt, assign to ipsrc the src of the method getlayer with argument IP of pkt and assign to ttl the ttl of pkt casted to str | if pkt.haslayer(IP): \n ipsrc = pkt.getlayer(IP).src \n ttl = str(pkt.ttl) \n checkTTL(ipsrc, ttl) \n |
If ret is equal to 0 then exit the function | if ret == 0: \n return |
Else assign to THRESH five | else: \n THRESH = 5 |
if pathName is equal to None call the function exit with argument 0 | if pathName == None: \n exit(0) |
If placesDB is a file Call the function printHistory with argument placesDB and Call the function printGoogle with argument placesDB | if os.path.isfile(placesDB): \n printHistory(placesDB) \n printGoogle(placesDB) |
if the function str with argument row at position 1 is not equal to function str with argument row at position 2 assign to msgDirection the concatenation of To, the function str with argument row at position 1 and : | if str(row[1]) != str(row[2]): \n msgDirection = 'To ' + str(row[1]) + ': ' |
For each ch in val increase addr with value '%02x ' module of the result of the function ord with argument ch | for ch in val: \n addr += '%02x ' % ord(ch) |
If rLat exists then assign to mapLat the value rLat at the position 0, then call the function split with argument '&' at the position 0, then call the function split with argument '=' at the position 1 | if rLat: \n mapLat = rLat[0].split('&')[0].split('=')[1] |
If tgt of options is equal to None call the function exit with argument 0 | if options.tgt == None: \n exit(0) |
If the method has_key with argument ipsrc of ttlValues is not True assign to pkt the value of the function sr1 with arguments IP with argument dst equals to ipsrc, ICMP with no arguments, retry equals to 0, timeout equals to 1 and verbose equals to 0 and assign to ttlValues at the key ipsrc the value ttl of pkt | if not ttlValues.has_key(ipsrc): \n pkt = sr1(IP(dst=ipsrc),ICMP(), retry=0, timeout=1, verbose=0) \n ttlValues[ipsrc] = pkt.ttl |
Start except block with Exception e and do nothing | except Exception, e: \n pass |