-
-
Notifications
You must be signed in to change notification settings - Fork 644
V1.3.3 #157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V1.3.3 #157
Changes from 5 commits
88b76f1
ba139e5
0b5b761
200e209
334f5df
5b1e2c2
38f10dd
d952408
2e4723e
9abb92b
0b5d0a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| from requests.exceptions import HTTPError | ||
| import requests | ||
| from requests import get | ||
|
|
||
| import re | ||
| from .link_io import LinkIO | ||
|
|
||
|
|
||
|
|
@@ -32,7 +32,7 @@ def execute_all(link, *, display_status=False): | |
| page,response = LinkIO.read(link, response=True, show_msg=display_status) | ||
| response = get(link, verify=False).text | ||
| soup = BeautifulSoup(page, 'html.parser') | ||
| validation_functions = [get_robots_txt, get_dot_git, get_dot_svn, get_dot_git, get_intel] | ||
| validation_functions = [get_robots_txt, get_dot_git, get_dot_svn, get_dot_git, get_intel,get_bitcoin_address] | ||
PSNAppz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| for validate_func in validation_functions: | ||
| try: | ||
| validate_func(link,response) | ||
|
|
@@ -71,12 +71,10 @@ def get_robots_txt(target,response): | |
| def get_intel(link,response): | ||
| intel=set() | ||
| matches = findall(r'''([\w\.-]+s[\w\.-]+\.amazonaws\.com)|([\w\.-]+@[\w\.-]+\.[\.\w]+)''', response) | ||
| print("Intel\n--------\n\n") | ||
| if matches: | ||
| for match in matches: | ||
| verb('Intel', match) | ||
| intel.add(match) | ||
| print("Intel\n--------\n\n %s") | ||
| print(intel) | ||
|
|
||
| def get_dot_git(target,response): | ||
| cprint("[*]Checking for .git folder", 'yellow') | ||
|
|
@@ -90,6 +88,12 @@ def get_dot_git(target,response): | |
| else: | ||
| cprint("NO .git folder found", 'blue') | ||
|
|
||
| def get_bitcoin_address(target,response): | ||
PSNAppz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| bitcoins = re.findall(r'^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$',response) | ||
PSNAppz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| print("BTC FOUND: ",len(bitcoins)) | ||
PSNAppz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| for bitcoin in bitcoins: | ||
| print("BTC: ",bitcoin) | ||
|
||
|
|
||
|
|
||
| def get_dot_svn(target,response): | ||
| cprint("[*]Checking for .svn folder", 'yellow') | ||
|
|
@@ -121,13 +125,10 @@ def get_dot_htaccess(target,response): | |
|
|
||
|
|
||
| def display_webpage_description(soup): | ||
| cprint("[*]Checking for description meta tag", 'yellow') | ||
| cprint("[*]Checking for meta tag", 'yellow') | ||
| metatags = soup.find_all('meta') | ||
| for meta in metatags: | ||
| if meta.has_attr('name'): | ||
| attributes = meta.attrs | ||
| if attributes['name'] == 'description': | ||
| cprint("Page description: " + attributes['content']) | ||
| print("Meta : ",meta) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing whitespace after ',' |
||
|
|
||
|
|
||
| def writer(datasets, dataset_names, output_dir): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,12 +21,11 @@ def get_emails(node): | |
| emails (list): list of emails | ||
| """ | ||
| emails = [] | ||
| for child in node.children: | ||
| link = child.get('href') | ||
| if link and 'mailto' in link: | ||
| email_addr = link.split(':') | ||
| if LinkNode.valid_email(email_addr[1]) and len(email_addr) > 1: | ||
| emails.append(email_addr[1]) | ||
| response = node.response.text | ||
| mails = re.findall(r'[\w\.-]+@[\w\.-]+', response) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. undefined name 're' |
||
| for email in mails: | ||
| if LinkNode.valid_email(email): | ||
| emails.append(email) | ||
| return emails | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,12 +15,16 @@ | |
| from modules.savefile import saveJson | ||
| from modules.info import execute_all | ||
|
|
||
| import sys | ||
|
||
| from socketserver import BaseServer | ||
PSNAppz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| from wsgiref import handlers | ||
PSNAppz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| # GLOBAL CONSTS | ||
| LOCALHOST = "127.0.0.1" | ||
| DEFPORT = 9050 | ||
|
|
||
| # TorBot VERSION | ||
| __VERSION = "1.3.1" | ||
| __VERSION = "1.3.3" | ||
|
|
||
|
|
||
| def connect(address, port): | ||
|
|
@@ -78,7 +82,7 @@ def header(): | |
| title = r""" | ||
| {banner} | ||
| ####################################################### | ||
| # TorBot - An OSINT Tool for Deep Web # | ||
| # TorBot - An OSINT Tool for Dark Web # | ||
| # GitHub : https://github.com/DedsecInside/TorBot # | ||
| # Help : use -h for help text # | ||
| ####################################################### | ||
|
|
@@ -114,6 +118,7 @@ def get_args(): | |
| parser.add_argument("-i", "--info", action="store_true", | ||
| help=' '.join(("Info displays basic info of the", | ||
| "scanned site"))) | ||
| parser.add_argument("--depth", help="Specifiy max depth of crawler (default 1)") | ||
PSNAppz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| parser.add_argument("-v", "--visualize", action="store_true", | ||
| help="Visualizes tree of data gathered.") | ||
| parser.add_argument("-d", "--download", action="store_true", | ||
|
|
@@ -152,14 +157,19 @@ def main(): | |
| if args.save: | ||
| saveJson('Emails', node.emails) | ||
| # -i/--info | ||
| elif args.info: | ||
| if args.info: | ||
| execute_all(node.uri) | ||
| if args.save: | ||
| print('Nothing to save.\n') | ||
| elif args.visualize: | ||
| tree = LinkTree(node, stop_depth=1) | ||
| if args.visualize: | ||
| if args.depth: | ||
| print(args.depth) | ||
| tree = LinkTree(node,stop_depth=args.depth) | ||
PSNAppz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| else: | ||
PSNAppz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| tree = LinkTree(node) | ||
| tree.show() | ||
| elif args.download: | ||
| if args.download: | ||
| tree = LinkTree(node) | ||
| file_name = str(input("File Name (.pdf/.png/.svg): ")) | ||
| tree.save(file_name) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.