diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..45a9dfd --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +data/ +logs/ +*.pyc +*.log \ No newline at end of file diff --git a/findSensitiveData.py b/findSensitiveData.py index a11a206..47acc58 100755 --- a/findSensitiveData.py +++ b/findSensitiveData.py @@ -4,7 +4,7 @@ from os import listdir from os.path import isfile, join import classes.utility -from colorama import Fore, Style +from colorama import Fore, Style, init as coloramainit raw_paste_folder = sys.argv[1] rawfiles = [f for f in listdir(raw_paste_folder) if isfile(join(raw_paste_folder, f))] @@ -12,6 +12,7 @@ gCount = 0 tools = classes.utility.ScavUtility() searchTerms = tools.loadSearchTerms() +coloramainit() # Needed to fix win10/11 terminal colors print(Fore.YELLOW + str(datetime.datetime.now()) + ": [+] Fetched files from " + raw_paste_folder + Style.RESET_ALL) diff --git a/pbincomArchiveScrape.py b/pbincomArchiveScrape.py index c4cc374..53e5f03 100644 --- a/pbincomArchiveScrape.py +++ b/pbincomArchiveScrape.py @@ -5,14 +5,14 @@ import requests from bs4 import BeautifulSoup, SoupStrainer import classes.utility -from colorama import Fore, Style +from colorama import Fore, Style, init as coloramainit iterator = 1 tools = classes.utility.ScavUtility() session = requests.session() headers = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Firefox/31.0"} searchTerms = tools.loadSearchTerms() - +coloramainit() # Needed to fix win10/11 terminal colors def getjuicystuff(tmpresponse): existscounter = 0 diff --git a/pbincomTrackUser.py b/pbincomTrackUser.py index 1369472..79af1f9 100644 --- a/pbincomTrackUser.py +++ b/pbincomTrackUser.py @@ -4,12 +4,13 @@ import requests import time import classes.utility -from colorama import Fore, Style +from colorama import Fore, Style, init as coloramainit tools = classes.utility.ScavUtility() session = requests.session() headers = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Firefox/31.0"} searchTerms = tools.loadSearchTerms() +coloramainit() # Needed to fix win10/11 terminal colors iterator = 1 while True: diff --git a/scavenger.py b/scavenger.py index afc6c0d..4450adf 100644 --- a/scavenger.py +++ b/scavenger.py @@ -1,8 +1,20 @@ import argparse import os -from colorama import Fore, Style +from colorama import Fore, Style, init as coloramainit import sys +def osType(): + osCheck=sys.platform + if osCheck == 'linux': + return "Linux" + elif osCheck == 'win32': + return "Windows" + elif osCheck == "darwin": + return "MacOS" + else: + return "Unknown" + + descr = Fore.YELLOW + """ _________ / _____/ ____ _____ ___ __ ____ ____ ____ ___________ @@ -10,51 +22,70 @@ / \ \___ / __ \\\\ /\ ___/| | \/ /_/ > ___/| | \/ /_______ /\___ >____ /\_/ \___ >___| /\___ / \___ >__| \/ \/ \/ \/ \//_____/ \/ Reworked -""" + Style.RESET_ALL + Detected OS: {} +""".format(osType()) + Style.RESET_ALL +coloramainit() # Needed to fix win10/11 terminal colors + 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", +parser.add_argument("-1", "--pbinAPI", + help="Activate " + Fore.GREEN + "Go Fast mode - Use pastebin.com API " + Style.RESET_ALL + "module", + action="store_true") +parser.add_argument("-2", "--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 " +parser.add_argument("-3", "--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", +parser.add_argument("-4", "--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", +parser.add_argument("-5", "--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 osType() == "Windows": + os.system("python3 pbincomArchiveScrape.py") + else: + 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 osType() == "Windows": + os.system("python3 pbincomTrackUser.py") + else: + 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") + if osType() == "Windows": + os.system("notepad configs/searchterms.txt") + else: + 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) + print(Fore.RED + "[-] -4/--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") + if osType() == "Windows": + os.system("notepad configs/users.txt") + else: + 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) + print(Fore.RED + "[-] -5/--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: ")