def decodeFromComplexMap(self, password, ciphertext, complexMap): try: full_data = ciphertext symbols14 = Config.getConfig('core', 'Utils', 'dictionaries', 'symbols14') full_lines = [] if not isinstance(complexMap, list): complexMap = ''.join(complexMap.split('\n')) chunks, chunk_size = len(complexMap), len(complexMap) // 16 complexMap = [ complexMap[i:i + chunk_size] for i in range(0, chunks, chunk_size) ] better_decoded = full_data for symb in symbols14: better_decoded = ' '.join(better_decoded.split(symb)) list_decoded = better_decoded.split(' ') count = 0 for row in range(int(len(list_decoded) / 2)): full_lines.append( [list_decoded[row + count], list_decoded[row + count + 1]]) count += 1 rss_decoded = [] for lines in full_lines: row_n = lines[0] char_n = lines[1] if row_n == '': row_n = -1 if char_n == '': char_n = -1 try: row_n = int(row_n) except: pass try: char_n = int(char_n) except: pass if not isinstance(row_n, int) or not isinstance(char_n, int): rss_decoded.append(row_n) else: rss_decoded.append(complexMap[row_n][char_n]) return self.decode(password, ''.join(rss_decoded)) except: return 'Bad password'
import hackingtools as ht import os, json # Image Metadata from PIL import Image # PDF Metadata from PyPDF2 import PdfFileReader, PdfFileWriter import pdfrw from pdfrw import PdfReader, PdfWriter # MP3 import eyed3 # import mutagen import os config = Config.getConfig(parentKey='modules', key='ht_metadata') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = 'set_pdf_metadata_to_another' def help(self): Logger.printMessage( message=ht.getFunctionsNamesFromModule('ht_metadata'), debug_module=True) def get_image_exif(self, filename): Logger.printMessage( message='{methodName}'.format(methodName='get_image_exif'),
from hackingtools.core import Logger, Utils, Config if Utils.amIdjango(__name__): from .library.core import hackingtools as ht else: import hackingtools as ht import os import requests, json config = Config.getConfig(parentKey='modules', key='ht_vehicle') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = 'searchIdentificationPlate' self.__gui_label__ = 'Vehicle Info Extractor' self._funcArgFromFunc_ = { '_functionName_': { '_functionParamName_': { '_moduleName_': '_functionName_' } } } self._mainUrl_ = 'https://motorgiga.com/personal/ajax' self._urlMatriculationDate_ = '{url}/getAntiguedadMatricula.php?tipo=actual&numeroMat={num}&letrasMat={chars}' self._urlIdentificationTag_ = '{url}/getEtiquetaEco.php?matricula={plate}' def help(self): Logger.printMessage( message=ht.getFunctionsNamesFromModule('ht_vehicle'),
from hackingtools.core import Logger, Utils, Config if Utils.amIdjango(__name__): from .library.core import hackingtools as ht else: import hackingtools as ht import os, time from scapy.all import IP, TCP, UDP, sr, RandShort config = Config.getConfig(parentKey='modules', key='ht_scapy') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = '' def help(self): Logger.printMessage(message=ht.getFunctionsNamesFromModule('ht_scapy'), debug_module=True) def __trace__(self, domain_or_ip): return sr(IP(dst=domain_or_ip, ttl=(1, 6), id=RandShort()) / TCP(flags=0x2), verbose=True) def traceroute(self, domain_or_ip): data = [] ht.worker('scapy-traceroute', 'ht.getModule("scapy").__trace__',
from hackingtools.core import Logger, Utils, Config from hackingtools.core.Objects import RequestHandler from hackingtools.core.Exceptions import IndexError, ConnectionTimeout, InvalidValue, QueryError, ParameterRequired import hackingtools as ht import os, requests, json, time, re from time import sleep from datetime import datetime from bs4 import BeautifulSoup import pandas as pd config = Config.getConfig(parentKey='modules', key='ht_twitter') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) BASE_URL = "https://twitter.com/" MOBILE_URL = "https://mobile.twitter.com/" TIMELINE_WITH_TOKEN_QUERY = "i/search/timeline?vertical=default&src=unkn&include_available_features=1&include_entities=1&max_position=%TOKEN%&reset_error_state=false&f=tweets&q=" class StartModule(): class __FFClass__: def __init__(self, username, avatar, fullname): """Data model for followers/followings Arguments: username {str} -- [description] user_id {int} -- [description] avatar {str} -- [description] fullname {str} -- [description] """ self.username = username self.avatar = avatar
from hackingtools.core import Logger, Utils, Config if Utils.amIdjango(__name__): from .library.core import hackingtools as ht else: import hackingtools as ht import os import requests from requests.auth import HTTPBasicAuth from urllib.parse import urljoin config = Config.getConfig(parentKey='modules', key='ht_qualys') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = '' self.__gui_label__ = 'Qualys Scanner' self.server = '' self.session = None self.auth = None self.cookies = None self.username = None self.password = None self.urls = {} self.urls['US1'] = 'https://qualysguard.com'
import hackingtools as ht import os import codecs import itertools import json import re import time import warnings from datetime import datetime from urllib import parse as urlparse from requests import RequestException from requests_html import HTML, HTMLSession config = Config.getConfig(parentKey='modules', key='ht_facebook') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) __base_url__ = 'https://m.facebook.com' __user_agent__ = ("Mozilla/5.0 (Windows NT 10.0; Win64; x64) " "AppleWebKit/537.36 (KHTML, like Gecko) " "Chrome/76.0.3809.87 Safari/537.36") __headers__ = {'User-Agent': __user_agent__, 'Accept-Language': 'en-US,en;q=0.5'} __session__ = None __timeout__ = None __likes_regex__ = re.compile(r'like_def[^>]*>([0-9,.]+)') __comments_regex__ = re.compile(r'cmt_def[^>]*>([0-9,.]+)') __shares_regex__ = re.compile(r'([0-9,.]+)\s+Shares') __link_regex__ = re.compile(r"href=\"https:\/\/lm\.facebook\.com\/l\.php\?u=(.+?)\&h=")
from hackingtools.core import Logger, Utils, Config if Utils.amIdjango(__name__): from .library.core import hackingtools as ht else: import hackingtools as ht import os from pyshorteners import Shortener config = Config.getConfig(parentKey='modules', key='ht_urlshortener') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = 'createShortcut' self._funcArgFromFunc_ = { 'createShortcut' : { 'domainShortener' : { 'urlshortener' : 'getShortDomains' } } } def help(self): Logger.printMessage(message=ht.getFunctionsNamesFromModule('ht_urlshortener'), debug_module=True) def createShortcut(self, url, fakeUrl, fakeText, domainShortener='tinyurl', api_key=None, user_id=None): try: short = Shortener(api_key=api_key, user_id=user_id) if domainShortener in short.available_shorteners:
from hackingtools.core import Logger, Utils, Config if Utils.amIdjango(__name__): from .library.core import hackingtools as ht else: import hackingtools as ht import os, socket config = Config.getConfig(parentKey='modules', key='ht_bannergrabber') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = 'grabPortBanner' def help(self): Logger.printMessage( message=ht.getFunctionsNamesFromModule('ht_bannergrabber'), debug_module=True) def grabPortBanner(self, ip, port): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: s.connect((str(ip), int(port))) s.settimeout(1) banner = s.recv(1024) return banner.decode().strip() except: return ''
from hackingtools.core import Logger, Utils, Config if Utils.amIdjango(__name__): from .library.core import hackingtools as ht else: import hackingtools as ht import os config = Config.getConfig(parentKey='modules', key='ht_fuzz') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = '' self._funcArgFromFunc_ = { '_functionName_' : { '_functionParamName_' : { '_moduleName_' : '_functionName_' } } } def help(self): Logger.printMessage(message=ht.getFunctionsNamesFromModule('ht_fuzz'), debug_module=True)
from hackingtools.core import Logger, Utils, Config if Utils.amIdjango(__name__): from .library.core import hackingtools as ht else: import hackingtools as ht import os config = Config.getConfig(parentKey='modules', key='ht_keylogger') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = '' def help(self): Logger.printMessage( message=ht.getFunctionsNamesFromModule('ht_keylogger'), debug_module=True)
from hackingtools.core import Logger, Utils, Config if Utils.amIdjango(__name__): from .library.core import hackingtools as ht else: import hackingtools as ht import os import requests import json config = Config.getConfig(parentKey='modules', key='ht_phising') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = 'search' self.__gui_label__ = 'Phising URLs Analyzer' self._funcArgFromFunc_ = { '_functionName_': { '_functionParamName_': { '_moduleName_': '_functionName_' } } } self.mainurl = 'https://safebrowsing.googleapis.com' self.esquema = '{url}/$discovery/rest'.format(url=self.mainurl) self.header = {'Content-Type': 'application/json'} response_schema = requests.get(self.esquema, headers=self.header)
from hackingtools.core import Logger, Utils, Config import hackingtools as ht import os import shutil from zipfile import ZipFile config = Config.getConfig(parentKey='modules', key='ht_unzip') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): Utils.emptyDirectory(output_dir) self._main_gui_func_ = 'extractFilePassword' def help(self): Logger.printMessage(message=ht.getFunctionsNamesFromModule('ht_unzip'), debug_module=True) def extractFilePassword(self, zipPathName, password='', posible_combinations=1, output_dir_new=None): #ZipFile only works with 7z with ZypCrypto encryption for setting the password try: Logger.printMessage(message="extractFilePassword", description='ZIP - {pwd} - {msg_posible_comb}: {com}'.format(pwd=password, msg_posible_comb=config['posible_combinations'], com=posible_combinations), debug_module=True) with ZipFile(zipPathName) as zf: zf.extractall(output_dir if not output_dir_new else output_dir_new, pwd=str.encode(password)) return password except Exception as e: Logger.printMessage(message="extractFilePassword", description='{e} - {p}'.format(e=str(e), p=password), is_error=True) return None def extractFile(self, zipPathName, password=None):
from hackingtools.core import Logger, Utils, Config if Utils.amIdjango(__name__): from .library.core import hackingtools as ht else: import hackingtools as ht import os import requests config = Config.getConfig(parentKey='modules', key='ht_abuseipdb') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = '' self.__gui_label__ = 'Abuse IP DB' self._funcArgFromFunc_ = { '_functionName_': { '_functionParamName_': { '_moduleName_': '_functionName_' } } } self.api_url = 'https://api.abuseipdb.com/api/v2/check' self.api = '' self.headers = {'Accept': 'application/json', 'Key': self.api}
from hackingtools.core import Logger, Utils, Config if Utils.amIdjango(__name__): from .library.core import hackingtools as ht else: import hackingtools as ht import os, sys, requests, json config = Config.getConfig(parentKey='modules', key='ht_finder') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = 'checkerOnline' self.__gui_label__ = 'Find an Alias Registered Anywhere' self.options = { 'facebook': self.__facebook__, 'twitter': self.__twitter__, 'instagram': self.__instagram__, 'medium': self.__medium__, 'github': self.__github__, 'bitbucket': self.__bitbucket__, } def help(self): Logger.printMessage( message=ht.getFunctionsNamesFromModule('ht_finder'), debug_module=True) def findAll(self, username): data = {}
from hackingtools.core import Logger, Utils, Config if Utils.amIdjango(__name__): from hackingtools.core import hackingtools as ht else: import hackingtools as ht import os config = Config.getConfig(parentKey='modules', key='ht_hash') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = 'hashContent' self.__gui_label__ = 'Hash Calculator' def help(self): Logger.printMessage(message=ht.getFunctionsNamesFromModule('ht_hash'), debug_module=True) def hashContent(self, content): try: content.lower() contador = 1 a = 23 b = 35 c = 36 d = 75 e = 72 f = 24
from hackingtools.core import Logger, Utils, Config import hackingtools as ht import os import time #import numpy config = Config.getConfig(parentKey='modules', key='ht_bruteforce') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): Utils.emptyDirectory(output_dir) self._main_gui_func_ = 'crackZip' def help(self): Logger.printMessage( message=ht.getFunctionsNamesFromModule('ht_bruteforce'), debug_module=True) def crackZip(self, zipPathName, unzipper=None, alphabet='lalpha', password_length=4, password_pattern=None, log=False): #max_length_posibilities = int(config['max_for_chunk']) if not unzipper: unzipper = ht.getModule('ht_unzip')
from hackingtools.core import Logger, Utils, Config if Utils.amIdjango(__name__): from .library.core import hackingtools as ht else: import hackingtools as ht import os import r2pipe config = Config.getConfig(parentKey='modules', key='ht_radare2') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = '' def help(self): Logger.printMessage(message=ht.getFunctionsNamesFromModule('ht_radare2'), debug_module=True) def getImports(self, filemon): try: r = r2pipe.open(filemon) # saca la tabla de dll importadas en json return r.cmd('iij') except Exception as e: return str(e)
from shodan import Shodan import requests import json import hackingtools as ht from hackingtools.core import Logger, Config import time from colorama import init, Fore import os import datetime config = Config.getConfig(parentKey='modules', key='ht_shodan') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = 'search_host' def help(self): Logger.printMessage( message=ht.getFunctionsNamesFromModule('ht_shodan'), debug_module=True) def __getShodanByAPI__(self, shodan_api='', session_id=None): if not shodan_api: return Shodan(ht.Config.getAPIKey('shodan_api', session_id)) return Shodan(shodan_api) def getIPListfromServices(self, serviceName, shodan_api=None): Logger.printMessage( message='{methodName}'.format(methodName='getIPListfromServices'),
2. **createStub** - Creates a file with the stub (decrypt functions and pk for rsa) included into the file for been 100% FUD (jump to section in [[ht_crypter.py#createStub]] ) #TODO MORE HEREEE """ from hackingtools.core import Logger, Config, Utils import hackingtools as ht import sys import os.path import math import base64 import shutil config = Config.getConfig(parentKey='modules', key='ht_crypter') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): # === __init__ === def __init__(self): Utils.emptyDirectory(output_dir) self._main_gui_func_ = 'crypt_file' # === help === def help(self): Logger.printMessage( message=ht.getFunctionsNamesFromModule('ht_crypter'),
from colorama import init, Fore import requests import urllib import json import binascii import os import hackingtools as ht from hackingtools.core import Config, Logger config = Config.getConfig(parentKey='modules', key='ht_sqlinjection') config_dict = Config.getConfig(parentKey='core', key='Utils', subkey='dictionaries') config_decrypt = Config.getConfig(parentKey='core', key='Utils', subkey='resources_cryptography_rest_api') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) url = '' cookie_session = '' param_focus = '' security = '' url_md5_decrypt = config_decrypt['md5_decrypt'] class StartModule(): def __init__(self): self._main_gui_func_ = None
from hackingtools.core import Logger, Utils, Config if Utils.amIdjango(__name__): from .library.core import hackingtools as ht else: import hackingtools as ht import os, requests config = Config.getConfig(parentKey='modules', key='ht_vulndb') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = '' self.headers = {'X-VulDB-ApiKey': ht.Config.getAPIKey('vulndb_api')} self.url = 'https://vulners.com/api/v3' self.options = { 'suggest': '/search/suggest/', 'search-cve': '/search/id/' } def help(self): Logger.printMessage( message=ht.getFunctionsNamesFromModule('ht_vulndb'), debug_module=True) def getAPI(self, vulndb_api=None, session_id=None): if not vulndb_api: return ht.Config.getAPIKey('vulndb_api', session_id) return vulndb_api
from hackingtools.core import Logger, Config, Utils import hackingtools as ht import nmap import os config = Config.getConfig(parentKey='modules', key='ht_nmap') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = 'getCVEsFromHost' def help(self): Logger.printMessage(message=ht.getFunctionsNamesFromModule('ht_nmap'), debug_module=True) def getConnectedDevices(self, ip): Logger.printMessage( message='{methodName}'.format(methodName='getConnectedDevices'), description='{param}'.format(param=ip), debug_module=True) nm = nmap.PortScanner() results = nm.scan(hosts=ip, arguments='-n -sP -PE -PA21,23,80,3389') if 'scan' in results: hosts = {} for host in results['scan']: if results['scan'][host]['status']['state'] == 'up': mac_address = None
from hackingtools.core import Logger, Utils, Config import hackingtools as ht import os import time import json from hashlib import md5 from virustotal_python import Virustotal config = Config.getConfig(parentKey='modules', key='ht_virustotal') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = 'isBadFile' self.__gui_label__ = 'Virustotal Search' def help(self): Logger.printMessage( message=ht.getFunctionsNamesFromModule('ht_virustotal'), debug_module=True) def isBadFileHash(self, fileHash, virustotal_api=None, session_id=None): try: if not virustotal_api: virustotal_api = ht.Config.getAPIKey('virustotal_api', session_id) self.vtotal = Virustotal(virustotal_api) resp = self.vtotal.file_report([fileHash]) if resp["status_code"] in (200, 204):
from hackingtools.core import Logger, Utils, Config if Utils.amIdjango(__name__): from .library.core import hackingtools as ht else: import hackingtools as ht import os import csv import json import xlsxwriter import xmltodict import xml.etree.ElementTree as ET import pandas as pd from pandas.io.json import json_normalize config = Config.getConfig(parentKey='modules', key='ht_parser') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = '' def help(self): Logger.printMessage( message=ht.getFunctionsNamesFromModule('ht_parser'), debug_module=True) def readFileToType(self, filename, typeToExport, typeOf=None,
from hackingtools.core import Logger, Utils, Config if Utils.amIdjango(__name__): from .library.core import hackingtools as ht else: import hackingtools as ht import os import binascii, base64 config = Config.getConfig(parentKey='modules', key='ht_rc4') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = '' self._funcArgFromFunc_ = { '_functionName_': { '_functionParamName_': { '_moduleName_': '_functionName_' } } } self.state = [None] * 256 self.p = None self.q = None def help(self): Logger.printMessage(message=ht.getFunctionsNamesFromModule('ht_rc4'), debug_module=True)
from hackingtools.core import Logger, Utils, Config if Utils.amIdjango(__name__): from .library.core import hackingtools as ht else: import hackingtools as ht import os import time import requests import datetime from bs4 import BeautifulSoup from io import StringIO import gzip config = Config.getConfig(parentKey='modules', key='ht_pastebin') output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'output')) class StartModule(): def __init__(self): self._main_gui_func_ = 'search_pastebin' def help(self): Logger.printMessage( message=ht.getFunctionsNamesFromModule('ht_pastebin'), debug_module=True) def search_pastebin(self, keywords, run_time=0, match_total=None,