88
99Optional arguments:
1010- --dns-twist : Check the twisted keywords found in dns_twisted.yaml
11- - --file-dir : Directory to use for interesting files detected (default: ./InterestingFiles/)
12- - --kit-dir : Directory to use for phishing kits detected (default: ./KitJackinSeason/)
11+ - --directory : Save data to CAP_DIR (default: ./Captures/)
1312- --level : Recursion depth (default=1, infinite=0)
1413- --log-nc : File to store domains that have not been checked
1514- --quiet : Don't show wget output
1615- --score : Minimum score to trigger a session (Default: 75)
1716- --threads : Numbers of threads to spawn
18- - --timeout : Set time to wait for a connection
17+ - --timeout : Set the connection timeout to TIMEOUT
1918- --tor : Download files via the Tor network
2019- --verbose : Show domains being scored
2120- --very-verbose : Show error messages
2221
2322Usage:
2423```
25- python aa_certstream.py [--dns-twist] [--file-dir] [--kit-dir ] [--level] [--log-nc] [--quiet] [--score] [--threads] [--timeout] [--tor] [--verbose] [--very-verbose]
24+ python aa_certstream.py [--dns-twist] [--directory ] [--level] [--log-nc] [--quiet] [--score] [--threads] [--timeout] [--tor] [--verbose] [--very-verbose]
2625```
2726
2827Debugger: open("/tmp/aa.txt", "a").write("{}: <MSG>\n ".format(<VAR>))
5049 action = "store_true" ,
5150 required = False ,
5251 help = "Check the twisted keywords found in dns_twisted.yaml" )
53- parser .add_argument ("--file-dir " ,
54- dest = "file_dir " ,
55- default = "./InterestingFile /" ,
52+ parser .add_argument ("--directory " ,
53+ dest = "cap_dir " ,
54+ default = "./Captures /" ,
5655 required = False ,
57- help = "Directory to use for interesting files detected (default: ./InterestingFiles/)" )
58- parser .add_argument ("--kit-dir" ,
59- dest = "kit_dir" ,
60- default = "./KitJackinSeason/" ,
61- required = False ,
62- help = "Directory to use for phishing kits detected (default: ./KitJackinSeason/)" )
56+ help = "Download data to CAP_DIR (default: ./Captures)" )
6357parser .add_argument ("--level" ,
6458 dest = "level" ,
6559 default = 1 ,
9387 default = 30 ,
9488 required = False ,
9589 type = int ,
96- help = "Set time to wait for a connection " )
90+ help = "Set the connection timeout to TIMEOUT " )
9791parser .add_argument ("--tor" ,
9892 dest = "tor" ,
9993 action = "store_true" ,
109103 action = "store_true" ,
110104 required = False ,
111105 help = "Show error messages" )
112- args = parser . parse_args ()
113- uagent = "Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko"
106+ # Fix directory names
107+ args = commons . fix_directory ( parser . parse_args ())
114108
115109# Set threads to a minimum of 20 if using --dns-twist
116110if args .dns_twist and args .threads < 20 :
117111 args .threads = 20
118112
119- # Fix directory names
120- args = commons .fix_directory (args )
121-
122113tqdm .tqdm .monitor_interval = 0
123114
124115def callback (message , context ):
@@ -145,7 +136,7 @@ def callback(message, context):
145136
146137 pbar .update (1 )
147138
148- score = commons .score_domain (suspicious , domain .lower (), args )
139+ score = commons .score_domain (config , domain .lower (), args )
149140
150141 if "Let's Encrypt" in message ["data" ]["chain" ][0 ]["subject" ]["aggregated" ]:
151142 score += 10
@@ -215,27 +206,27 @@ def on_open(instance):
215206def main ():
216207 """ """
217208 global exclusions
218- global suspicious
209+ global config
219210 global url_queue
220211
221212 # Check if output directories exist
222213 commons .check_path (args )
223214
224215 # Print start messages
225216 commons .show_summary (args )
226- commons .show_networking (args , uagent )
217+ commons .show_networking (args ) # globals: proxies, torsocks
227218
228- # Read suspicious .yaml
229- suspicious = commons .read_suspicious (args )
219+ # Read config .yaml
220+ config = commons .read_config (args ) # globals: config
230221
231222 # Recompile exclusions
232- exclusions = commons .recompile_exclusions ()
223+ exclusions = commons .recompile_exclusions () # globals: exclusions
233224
234225 # Create queues
235226 url_queue = commons .create_queue ("url_queue" )
236227
237228 # Create threads
238- commons .UrlQueueManager (args , url_queue , uagent )
229+ commons .UrlQueueManager (args , url_queue )
239230
240231 # Listen for events via Certstream
241232 print (colored ("Connecting to Certstream...\n " , "yellow" , attrs = ["bold" ]))
0 commit comments