Skip to content

Commit 52dada9

Browse files
committed
Better debugging
1 parent 87efff0 commit 52dada9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Substr3am.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def print_callback(message, context):
107107
session.commit()
108108

109109
# Debug line
110-
print(subdomain)
110+
print("[+] " + subdomain)
111111

112112
# It does exist
113113
if subdomain_exists:
@@ -118,6 +118,9 @@ def print_callback(message, context):
118118
session.query(Subdomain).filter(Subdomain.id == subdomain_exists.id).\
119119
update({'count': counter})
120120
session.commit()
121+
122+
if (counter % 50 == 0):
123+
print("[#] " + subdomain + " (seen " + str(counter) + " times)")
121124

122125

123126
def dump():
@@ -128,7 +131,7 @@ def dump():
128131
Session.configure(bind=engine)
129132
session = Session()
130133

131-
# Get all the subdomains from the DB
134+
# Get all the subdomains from the DB and sort them by popularity
132135
subdomains = session.execute("SELECT * FROM subdomains ORDER BY count DESC").fetchall()
133136

134137
# Assuming there's anything in the list...

0 commit comments

Comments
 (0)