Renamed BrowseWarningPaste into alertHandler

pull/151/head
Sami Mokaddem 2017-11-15 16:15:43 +01:00
parent ec7d2d49b2
commit 652b00f4b2
12 changed files with 26 additions and 28 deletions

View File

@ -99,8 +99,8 @@ if __name__ == "__main__":
publisher.warning(to_print)
#Send to duplicate
p.populate_set_out(filepath, 'Duplicate')
#Send to BrowseWarningPaste
p.populate_set_out('credential;{}'.format(filepath), 'BrowseWarningPaste')
#Send to alertHandler
p.populate_set_out('credential;{}'.format(filepath), 'alertHandler')
#Put in form, count occurences, then send to moduleStats
creds_sites = {}

View File

@ -79,7 +79,7 @@ if __name__ == "__main__":
#Send to duplicate
p.populate_set_out(filename, 'Duplicate')
#send to Browse_warning_paste
p.populate_set_out('creditcard;{}'.format(filename), 'BrowseWarningPaste')
p.populate_set_out('creditcard;{}'.format(filename), 'alertHandler')
else:
publisher.info('{}CreditCard related;{}'.format(to_print, paste.p_path))
else:

View File

@ -32,7 +32,7 @@ def search_cve(message):
publisher.warning('{} contains CVEs'.format(paste.p_name))
#send to Browse_warning_paste
p.populate_set_out('cve;{}'.format(filepath), 'BrowseWarningPaste')
p.populate_set_out('cve;{}'.format(filepath), 'alertHandler')
#Send to duplicate
p.populate_set_out(filepath, 'Duplicate')

View File

@ -26,7 +26,7 @@ def search_gpg(message):
#Send to duplicate
p.populate_set_out(message, 'Duplicate')
#send to Browse_warning_paste
p.populate_set_out('keys;{}'.format(message), 'BrowseWarningPaste')
p.populate_set_out('keys;{}'.format(message), 'alertHandler')
if __name__ == '__main__':

View File

@ -170,7 +170,7 @@ function launching_scripts {
sleep 0.1
screen -S "Script" -X screen -t "SQLInjectionDetection" bash -c './SQLInjectionDetection.py; read x'
sleep 0.1
screen -S "Script" -X screen -t "BrowseWarningPaste" bash -c './BrowseWarningPaste.py; read x'
screen -S "Script" -X screen -t "alertHandler" bash -c './alertHandler.py; read x'
sleep 0.1
screen -S "Script" -X screen -t "SentimentAnalysis" bash -c './SentimentAnalysis.py; read x'

View File

@ -72,7 +72,7 @@ if __name__ == "__main__":
publisher.warning(to_print)
#Send to duplicate
p.populate_set_out(filename, 'Duplicate')
p.populate_set_out('mail;{}'.format(filename), 'BrowseWarningPaste')
p.populate_set_out('mail;{}'.format(filename), 'alertHandler')
else:
publisher.info(to_print)

View File

@ -145,7 +145,7 @@ if __name__ == "__main__":
PST.p_name)
for url in fetch(p, r_cache, urls, domains_list, path):
publisher.warning('{}Checked {};{}'.format(to_print, url, PST.p_path))
p.populate_set_out('onion;{}'.format(PST.p_path), 'BrowseWarningPaste')
p.populate_set_out('onion;{}'.format(PST.p_path), 'alertHandler')
else:
publisher.info('{}Onion related;{}'.format(to_print, PST.p_path))

View File

@ -33,7 +33,7 @@ def search_phone(message):
print results
publisher.warning('{} contains PID (phone numbers)'.format(paste.p_name))
#send to Browse_warning_paste
p.populate_set_out('phone;{}'.format(message), 'BrowseWarningPaste')
p.populate_set_out('phone;{}'.format(message), 'alertHandler')
#Send to duplicate
p.populate_set_out(message, 'Duplicate')
stats = {}

View File

@ -81,7 +81,7 @@ def analyse(url, path):
#Send to duplicate
p.populate_set_out(path, 'Duplicate')
#send to Browse_warning_paste
p.populate_set_out('sqlinjection;{}'.format(path), 'BrowseWarningPaste')
p.populate_set_out('sqlinjection;{}'.format(path), 'alertHandler')
else:
print "Potential SQL injection:"
print urllib2.unquote(url)

