Skip to content

Commit abe6e8a

Browse files
authored
Merge pull request #56 from DedSecInside/dev
TorBot Stable Version1.2
2 parents 4b96f9c + 0311b39 commit abe6e8a

23 files changed

+696
-496
lines changed

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
modules/__pycache__/
2+
.cache
23
.*.swp
4+
.ropeproject/
5+
modules/.ropeproject/
6+
tests/__pycache__/
7+
modules/__init__.py
8+
.idea/
9+
tests/.ropeproject/

.travis.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ python:
66
- "3.5"
77
# command to install dependencies
88
install:
9-
- cd tests
109
- sudo apt-get -y install python3-pip
11-
- pip3 install bs4
10+
- pip3 install -r requirements.txt
11+
- cd tests
1212
script:
13-
- python3 test_getemails.py
14-
- python3 test_getweblinks.py
15-
- python3 test_savetofile.py
13+
- pytest
1614
notifications:
1715
slack: dedsec-inside:24NHg47gypeVR3DWnEncRq7c

CHANGELOG.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,28 @@
22
--------------------
33
All notable changes to this project will be documented in this file.
44

5-
## 1.2.0 | (Currently in Development)
5+
## 1.2.0 | Present (Stable)
6+
7+
### Changed
8+
* Major code improvements
9+
* Pep 8 Standard
10+
* Tests
11+
* Library changes
612

713
### Added
14+
* Documentation
815
* Save to JSON
916
* Testcase for Save to JSON
1017

11-
## 1.1.0 - July 6, 2017 - Present
18+
## 1.1.0 - July 6, 2017 - Nov 16
1219

1320
### Added
1421

1522
* Updater
1623
* Version checker
24+
* Refactored code to meet PEP8 requirements
25+
* Refactored code to meet Google Style Docstrings for documentation
26+
* Fixed error occuring while using -i flag
1727

1828
## 1.0.0 - Jun 28, 2017 - July 5
1929

CODE_OF_CONDUCT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe
3434

3535
## Enforcement
3636

37-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at dedsecinside@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at thepsnappz@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
3838

3939
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
4040

README.md

+80-69
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
11
<pre>
22

33

4-
████████╗ ██████╗ ██████╗ ██████╗ ██████╗ ████████╗
5-
╚══██╔══╝██╔═══██╗██╔══██╗ ██╔══██╗██╔═████╗╚══██╔══╝
6-
██║ ██║ ██║██████╔╝ ██████╔╝██║██╔██║ ██║
7-
██║ ██║ ██║██╔══██╗ ██╔══██╗████╔╝██║ ██║
8-
██║ ╚██████╔╝██║ ██║ ██████╔╝╚██████╔╝ ██║
9-
╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝
4+
████████╗ ██████╗ ██████╗ ██████╗ ██████╗ ████████╗
5+
╚══██╔══╝██╔═══██╗██╔══██╗ ██╔══██╗██╔═████╗╚══██╔══╝
6+
██║ ██║ ██║██████╔╝ ██████╔╝██║██╔██║ ██║
7+
██║ ██║ ██║██╔══██╗ ██╔══██╗████╔╝██║ ██║
8+
██║ ╚██████╔╝██║ ██║ ██████╔╝╚██████╔╝ ██║
9+
╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝
1010

