forked from rndinfosecguy/Scavenger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
executable file
·56 lines (52 loc) · 2.5 KB
/
run.py
File metadata and controls
executable file
·56 lines (52 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import argparse
import os
import classes.utility
from datetime import datetime
from datetime import timedelta
#import matplotlib.pyplot as plt
tools = classes.utility.ScavUtility()
descr = """
_________
/ _____/ ____ _____ ___ __ ____ ____ ____ ___________
\_____ \_/ ___\\\\__ \\\\ \/ // __ \ / \ / ___\_/ __ \_ __ \\
/ \ \___ / __ \\\\ /\ ___/| | \/ /_/ > ___/| | \/
/_______ /\___ >____ /\_/ \___ >___| /\___ / \___ >__|
\/ \/ \/ \/ \//_____/ \/
"""
print(descr)
parser = argparse.ArgumentParser(description="Control software for the different modules of this paste crawler.")
parser.add_argument("-0", "--pastebinCOMapi", help="Activate Pastebin.com module (using API)", action="store_true")
parser.add_argument("-1", "--pastebinCOMtor", help="Activate Pastebin.com module (standard scraping using TOR to avoid IP blocking)", action="store_true")
parser.add_argument("-2", "--pasteORG", help="Activate Paste.org module", action="store_true")
#parser.add_argument("-ps", "--pStatistic", help="Show a simple statistic.", action="store_true")
args = parser.parse_args()
if args.pastebinCOMapi:
print("Pastebin.com (API mode): starting crawler in new tmux session...")
os.system("tmux new -d -s pastebincomCrawlerAPI 'python3 P_bot.py'")
if args.pastebinCOMtor:
print("Pastebin.com (Scraping mode): starting crawler in new tmux session...")
os.system("tmux new -d -s pastebincomCrawlerTOR 'python3 P_bot_TOR.py'")
if args.pasteORG:
print("Paste.org: starting crawler in new tmux session...")
os.system("tmux new -d -s pasteorgCrawler 'python3 pasteorg.py'")
#if args.pStatistic:
# print("Generating a simple statistic...")
# statisticvalues = tools.statisticscountpoints()
# #linelist = []
# #xlabellist = []
# #xlabellistText = []
# for value in statisticvalues:
# print(str(value[0]) + ": " + str(value[1]) + " breaches")
# #linelist.append(value[1])
# #xlabellist.append(value[0])
# day = datetime.utcfromtimestamp(value[0]).strftime('%Y-%m-%d')
# day = datetime.strptime(day, '%Y-%m-%d').date()
# day += timedelta(days=1)
# #xlabellistText.append(day)
# #print("Generating image...")
# #plt.xticks(xlabellist, xlabellistText)
# #plt.bar(xlabellist, linelist, width=86000, align="center")
# #plt.grid(True)
# #plt.title("DETECTED LEAKS PER DAY")
# #plt.ylabel("NUMBER OF LEAKS")
# #plt.show()