Skip to content

Commit ecac147

Browse files
authored
Merge pull request #157 from DedSecInside/v1.3.3
V1.3.3
2 parents 27751ad + 0b5d0a2 commit ecac147

File tree

3 files changed

+31
-24
lines changed

3 files changed

+31
-24
lines changed

modules/info.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from requests.exceptions import HTTPError
66
import requests
77
from requests import get
8-
8+
import re
99
from .link_io import LinkIO
1010

1111

@@ -32,10 +32,10 @@ def execute_all(link, *, display_status=False):
3232
page,response = LinkIO.read(link, response=True, show_msg=display_status)
3333
response = get(link, verify=False).text
3434
soup = BeautifulSoup(page, 'html.parser')
35-
validation_functions = [get_robots_txt, get_dot_git, get_dot_svn, get_dot_git, get_intel]
35+
validation_functions = [get_robots_txt, get_dot_git, get_dot_svn, get_dot_git, get_intel, get_bitcoin_address]
3636
for validate_func in validation_functions:
3737
try:
38-
validate_func(link,response)
38+
validate_func(link, response)
3939
except (ConnectionError, HTTPError):
4040
cprint('Error', 'red')
4141

@@ -68,15 +68,15 @@ def get_robots_txt(target,response):
6868
cprint("Robots.txt found",'blue')
6969
print(robots)
7070

71+
7172
def get_intel(link,response):
7273
intel=set()
7374
matches = findall(r'''([\w\.-]+s[\w\.-]+\.amazonaws\.com)|([\w\.-]+@[\w\.-]+\.[\.\w]+)''', response)
75+
print("Intel\n--------\n\n")
7476
if matches:
7577
for match in matches:
76-
verb('Intel', match)
7778
intel.add(match)
78-
print("Intel\n--------\n\n %s")
79-
print(intel)
79+
8080

8181
def get_dot_git(target,response):
8282
cprint("[*]Checking for .git folder", 'yellow')
@@ -91,6 +91,13 @@ def get_dot_git(target,response):
9191
cprint("NO .git folder found", 'blue')
9292

9393

94+
def get_bitcoin_address(target, response):
95+
bitcoins = re.findall(r'^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$', response)
96+
print("BTC FOUND: ", len(bitcoins))
97+
for bitcoin in bitcoins:
98+
print("BTC: ", bitcoin)
99+
100+
94101
def get_dot_svn(target,response):
95102
cprint("[*]Checking for .svn folder", 'yellow')
96103
url = target
@@ -121,13 +128,10 @@ def get_dot_htaccess(target,response):
121128

122129

123130
def display_webpage_description(soup):
124-
cprint("[*]Checking for description meta tag", 'yellow')
131+
cprint("[*]Checking for meta tag", 'yellow')
125132
metatags = soup.find_all('meta')
126133
for meta in metatags:
127-
if meta.has_attr('name'):
128-
attributes = meta.attrs
129-
if attributes['name'] == 'description':
130-
cprint("Page description: " + attributes['content'])
134+
print("Meta : ",meta)
131135

132136

133137
def writer(datasets, dataset_names, output_dir):

modules/link.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import requests
88
import requests.exceptions
99
import validators
10-
10+
import re
1111
from bs4 import BeautifulSoup
1212
from .utils import multi_thread
1313
from .color import color
@@ -21,12 +21,11 @@ def get_emails(node):
2121
emails (list): list of emails
2222
"""
2323
emails = []
24-
for child in node.children:
25-
link = child.get('href')
26-
if link and 'mailto' in link:
27-
email_addr = link.split(':')
28-
if LinkNode.valid_email(email_addr[1]) and len(email_addr) > 1:
29-
emails.append(email_addr[1])
24+
response = node.response.text
25+
mails = re.findall(r'[\w\.-]+@[\w\.-]+', response)
26+
for email in mails:
27+
if LinkNode.valid_email(email):
28+
emails.append(email)
3029
return emails
3130

3231

torBot.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
DEFPORT = 9050
2121

2222
# TorBot VERSION
23-
__VERSION = "1.3.1"
23+
__VERSION = "1.3.3"
2424

2525

2626
def connect(address, port):
@@ -78,7 +78,7 @@ def header():
7878
title = r"""
7979
{banner}
8080
#######################################################
81-
# TorBot - An OSINT Tool for Deep Web #
81+
# TorBot - An OSINT Tool for Dark Web #
8282
# GitHub : https://github.com/DedsecInside/TorBot #
8383
# Help : use -h for help text #
8484
#######################################################
@@ -114,6 +114,7 @@ def get_args():
114114
parser.add_argument("-i", "--info", action="store_true",
115115
help=' '.join(("Info displays basic info of the",
116116
"scanned site")))
117+
parser.add_argument("--depth", help="Specifiy max depth of crawler (default 1)")
117118
parser.add_argument("-v", "--visualize", action="store_true",
118119
help="Visualizes tree of data gathered.")
119120
parser.add_argument("-d", "--download", action="store_true",
@@ -152,14 +153,17 @@ def main():
152153
if args.save:
153154
saveJson('Emails', node.emails)
154155
# -i/--info
155-
elif args.info:
156+
if args.info:
156157
execute_all(node.uri)
157158
if args.save:
158159
print('Nothing to save.\n')
159-
elif args.visualize:
160-
tree = LinkTree(node, stop_depth=1)
160+
if args.visualize:
161+
if args.depth:
162+
tree = LinkTree(node, stop_depth=args.depth)
163+
else:
164+
tree = LinkTree(node)
161165
tree.show()
162-
elif args.download:
166+
if args.download:
163167
tree = LinkTree(node)
164168
file_name = str(input("File Name (.pdf/.png/.svg): "))
165169
tree.save(file_name)

0 commit comments

Comments
 (0)