View File

@ -24,7 +24,7 @@ if __name__ == "__main__":
publisher.port = 6380
publisher.channel = "Script"
config_section = 'BrowseWarningPaste'
config_section = 'alertHandler'
p = Process(config_section)
@ -48,12 +48,10 @@ if __name__ == "__main__":
time.sleep(10)
continue
# Add in redis
# Add in redis for browseWarningPaste
# Format in set: WARNING_moduleName -> p_path
key = "WARNING_" + module_name
print key + ' -> ' + p_path
server.sadd(key, p_path)
publisher.info('Saved in warning paste {}'.format(p_path))
#print 'Saved in warning paste {}'.format(p_path)
publisher.info('Saved warning paste {}'.format(p_path))

View File

@ -72,6 +72,6 @@ screen -S "Script" -X screen -t "ModuleStats" bash -c './ModuleStats.py; read x'
sleep 0.1
screen -S "Script" -X screen -t "SQLInjectionDetection" bash -c './SQLInjectionDetection.py; read x'
sleep 0.1
screen -S "Script" -X screen -t "BrowseWarningPaste" bash -c './BrowseWarningPaste.py; read x'
screen -S "Script" -X screen -t "alertHandler" bash -c './alertHandler.py; read x'
sleep 0.1
screen -S "Script" -X screen -t "SentimentAnalysis" bash -c './SentimentAnalysis.py; read x'

View File

@ -49,16 +49,16 @@ publish = Redis_CreditCards,Redis_Mail,Redis_Onion,Redis_Web,Redis_Credential,Re
[CreditCards]
subscribe = Redis_CreditCards
publish = Redis_Duplicate,Redis_ModuleStats,Redis_BrowseWarningPaste
publish = Redis_Duplicate,Redis_ModuleStats,Redis_alertHandler
[Mail]
subscribe = Redis_Mail
publish = Redis_Duplicate,Redis_ModuleStats,Redis_BrowseWarningPaste
publish = Redis_Duplicate,Redis_ModuleStats,Redis_alertHandler
[Onion]
subscribe = Redis_Onion
publish = Redis_ValidOnion,ZMQ_FetchedOnion,Redis_BrowseWarningPaste
#publish = Redis_Global,Redis_ValidOnion,ZMQ_FetchedOnion,Redis_BrowseWarningPaste
publish = Redis_ValidOnion,ZMQ_FetchedOnion,Redis_alertHandler
#publish = Redis_Global,Redis_ValidOnion,ZMQ_FetchedOnion,Redis_alertHandler
[DumpValidOnion]
subscribe = Redis_ValidOnion
@ -72,17 +72,17 @@ subscribe = Redis_Url
[SQLInjectionDetection]
subscribe = Redis_Url
publish = Redis_BrowseWarningPaste,Redis_Duplicate
publish = Redis_alertHandler,Redis_Duplicate
[ModuleStats]
subscribe = Redis_ModuleStats
[BrowseWarningPaste]
subscribe = Redis_BrowseWarningPaste
[alertHandler]
subscribe = Redis_alertHandler
#[send_to_queue]
#subscribe = Redis_Cve
#publish = Redis_BrowseWarningPaste
#publish = Redis_alertHandler
[SentimentAnalysis]
subscribe = Redis_Global
@ -92,16 +92,16 @@ subscribe = Redis_Global
[Credential]
subscribe = Redis_Credential
publish = Redis_Duplicate,Redis_ModuleStats,Redis_BrowseWarningPaste
publish = Redis_Duplicate,Redis_ModuleStats,Redis_alertHandler
[Cve]
subscribe = Redis_Cve
publish = Redis_BrowseWarningPaste,Redis_Duplicate
publish = Redis_alertHandler,Redis_Duplicate
[Phone]
subscribe = Redis_Global
publish = Redis_Duplicate,Redis_BrowseWarningPaste
publish = Redis_Duplicate,Redis_alertHandler
[Keys]
subscribe = Redis_Global
publish = Redis_Duplicate,Redis_BrowseWarningPaste
publish = Redis_Duplicate,Redis_alertHandler