11-
12-
13-
`.` `
14-
``.:.--.`
15-
.-+++/-`
16-
`+sso:`
17-
`` /yy+.
18-
-+.oho.
19-
o../+y
20-
-s.-/:y:`
21-
.:o+-`--::oo/-`
22-
`/o+:.```---///oss+-
23-
.+o:.``...`-::-+++++sys-
24-
:y/```....``--::-yooooosh+
25-
-h-``--.```..-:-::ssssssssd+
26-
h:``:.``....`--:-++hsssyyyym.
27-
.d.`/.``--.```:--//odyyyyyyym/
28-
`d.`+``:.```.--/-+/smyyhhhhhm:
29-
os`./`/````/`-/:+oydhhhhhhdh`
30-
`so.-/-:``./`.//osmddddddmd.
31-
/s/-/:/.`/..+/ydmdddddmo`
32-
`:oosso/:+/syNmddmdy/.
33-
`-/++oosyso+/.`
34-
35-
36-
██████╗ ███████╗██████╗ ███████╗██████╗ ██████╗ ██╗███╗ ██╗███████╗██╗██████╗ ███████╗
37-
██╔══██╗██╔════╝██╔══██╗██╔════╝╚════██╗██╔════╝ ██║████╗ ██║██╔════╝██║██╔══██╗██╔════╝
38-
██║ ██║█████╗ ██║ ██║███████╗ █████╔╝██║ ██║██╔██╗ ██║███████╗██║██║ ██║█████╗
39-
██║ ██║██╔══╝ ██║ ██║╚════██║ ╚═══██╗██║ ██║██║╚██╗██║╚════██║██║██║ ██║██╔══╝
40-
██████╔╝███████╗██████╔╝███████║██████╔╝╚██████╗ ██║██║ ╚████║███████║██║██████╔╝███████╗
41-
╚═════╝ ╚══════╝╚═════╝ ╚══════╝╚═════╝ ╚═════╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚═╝╚═════╝ ╚══════╝
11+
12+
13+
`.` `
14+
``.:.--.`
15+
.-+++/-`
16+
`+sso:`
17+
`` /yy+.
18+
-+.oho.
19+
o../+y
20+
-s.-/:y:`
21+
.:o+-`--::oo/-`
22+
`/o+:.```---///oss+-
23+
.+o:.``...`-::-+++++sys-
24+
:y/```....``--::-yooooosh+
25+
-h-``--.```..-:-::ssssssssd+
26+
h:``:.``....`--:-++hsssyyyym.
27+
.d.`/.``--.```:--//odyyyyyyym/
28+
`d.`+``:.```.--/-+/smyyhhhhhm:
29+
os`./`/````/`-/:+oydhhhhhhdh`
30+
`so.-/-:``./`.//osmddddddmd.
31+
/s/-/:/.`/..+/ydmdddddmo`
32+
`:oosso/:+/syNmddmdy/.
33+
`-/++oosyso+/.`
34+
35+
36+
██████╗ ███████╗██████╗ ███████╗██████╗ ██████╗ ██╗███╗ ██╗███████╗██╗██████╗ ███████╗
37+
██╔══██╗██╔════╝██╔══██╗██╔════╝╚════██╗██╔════╝ ██║████╗ ██║██╔════╝██║██╔══██╗██╔════╝
38+
██║ ██║█████╗ ██║ ██║███████╗ █████╔╝██║ ██║██╔██╗ ██║███████╗██║██║ ██║█████╗
39+
██║ ██║██╔══╝ ██║ ██║╚════██║ ╚═══██╗██║ ██║██║╚██╗██║╚════██║██║██║ ██║██╔══╝
40+
██████╔╝███████╗██████╔╝███████║██████╔╝╚██████╗ ██║██║ ╚████║███████║██║██████╔╝███████╗
41+
╚═════╝ ╚══════╝╚═════╝ ╚══════╝╚═════╝ ╚═════╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚═╝╚═════╝ ╚══════╝
4242

4343

4444

4545
</pre>
4646

