-
Notifications
You must be signed in to change notification settings - Fork 122
/
scavenger.py
65 lines (58 loc) · 3.16 KB
/
scavenger.py
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
57
58
59
60
61
62
63
64
65
import argparse
import os
from colorama import Fore, Style
import sys
descr = Fore.YELLOW + """
_________
/ _____/ ____ _____ ___ __ ____ ____ ____ ___________
\_____ \_/ ___\\\\__ \\\\ \/ // __ \ / \ / ___\_/ __ \_ __ \\
/ \ \___ / __ \\\\ /\ ___/| | \/ /_/ > ___/| | \/
/_______ /\___ >____ /\_/ \___ >___| /\___ / \___ >__|
\/ \/ \/ \/ \//_____/ \/ Reworked
""" + Style.RESET_ALL
print(descr)
parser = argparse.ArgumentParser(description="control script",
epilog="example usage: python3 " + sys.argv[0] + " -0 -1")
parser.add_argument("-0", "--pbincom",
help="Activate " + Fore.GREEN + "pastebin.com archive scraping " + Style.RESET_ALL + "module",
action="store_true")
parser.add_argument("-1", "--pbincomTrack",
help="Activate " + Fore.GREEN + "pastebin.com user track " + Style.RESET_ALL + "module",
action="store_true")
parser.add_argument("-2", "--sensitivedata", help="Search a specific folder for sensitive data. This might be useful "
"if you want to analyze some pastes which were not collected by the "
"bot.", action="store_true")
parser.add_argument("-3", "--editsearch",
help="Edit search terms file for additional search terms (email:password combinations will always be searched)",
action="store_true")
parser.add_argument("-4", "--editusers", help="Edit user file of the pastebin.com user track module",
action="store_true")
args = parser.parse_args()
if args.pbincom:
print(
Fore.GREEN + "[+] pastebin.com archive scraper: starting crawler in new tmux session named " + Fore.YELLOW +
"pastebincomArchive" + Fore.GREEN + "..." + Style.RESET_ALL)
os.system("tmux new -d -s pastebincomArchive 'python3 pbincomArchiveScrape.py'")
if args.pbincomTrack:
print(
Fore.GREEN + "[+] pastebin.com user track module: starting crawler in new tmux session named " + Fore.YELLOW
+ "pastebincomTrack" + Fore.GREEN + "..." + Style.RESET_ALL)
os.system("tmux new -d -s pastebincomTrack 'python3 pbincomTrackUser.py'")
if args.editsearch:
if not args.pbincomTrack and not args.pbincom and not args.editusers:
os.system("vi configs/searchterms.txt")
print("[#] If you changed anything, do not forget to restart the affected module!")
else:
print(Fore.RED + "[-] -3/--editsearch cannot be used with other arguments" + Style.RESET_ALL)
if args.editusers:
if not args.pbincomTrack and not args.pbincom and not args.editsearch:
os.system("vi configs/users.txt")
print("[#] If you changed anything, do not forget to restart the affected module!")
else:
print(Fore.RED + "[-] -4/--editusers cannot be used with other arguments" + Style.RESET_ALL)
if args.sensitivedata:
print(Fore.BLUE + "[*] Insert full path of the folder you want scan: ")
folder = input()
print(Style.RESET_ALL)
os.system("python3 findSensitiveData.py " + folder)
print()