Update train_block.tsv
Browse files- train_block.tsv +10 -10
train_block.tsv
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
Intent Script
|
2 |
-
|
3 |
-
|
4 |
Check if the images contain Exif data, if it does then for each tuple tag and value in it decode it try: \n exifData = {} \n imgFile = Image.open(imgFileName) \n info = imgFile._getexif() \n if info: \n for (tag, value) in info.items(): \n decoded = TAGS.get(tag, tag) \n exifData[decoded] = value \n exifGPS = exifData['GPSInfo'] \n except: \n pass \n
|
5 |
If url is None then exit with argument 0 if url == None: \n exit
|
6 |
Else assign to skypeDB the path of main.db inside the pathName else: \n skypeDB = os.path.join(pathName, 'main.db')
|
@@ -8,12 +8,12 @@ If lport is equal to None then assign to lport the value '1337' if lport == None
|
|
8 |
If state is equal to 'open' then call the method append with argument host of tgtHosts if state == 'open': \n tgtHosts.append(host)
|
9 |
If passwdFile is not equal to None then call the function smbBrute with arguments configFile, tgtHost, passwdFile, lhost and lport if passwdFile != None: \n smbBrute(configFile,tgtHost,passwdFile,lhost,lport)
|
10 |
For each sid in dirList call the function listDir with argument recycleDir concatenated to sid of os and assign it to files and call the function sid2user with argument sid and assign it to user for sid in dirList: \n files = os.listdir(recycleDir + sid) \n user = sid2user(sid)
|
11 |
-
|
12 |
-
|
13 |
If the method isdir with argument recycleDir of path of os returns True then Exit the function with value recycleDir if os.path.isdir(recycleDir): \n return recycleDir
|
14 |
For each image in image_tags assign to filename the result of the method lstrip with argument 'http://' of image with key 'src', assign to filename the function join of path of os with arguments dir and the method replace with arguments '/' and '_' of filename, assign to filename the function join of path of os with arguments dir and the method replace with arguments '/' and '_' of filename, assign to data the method read with no argument of the method open with argument image with key 'src' of ab, call the method back with no argument of ab, open the filename with option 'wb' and assign it to save, call the method write with argument data of save and close the save file for image in image_tags: \n filename = image['src'].lstrip('http://') \n filename = os.path.join(dir,filename.replace('/', '_')) \n data = ab.open(image['src']).read() \n ab.back() \n save = open(filename, 'wb') \n save.write(data) \n save.close() \n
|
15 |
If the substring message is in the function str with argument row exit function with argument True if 'message' in str(row): \n return True
|
16 |
-
|
17 |
Get the image from imgTag, download it into a file and return it try: \n imgSrc = imgTag['src'] \n imgContent = urllib2.urlopen(imgSrc).read() \n imgFileName = basename(urlsplit(imgSrc)[2]) \n imgFile = open(imgFileName, 'wb') \n imgFile.write(imgContent) \n imgFile.close() \n return imgFileName \n
|
18 |
If value Fails is more than 5 then call the function exit with argument 0 if Fails > 5: \n exit(0)
|
19 |
Scan the tgtHost on tgtPort with nmap and calculate the state def nmapScan(tgtHost,tgtPort): \n nmScan = nmap.PortScanner() \n nmScan.scan(tgtHost,tgtPort) \n state=nmScan[tgtHost]['tcp'][int(tgtPort)]['state' \n
|
@@ -23,7 +23,7 @@ Else assign to iface the value iface of options else: \n iface = options
|
|
23 |
If thresh of options is not None assign to THRESH the value thresh of options if options.thresh != None: \n THRESH = options.thresh
|
24 |
Else Assign to msgDirection the concatenation of From, the function str with argument row at position 1 and : else: \n
|
25 |
nan exit(0)
|
26 |
-
|
27 |
Else Call the function printNets with arguments username and password else: \n printNets(username, password)
|
28 |
If pcapFile of options is equal to None Call the exit function with argument 0 if options.pcapFile == None: \n exit(0)
|
29 |
If pktCount contains the key stream increment of one the pktCount at the key stream if pktCount.has_key(stream): \n pktCount[stream] = pktCount[stream] + 1
|
@@ -49,14 +49,14 @@ If link in position 0 exists, assign link in position 0 to link if link[0]: \n
|
|
49 |
Else if link in position 1 exists, assign link in position 1 to link elif link[1]: \n link = link[1]
|
50 |
Else continue else: \n continue
|
51 |
Start try block assign the result of the function urlopen with argument link of urllib2, assign the response of url to full_link, append full_link to interests with key links try: \n response = urllib2.urlopen(link) \n full_link = response.url \n interests['links'].append(full_link) \n
|
52 |
-
|
53 |
If handle is equal to None call the function exit to 0 if (handle==None): \n exit(0)
|
54 |
Define the function __init__ with arguments self, first_name, last_name, job equals to '' and social media equals to {}, assign to first_name of self the value first_name, assign to last_name of self the value last_name, assign to job of self the value job and assign to social_media of self the value social_media def __init__(self,first_name,last_name, job='',social_media={}): \n self.first_name = first_name \n self.last_name = last_name \n self.job = job \n self.social_media = social_media \n
|
55 |
Define the method __repr__ with argument self and return the concatenation of first_name of self, ' ', last_name of self + ' has job ' + job of self def __repr__(self): \n return self.first_name + ' ' + self.last_name + ' has job ' + self.job \n
|
56 |
If the variable social_media of self has the key media_name return the variable social_media with key media_nameof self if self.social_media.has_key(media_name): \n return self.social_media[media_name] \n
|
57 |
For each result in json_object with key response assign an empty dictionary to new_result, assign result with key 'from_user_name' to new_result with key 'from_user', assign result with key 'geo' to new_result with key 'geo' assign result with key 'text' to new_result with key 'tweet' and append new_result to results for result in json_objects['results']: \n new_result = {} \n new_result['from_user'] = result['from_user_name'] \n new_result['geo'] = result['geo'] \n new_result['tweet'] = result['text'] \n results.append(new_result) \n
|
58 |
Try to assign the result of the function SMTP of smtplib with arguments 'smtp.gmail.com and 587 to smtpServer, call the method ehlo with no argument of smtpServer, call the method starttls with no argument of smtpServer, call the method ehlo with no argument of smtpServer, call the method login with arguments user and pwd of smtpServer, call the method sendmail with arguments user, to and the method as_string with no argument of msg of smtpServer and call the method close with no argument of smtpServer try: \n smtpServer = smtplib.SMTP('smtp.gmail.com', 587) \n smtpServer.ehlo() \n smtpServer.starttls() \n smtpServer.ehlo() \n smtpServer.login(user, pwd) \n smtpServer.sendmail(user, to, msg.as_string()) \n smtpServer.close() \n
|
59 |
-
|
60 |
If handle is equal to None or tgt is equal to None or user is equal to None or pwd is equal to None call the function exit with argument 0 if handle == None or tgt == None or user ==None or pwd==None: \n exit(0) \n
|
61 |
"If location is not equal to None assign the result of the function choice with argument location to randLoc and concatenate the concatenation of "" Its me from "", randLoc and ""."" to spamMsg" "if (location!=None): \n randLoc=choice(location) \n spamMsg += "" Its me from ""+randLoc+""."" \n"
|
62 |
"If interests with key 'users' is not equal to None assign to randUser the result of the function choice with argument interests with key 'users' and concatenate the concatenation of "" "", randUser and "" said to say hello."" to spamMsg" "if (interests['users']!=None): \n randUser=choice(interests['users']) \n spamMsg += "" ""+randUser+"" said to say hello."" \n"
|
@@ -89,7 +89,7 @@ nan Start expect block \n Do nothing
|
|
89 |
Start except block with Exception and e then do nothing except Exception, e: \n pass
|
90 |
Try to connect to hostname with FTP protocol, with credentials 'anonymous' and '[email protected]', quit the connection and then return True try: \n ftp = ftplib.FTP(hostname) \n ftp.login('anonymous', '[email protected]') \n ftp.quit() \n return True \n
|
91 |
"Connect to the database skypeDB and execute the command ""SELECT datetime(begin_timestamp,'unixepoch'), identity FROM calls, conversations WHERE calls.conv_dbid = conversations.id;""" "def printCallLog(skypeDB): \n conn = sqlite3.connect(skypeDB) \n c = conn.cursor() \n c.execute(""SELECT datetime(begin_timestamp,'unixepoch'), identity FROM calls, conversations WHERE calls.conv_dbid = conversations.id;"" \n"
|
92 |
-
|
93 |
If host is equals to None or passDir is equals to None or User is equals to None then call function exit with argument 0 if host == None or passDir == None or user == None: \n exit(0)
|
94 |
Expect Exit the function with sid value except: \n return sid
|
95 |
If downloadDB is a file Call the function printDownloads with argument downloadDB if os.path.isfile(downloadDB): \n printDownloads(downloadDB)
|
@@ -103,7 +103,7 @@ For each link in links do nothing do nothing for link in links: \n p
|
|
103 |
If the substring '!lazor' is in data of tcp in lower case do nothing if '!lazor' in tcp.data.lower(): \n pass
|
104 |
Else call the function printLinks with argument url else: \n printLinks(url)
|
105 |
Except do nothing except: \n pass
|
106 |
-
|
107 |
Else assign to dst the tgt of options else: \n dst = options.tgt
|
108 |
"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
|
109 |
Try to call the method connect with a tuple made of target and 21 of s try: \n s.connect((target,21))
|
|
|
1 |
Intent Script
|
2 |
+
Except do nothing except: \n pass
|
3 |
+
Except call the function exit with argument 0 of sys except: \n sys.exit(0)
|
4 |
Check if the images contain Exif data, if it does then for each tuple tag and value in it decode it try: \n exifData = {} \n imgFile = Image.open(imgFileName) \n info = imgFile._getexif() \n if info: \n for (tag, value) in info.items(): \n decoded = TAGS.get(tag, tag) \n exifData[decoded] = value \n exifGPS = exifData['GPSInfo'] \n except: \n pass \n
|
5 |
If url is None then exit with argument 0 if url == None: \n exit
|
6 |
Else assign to skypeDB the path of main.db inside the pathName else: \n skypeDB = os.path.join(pathName, 'main.db')
|
|
|
8 |
If state is equal to 'open' then call the method append with argument host of tgtHosts if state == 'open': \n tgtHosts.append(host)
|
9 |
If passwdFile is not equal to None then call the function smbBrute with arguments configFile, tgtHost, passwdFile, lhost and lport if passwdFile != None: \n smbBrute(configFile,tgtHost,passwdFile,lhost,lport)
|
10 |
For each sid in dirList call the function listDir with argument recycleDir concatenated to sid of os and assign it to files and call the function sid2user with argument sid and assign it to user for sid in dirList: \n files = os.listdir(recycleDir + sid) \n user = sid2user(sid)
|
11 |
+
Try Attempt to process network data using dpkt library, Parse Ethernet and IP headers from input buffer buf, extract source and destination IP addressese, convert them to readable format using socket.inet_ntoa(), retrieve KML representations for source and destination IPs via retKML() function try: \n eth = dpkt.ethernet.Ethernet(buf) \n ip = eth.data \n src = socket.inet_ntoa(ip.src) \n srcKML = retKML(src) \n dst = socket.inet_ntoa(ip.dst) \n dstKML = retKML(dst) \n kmlPts = kmlPts + srcKML + dstKML \n
|
12 |
+
Except exit function with value '' except: \n return ''
|
13 |
If the method isdir with argument recycleDir of path of os returns True then Exit the function with value recycleDir if os.path.isdir(recycleDir): \n return recycleDir
|
14 |
For each image in image_tags assign to filename the result of the method lstrip with argument 'http://' of image with key 'src', assign to filename the function join of path of os with arguments dir and the method replace with arguments '/' and '_' of filename, assign to filename the function join of path of os with arguments dir and the method replace with arguments '/' and '_' of filename, assign to data the method read with no argument of the method open with argument image with key 'src' of ab, call the method back with no argument of ab, open the filename with option 'wb' and assign it to save, call the method write with argument data of save and close the save file for image in image_tags: \n filename = image['src'].lstrip('http://') \n filename = os.path.join(dir,filename.replace('/', '_')) \n data = ab.open(image['src']).read() \n ab.back() \n save = open(filename, 'wb') \n save.write(data) \n save.close() \n
|
15 |
If the substring message is in the function str with argument row exit function with argument True if 'message' in str(row): \n return True
|
16 |
+
Except call exit function with argument 0 except: \n exit(0)
|
17 |
Get the image from imgTag, download it into a file and return it try: \n imgSrc = imgTag['src'] \n imgContent = urllib2.urlopen(imgSrc).read() \n imgFileName = basename(urlsplit(imgSrc)[2]) \n imgFile = open(imgFileName, 'wb') \n imgFile.write(imgContent) \n imgFile.close() \n return imgFileName \n
|
18 |
If value Fails is more than 5 then call the function exit with argument 0 if Fails > 5: \n exit(0)
|
19 |
Scan the tgtHost on tgtPort with nmap and calculate the state def nmapScan(tgtHost,tgtPort): \n nmScan = nmap.PortScanner() \n nmScan.scan(tgtHost,tgtPort) \n state=nmScan[tgtHost]['tcp'][int(tgtPort)]['state' \n
|
|
|
23 |
If thresh of options is not None assign to THRESH the value thresh of options if options.thresh != None: \n THRESH = options.thresh
|
24 |
Else Assign to msgDirection the concatenation of From, the function str with argument row at position 1 and : else: \n
|
25 |
nan exit(0)
|
26 |
+
except call method Call method acquire on screenLock with no arguments except: \n screenLock.acquire()
|
27 |
Else Call the function printNets with arguments username and password else: \n printNets(username, password)
|
28 |
If pcapFile of options is equal to None Call the exit function with argument 0 if options.pcapFile == None: \n exit(0)
|
29 |
If pktCount contains the key stream increment of one the pktCount at the key stream if pktCount.has_key(stream): \n pktCount[stream] = pktCount[stream] + 1
|
|
|
49 |
Else if link in position 1 exists, assign link in position 1 to link elif link[1]: \n link = link[1]
|
50 |
Else continue else: \n continue
|
51 |
Start try block assign the result of the function urlopen with argument link of urllib2, assign the response of url to full_link, append full_link to interests with key links try: \n response = urllib2.urlopen(link) \n full_link = response.url \n interests['links'].append(full_link) \n
|
52 |
+
Except do nothing except: \n pass
|
53 |
If handle is equal to None call the function exit to 0 if (handle==None): \n exit(0)
|
54 |
Define the function __init__ with arguments self, first_name, last_name, job equals to '' and social media equals to {}, assign to first_name of self the value first_name, assign to last_name of self the value last_name, assign to job of self the value job and assign to social_media of self the value social_media def __init__(self,first_name,last_name, job='',social_media={}): \n self.first_name = first_name \n self.last_name = last_name \n self.job = job \n self.social_media = social_media \n
|
55 |
Define the method __repr__ with argument self and return the concatenation of first_name of self, ' ', last_name of self + ' has job ' + job of self def __repr__(self): \n return self.first_name + ' ' + self.last_name + ' has job ' + self.job \n
|
56 |
If the variable social_media of self has the key media_name return the variable social_media with key media_nameof self if self.social_media.has_key(media_name): \n return self.social_media[media_name] \n
|
57 |
For each result in json_object with key response assign an empty dictionary to new_result, assign result with key 'from_user_name' to new_result with key 'from_user', assign result with key 'geo' to new_result with key 'geo' assign result with key 'text' to new_result with key 'tweet' and append new_result to results for result in json_objects['results']: \n new_result = {} \n new_result['from_user'] = result['from_user_name'] \n new_result['geo'] = result['geo'] \n new_result['tweet'] = result['text'] \n results.append(new_result) \n
|
58 |
Try to assign the result of the function SMTP of smtplib with arguments 'smtp.gmail.com and 587 to smtpServer, call the method ehlo with no argument of smtpServer, call the method starttls with no argument of smtpServer, call the method ehlo with no argument of smtpServer, call the method login with arguments user and pwd of smtpServer, call the method sendmail with arguments user, to and the method as_string with no argument of msg of smtpServer and call the method close with no argument of smtpServer try: \n smtpServer = smtplib.SMTP('smtp.gmail.com', 587) \n smtpServer.ehlo() \n smtpServer.starttls() \n smtpServer.ehlo() \n smtpServer.login(user, pwd) \n smtpServer.sendmail(user, to, msg.as_string()) \n smtpServer.close() \n
|
59 |
+
Except do nothing except: \n pass \n
|
60 |
If handle is equal to None or tgt is equal to None or user is equal to None or pwd is equal to None call the function exit with argument 0 if handle == None or tgt == None or user ==None or pwd==None: \n exit(0) \n
|
61 |
"If location is not equal to None assign the result of the function choice with argument location to randLoc and concatenate the concatenation of "" Its me from "", randLoc and ""."" to spamMsg" "if (location!=None): \n randLoc=choice(location) \n spamMsg += "" Its me from ""+randLoc+""."" \n"
|
62 |
"If interests with key 'users' is not equal to None assign to randUser the result of the function choice with argument interests with key 'users' and concatenate the concatenation of "" "", randUser and "" said to say hello."" to spamMsg" "if (interests['users']!=None): \n randUser=choice(interests['users']) \n spamMsg += "" ""+randUser+"" said to say hello."" \n"
|
|
|
89 |
Start except block with Exception and e then do nothing except Exception, e: \n pass
|
90 |
Try to connect to hostname with FTP protocol, with credentials 'anonymous' and '[email protected]', quit the connection and then return True try: \n ftp = ftplib.FTP(hostname) \n ftp.login('anonymous', '[email protected]') \n ftp.quit() \n return True \n
|
91 |
"Connect to the database skypeDB and execute the command ""SELECT datetime(begin_timestamp,'unixepoch'), identity FROM calls, conversations WHERE calls.conv_dbid = conversations.id;""" "def printCallLog(skypeDB): \n conn = sqlite3.connect(skypeDB) \n c = conn.cursor() \n c.execute(""SELECT datetime(begin_timestamp,'unixepoch'), identity FROM calls, conversations WHERE calls.conv_dbid = conversations.id;"" \n"
|
92 |
+
Except do nothing except: \n pass
|
93 |
If host is equals to None or passDir is equals to None or User is equals to None then call function exit with argument 0 if host == None or passDir == None or user == None: \n exit(0)
|
94 |
Expect Exit the function with sid value except: \n return sid
|
95 |
If downloadDB is a file Call the function printDownloads with argument downloadDB if os.path.isfile(downloadDB): \n printDownloads(downloadDB)
|
|
|
103 |
If the substring '!lazor' is in data of tcp in lower case do nothing if '!lazor' in tcp.data.lower(): \n pass
|
104 |
Else call the function printLinks with argument url else: \n printLinks(url)
|
105 |
Except do nothing except: \n pass
|
106 |
+
Else print metadata information associated with the given fileName else: \n printMeta(fileName)
|
107 |
Else assign to dst the tgt of options else: \n dst = options.tgt
|
108 |
"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
|
109 |
Try to call the method connect with a tuple made of target and 21 of s try: \n s.connect((target,21))
|