4747
## A python web crawler for Deep and Dark Web.
4848
[![Build Status](https://travis-ci.org/DedSecInside/TorBoT.svg?branch=master)](https://travis-ci.org/DedSecInside/TorBoT)
49-
[![](https://img.shields.io/badge/Donate-Bitcoin-blue.svg?style=flat-square)](https://blockchain.info/address/14st7SzDbQZuu8fpQ74x477WoRJ7gpHFaj)
50-
[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://forthebadge.com)
51-
[![forthebadge](http://forthebadge.com/images/badges/made-with-python.svg)](http://forthebadge.com)
49+
[![](https://img.shields.io/badge/Donate-Bitcoin-blue.svg?style=flat)](https://blockchain.info/address/14st7SzDbQZuu8fpQ74x477WoRJ7gpHFaj)
50+
[![](https://img.shields.io/badge/Built%20with-❤-orange.svg?style=flat)]()
51+
[![](https://img.shields.io/badge/Made%20with-Python-red.svg?style=flat)]()
5252

5353

5454
### Working Procedure/Basic Plan
@@ -65,62 +65,69 @@ the following steps:
6565
8. After all URLs are processed, return the most relevant page.
6666

6767
### Features
68-
1. Crawls Tor links (.onion) only.
69-
2. Returns Page title and address.
70-
3. Cache links so that there won't be duplicate links.
68+
1. Crawls Tor links (.onion).(Completed)
69+
2. Returns Page title and address with a short description about the site.(Not Started)
70+
3. Save links to database.(Not Started)
71+
4. Get emails from site.(Completed)
72+
5. Save crawl info to JSON file.(Completed)
73+
6. Crawl custom domains.(Completed)
74+
7. Check if the link is live.(Not Started)
75+
8. Built-in Updater.(Completed)
7176
...(will be updated)
7277

7378
## Contribute
7479
Contributions to this project are always welcome.
75-
To add a new feature fork this repository and give a pull request when your new feature is tested and complete.
80+
To add a new feature fork the dev branch and give a pull request when your new feature is tested and complete.
7681
If its a new module, it should be put inside the modules directory and imported to the main file.
7782
The branch name should be your new feature name in the format <Feature_featurename_version(optional)>. For example, <i>Feature_FasterCrawl_1.0</i>.
7883
Contributor name will be updated to the below list. :D
7984

8085
## Dependencies
8186
1. Tor
82-
2. Python 3.x (Make sure pip3 is there)
83-
3. Python Stem Module
84-
4. urllib
85-
5. Beautiful Soup 4
86-
6. Socket
87-
7. Sock
88-
8. Argparse
89-
9. Stem module
90-
10. Git
87+
2. Python 3.x (Make sure pip3 is installed)
88+
3. requests
89+
4. Beautiful Soup 4
90+
5. Socket
91+
6. Sock
92+
7. Argparse
93+
8. Git
94+
9. termcolor
95+
10. tldextract
9196

9297
## Basic setup
9398
Before you run the torBot make sure the following things are done properly:
9499

95100
* Run tor service
96101
`sudo service tor start`
97102

98-
* Set a password for tor
99-
`tor --hash-password "my_password" `
100-
101-
* Give the password inside torbot.py
102-
`from stem.control import Controller
103-
with Controller.from_port(port = 9051) as controller:
104-
controller.authenticate("your_password_hash")
105-
controller.signal(Signal.NEWNYM)`
103+
* Make sure that your torrc is configured to SOCKS_PORT localhost:9050
106104

107-
`python3 torBot.py`
108-
`usage: torBot.py [-h] [-q] [-u URL] [-m] [-e EXTENSION] [-l]
105+
`python3 torBot.py or use the -h/--help argument`
106+
<pre>
107+
`usage: torBot.py [-h] [-v] [--update] [-q] [-u URL] [-s] [-m] [-e EXTENSION]
108+
[-l] [-i]
109109

110110
optional arguments:
111-
-h, --help show this help message and exit
112-
-q, --quiet
113-
-u URL, --url URL Specifiy a website link to crawl
111+
-h, --help Show this help message and exit
112+
-v, --version Show current version of TorBot.
113+
--update Update TorBot to the latest stable version
114+
-q, --quiet Prevent header from displaying
115+
-u URL, --url URL Specifiy a website link to crawl, currently returns links on that page
116+
-s, --save Save results to a file in json format
114117
-m, --mail Get e-mail addresses from the crawled sites
115118
-e EXTENSION, --extension EXTENSION
116119
Specifiy additional website extensions to the
117120
list(.com or .org etc)
118-
-l, --live Check if websites are live or not (slow)`
121+
-l, --live Check if websites are live or not (slow)
122+
-i, --info Info displays basic info of the scanned site (very
123+
slow)` </pre>
124+
125+
* NOTE: All flags under -u URL, --url URL must also be passed a -u flag.
119126

120127
Read more about torrc here : [Torrc](https://github.com/DedSecInside/TorBoT/blob/master/Tor.md)
121128

122129
## TO-DO
123-
A TO-DO list will be added here as soon as its complete.
130+
- [ ] Implement A\* Search for webcrawler
124131

125132
### Have ideas?
126133
If you have new ideas which is worth implementing, mention those by starting a new issue with the title [FEATURE_REQUEST].
@@ -133,7 +140,11 @@ GNU Public License
133140

134141
- [X] [P5N4PPZ](https://github.com/PSNAppz) - Owner
135142
- [X] [agrepravin](https://github.com/agrepravin) - Contributor,Reviewer
136-
- [X] [y-mehta](https://github.com/y-mehta) - Contributer
143+
- [X] [y-mehta](https://github.com/y-mehta) - Contributor
144+
- [X] [Manfredi Martorana](https://github.com/Agostinelli) - Contributor
145+
- [X] [KingAkeem](https://github.com/KingAkeem) - Contributor
146+
- [X] [Evan Sia Wai Suan](https://github.com/waisuan) - New Contributor
147+
137148

138149
![](https://upload.wikimedia.org/wikipedia/commons/thumb/4/42/Opensource.svg/200px-Opensource.svg.png)
139150

Resources And Samples/torConnectionExample.py

-56
This file was deleted.

modules/__init__.py

-9
This file was deleted.

modules/__init__.pyc

-150 Bytes
Binary file not shown.

modules/bcolors.py

+13-15
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
__all__ = ['Bcolors']
2-
3-
41
class Bcolors:
5-
HEADER = '\033[95m'
6-
OKBLUE = '\033[94m'
7-
OKGREEN = '\033[92m'
8-
WARNING = '\033[93m'
9-
FAIL = '\033[91m'
10-
ENDC = '\033[0m'
11-
BOLD = '\033[1m'
12-
UNDERLINE = '\033[4m'
13-
WHITE = '\033[97m'
14-
On_Black = '\033[40m'
15-
On_Red = '\033[41m'
16-
2+
3+
def __init__(self):
4+
self.HEADER = '\033[95m'
5+
self.OKBLUE = '\033[94m'
6+
self.OKGREEN = '\033[92m'
7+
self.WARNING = '\033[93m'
8+
self.FAIL = '\033[91m'
9+
self.ENDC = '\033[0m'
10+
self.BOLD = '\033[1m'
11+
self.UNDERLINE = '\033[4m'
12+
self.WHITE = '\033[97m'
13+
self.On_Black = '\033[40m'
14+
self.On_Red = '\033[41m'

modules/bcolors.pyc

-670 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)