Skip to content
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

TorBot Stable Version1.2 #56

Merged
merged 85 commits into from
Feb 12, 2018
Merged
Show file tree
Hide file tree
Changes from 84 commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
fa12a72
Merge pull request #35 from DedSecInside/master
PSNAppz Nov 16, 2017
6fdb04f
Update README.md
PSNAppz Nov 16, 2017
219fd49
configuration
PSNAppz Nov 18, 2017
773f0d9
ReadMe
PSNAppz Nov 25, 2017
6c8484e
ReadMe
PSNAppz Nov 25, 2017
b1b77e5
Merge branch 'info_feature_v0.0.1' of https://github.com/dedsecinside…
PSNAppz Nov 25, 2017
449692d
Fixing import
PSNAppz Nov 25, 2017
a9c6771
Fixing import
PSNAppz Nov 25, 2017
988cce3
Fixing Travis
PSNAppz Nov 25, 2017
e2aceca
Merge pull request #36 from DedSecInside/info_feature_v0.0.1
PSNAppz Nov 27, 2017
3bd9b01
Fixed requirements.txt by adding missing "="
KingAkeem Dec 23, 2017
695128e
Merge pull request #41 from KingAkeem/dev
PSNAppz Dec 23, 2017
56c45ae
fixed the error occurring when given a broken link with -u flag
Dec 23, 2017
8d8286f
Merge pull request #42 from Agostinelli/dev
PSNAppz Dec 24, 2017
f88f5af
PEP8 code and fixed some minor bugs
KingAkeem Jan 6, 2018
9c972be
Pep8 code and fixed tests
KingAkeem Jan 6, 2018
f5555e0
Adding Contributors
PSNAppz Jan 6, 2018
29b9334
Merge pull request #45 from DedSecInside/torBot_contributors
PSNAppz Jan 6, 2018
65415da
Merge pull request #44 from KingAkeem/dev
PSNAppz Jan 9, 2018
0889945
Update CODE_OF_CONDUCT.md
PSNAppz Jan 9, 2018
19d4112
Merge pull request #1 from DedSecInside/dev
KingAkeem Jan 10, 2018
a812592
Refactored code for connection to socket
KingAkeem Jan 10, 2018
74d6e42
Used regex to validate urls more thoroughly
KingAkeem Jan 10, 2018
4301fe2
Added validator to getweblinks and fixed tests
KingAkeem Jan 10, 2018
cc8c068
Updated README.md
KingAkeem Jan 10, 2018
601662b
Updated README.md
KingAkeem Jan 10, 2018
e2da315
Added documentation and refactored funcitons
KingAkeem Jan 11, 2018
b26eafc
Fixed savefile module for -s flag
KingAkeem Jan 11, 2018
94e0154
Fixed small errors
KingAkeem Jan 11, 2018
9701706
Fixed failing test
KingAkeem Jan 11, 2018
6870714
Merge pull request #46 from KingAkeem/dev
PSNAppz Jan 11, 2018
486423d
Removed samples
PSNAppz Jan 11, 2018
a7f963a
Merge pull request #2 from DedSecInside/dev
KingAkeem Jan 11, 2018
fe8b0a5
Changed testing framework from unittest to pytest
KingAkeem Jan 14, 2018
a9a100c
Merge branch 'dev' of https://github.com/KingAkeem/torBot into dev
KingAkeem Jan 14, 2018
e591b18
Merge pull request #50 from KingAkeem/dev
PSNAppz Jan 14, 2018
aed46cd
Fixed savetofile test
KingAkeem Jan 14, 2018
26bf850
Merge pull request #51 from KingAkeem/dev
PSNAppz Jan 14, 2018
ff56134
Update README.md
mamarto Jan 14, 2018
f97fb19
Update CHANGELOG.md
mamarto Jan 14, 2018
a8fe5c3
Update README.md
mamarto Jan 14, 2018
9382afe
Merge pull request #1 from Agostinelli/patch-1
mamarto Jan 14, 2018
d4da8fe
Merge pull request #52 from Agostinelli/dev
PSNAppz Jan 14, 2018
032d31e
Merge pull request #3 from DedSecInside/dev
KingAkeem Jan 14, 2018
50832cd
Tried to make flags more understandable
KingAkeem Jan 15, 2018
be5816e
Fixed markdown error with Note under flags
KingAkeem Jan 15, 2018
55342c6
Merge pull request #53 from KingAkeem/dev
PSNAppz Jan 15, 2018
3b3aede
Merge pull request #4 from DedSecInside/dev
KingAkeem Jan 19, 2018
696352d
Changed badges on README.md to be more consistent
mossbanay Feb 1, 2018
2dec998
Merge pull request #54 from leaen/dev
PSNAppz Feb 1, 2018
c59d4a0
Merge pull request #5 from DedSecInside/dev
KingAkeem Feb 1, 2018
f7fe163
Updated dependencies and todo list
KingAkeem Feb 1, 2018
557ebcc
Fixed small error with todo list
KingAkeem Feb 1, 2018
241e11b
I need coffee, another small fix
KingAkeem Feb 1, 2018
80a17ef
Resolving Conflicts
PSNAppz Feb 2, 2018
629cae8
Merge branch 'dev' of https://github.com/dedsecinside/torbot into dev
PSNAppz Feb 2, 2018
4a0073f
Minor fixes
PSNAppz Feb 2, 2018
4d9e91d
Fixed out-or-range err in getemails module (Issue #59)
Feb 5, 2018
d896e67
Merge pull request #60 from waisuan/dev
PSNAppz Feb 6, 2018
0a010d1
Added contributor (#63)
PSNAppz Feb 7, 2018
d2f9ef8
Fixed `-l` flag for finding live links.
KingAkeem Feb 8, 2018
b53b189
Merge branch 'dev' of https://github.com/KingAkeem/torBot into dev
KingAkeem Feb 8, 2018
3b1ca88
Fixed failing test
KingAkeem Feb 8, 2018
c934ae1
Updated dependencies and todo list
KingAkeem Feb 1, 2018
9512fff
Fixed small error with todo list
KingAkeem Feb 1, 2018
0bdfae0
I need coffee, another small fix
KingAkeem Feb 1, 2018
1aee370
Fixed `-l` flag for finding live links.
KingAkeem Feb 8, 2018
a95b614
Fixed failing test
KingAkeem Feb 8, 2018
3e852c8
Merge branch 'dev' of https://github.com/KingAkeem/torBot into dev
KingAkeem Feb 8, 2018
b528884
Fixed error with 200 status code
KingAkeem Feb 8, 2018
980d661
Getting rid of redundancy
KingAkeem Feb 8, 2018
b0e8340
Fixed -e flag
KingAkeem Feb 11, 2018
e640e7a
No longer restricted to using .onion domains only
KingAkeem Feb 11, 2018
9bf390a
Fixed typo
KingAkeem Feb 11, 2018
2f0a890
Only returns .onion links without -e flag
KingAkeem Feb 11, 2018
ad36826
Fixed getweblinks test
KingAkeem Feb 11, 2018
2213527
Update README.md
PSNAppz Feb 12, 2018
3826a3e
Updating dependencies
PSNAppz Feb 12, 2018
9b283ac
Merge branch 'dev' into dev
PSNAppz Feb 12, 2018
8928e46
Searches for all DN passed using -e flag
KingAkeem Feb 12, 2018
c78df06
Merge branch 'dev' of https://github.com/KingAkeem/torBot into dev
KingAkeem Feb 12, 2018
b363205
Merge pull request #66 from KingAkeem/dev
PSNAppz Feb 12, 2018
e886ae4
Travis Update & Minor fixes
PSNAppz Feb 12, 2018
3627fb8
Fixed tests
PSNAppz Feb 12, 2018
0311b39
Fixes
PSNAppz Feb 12, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
modules/__pycache__/
.cache
.*.swp
.ropeproject/
modules/.ropeproject/
tests/__pycache__/
modules/__init__.py
.idea/
tests/.ropeproject/
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ python:
- "3.5"
# command to install dependencies
install:
- cd tests
- sudo apt-get -y install python3-pip
- pip3 install bs4
- pip3 install -r requirements.txt
- cd tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are using pytest, whenever you go into the test suite. You only need to run pytest to run all of the tests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

script:
- python3 test_getemails.py
- python3 test_getweblinks.py
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ All notable changes to this project will be documented in this file.
### Added
* Save to JSON
* Testcase for Save to JSON
* Save to DB

## 1.1.0 - July 6, 2017 - Present

### Added

* Updater
* Version checker
* Refactored code to meet PEP8 requirements
* Refactored code to meet Google Style Docstrings for documentation
* Fixed error occuring while using -i flag

## 1.0.0 - Jun 28, 2017 - July 5

Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe

## Enforcement

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.
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.

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.

Expand Down
149 changes: 80 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
<pre>


████████╗ ██████╗ ██████╗ ██████╗ ██████╗ ████████╗
╚══██╔══╝██╔═══██╗██╔══██╗ ██╔══██╗██╔═████╗╚══██╔══╝
██║ ██║ ██║██████╔╝ ██████╔╝██║██╔██║ ██║
██║ ██║ ██║██╔══██╗ ██╔══██╗████╔╝██║ ██║
██║ ╚██████╔╝██║ ██║ ██████╔╝╚██████╔╝ ██║
╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝
████████╗ ██████╗ ██████╗ ██████╗ ██████╗ ████████╗
╚══██╔══╝██╔═══██╗██╔══██╗ ██╔══██╗██╔═████╗╚══██╔══╝
██║ ██║ ██║██████╔╝ ██████╔╝██║██╔██║ ██║
██║ ██║ ██║██╔══██╗ ██╔══██╗████╔╝██║ ██║
██║ ╚██████╔╝██║ ██║ ██████╔╝╚██████╔╝ ██║
╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝



`.` `
``.:.--.`
.-+++/-`
`+sso:`
`` /yy+.
-+.oho.
o../+y
-s.-/:y:`
.:o+-`--::oo/-`
`/o+:.```---///oss+-
.+o:.``...`-::-+++++sys-
:y/```....``--::-yooooosh+
-h-``--.```..-:-::ssssssssd+
h:``:.``....`--:-++hsssyyyym.
.d.`/.``--.```:--//odyyyyyyym/
`d.`+``:.```.--/-+/smyyhhhhhm:
os`./`/````/`-/:+oydhhhhhhdh`
`so.-/-:``./`.//osmddddddmd.
/s/-/:/.`/..+/ydmdddddmo`
`:oosso/:+/syNmddmdy/.
`-/++oosyso+/.`


██████╗ ███████╗██████╗ ███████╗██████╗ ██████╗ ██╗███╗ ██╗███████╗██╗██████╗ ███████╗
██╔══██╗██╔════╝██╔══██╗██╔════╝╚════██╗██╔════╝ ██║████╗ ██║██╔════╝██║██╔══██╗██╔════╝
██║ ██║█████╗ ██║ ██║███████╗ █████╔╝██║ ██║██╔██╗ ██║███████╗██║██║ ██║█████╗
██║ ██║██╔══╝ ██║ ██║╚════██║ ╚═══██╗██║ ██║██║╚██╗██║╚════██║██║██║ ██║██╔══╝
██████╔╝███████╗██████╔╝███████║██████╔╝╚██████╗ ██║██║ ╚████║███████║██║██████╔╝███████╗
╚═════╝ ╚══════╝╚═════╝ ╚══════╝╚═════╝ ╚═════╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚═╝╚═════╝ ╚══════╝
`.` `
``.:.--.`
.-+++/-`
`+sso:`
`` /yy+.
-+.oho.
o../+y
-s.-/:y:`
.:o+-`--::oo/-`
`/o+:.```---///oss+-
.+o:.``...`-::-+++++sys-
:y/```....``--::-yooooosh+
-h-``--.```..-:-::ssssssssd+
h:``:.``....`--:-++hsssyyyym.
.d.`/.``--.```:--//odyyyyyyym/
`d.`+``:.```.--/-+/smyyhhhhhm:
os`./`/````/`-/:+oydhhhhhhdh`
`so.-/-:``./`.//osmddddddmd.
/s/-/:/.`/..+/ydmdddddmo`
`:oosso/:+/syNmddmdy/.
`-/++oosyso+/.`
██████╗ ███████╗██████╗ ███████╗██████╗ ██████╗ ██╗███╗ ██╗███████╗██╗██████╗ ███████╗
██╔══██╗██╔════╝██╔══██╗██╔════╝╚════██╗██╔════╝ ██║████╗ ██║██╔════╝██║██╔══██╗██╔════╝
██║ ██║█████╗ ██║ ██║███████╗ █████╔╝██║ ██║██╔██╗ ██║███████╗██║██║ ██║█████╗
██║ ██║██╔══╝ ██║ ██║╚════██║ ╚═══██╗██║ ██║██║╚██╗██║╚════██║██║██║ ██║██╔══╝
██████╔╝███████╗██████╔╝███████║██████╔╝╚██████╗ ██║██║ ╚████║███████║██║██████╔╝███████╗
╚═════╝ ╚══════╝╚═════╝ ╚══════╝╚═════╝ ╚═════╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚═╝╚═════╝ ╚══════╝



</pre>

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


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

### Features
1. Crawls Tor links (.onion) only.
2. Returns Page title and address.
3. Cache links so that there won't be duplicate links.
1. Crawls Tor links (.onion).(Completed)
2. Returns Page title and address with a short description about the site.(Not Started)
3. Save links to database.(Not Started)
4. Get emails from site.(Completed)
5. Save crawl info to JSON file.(Completed)
6. Crawl custom domains.(Completed)
7. Check if the link is live.(Not Started)
4. Built-in Updater.(Completed)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built-in Updater should be number 8 instead of 4.

...(will be updated)

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

## Dependencies
1. Tor
2. Python 3.x (Make sure pip3 is there)
3. Python Stem Module
4. urllib
5. Beautiful Soup 4
6. Socket
7. Sock
8. Argparse
9. Stem module
10. Git
2. Python 3.x (Make sure pip3 is installed)
3. requests
4. Beautiful Soup 4
5. Socket
6. Sock
7. Argparse
8. Git
9. termcolor
10. tldextract

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

* Run tor service
`sudo service tor start`

* Set a password for tor
`tor --hash-password "my_password" `

* Give the password inside torbot.py
`from stem.control import Controller
with Controller.from_port(port = 9051) as controller:
controller.authenticate("your_password_hash")
controller.signal(Signal.NEWNYM)`
* Make sure that your torrc is configured to SOCKS_PORT localhost:9050

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

optional arguments:
-h, --help show this help message and exit
-q, --quiet
-u URL, --url URL Specifiy a website link to crawl
-h, --help Show this help message and exit
-v, --version Show current version of TorBot.
--update Update TorBot to the latest stable version
-q, --quiet Prevent header from displaying
-u URL, --url URL Specifiy a website link to crawl, currently returns links on that page
-s, --save Save results to a file in json format
-m, --mail Get e-mail addresses from the crawled sites
-e EXTENSION, --extension EXTENSION
Specifiy additional website extensions to the
list(.com or .org etc)
-l, --live Check if websites are live or not (slow)`
-l, --live Check if websites are live or not (slow)
-i, --info Info displays basic info of the scanned site (very
slow)` </pre>

* NOTE: All flags under -u URL, --url URL must also be passed a -u flag.

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

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

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

- [X] [P5N4PPZ](https://github.com/PSNAppz) - Owner
- [X] [agrepravin](https://github.com/agrepravin) - Contributor,Reviewer
- [X] [y-mehta](https://github.com/y-mehta) - Contributer
- [X] [y-mehta](https://github.com/y-mehta) - Contributor
- [X] [Manfredi Martorana](https://github.com/Agostinelli) - Contributor
- [X] [KingAkeem](https://github.com/KingAkeem) - Contributor
- [X] [Evan Sia Wai Suan](https://github.com/waisuan) - New Contributor


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

56 changes: 0 additions & 56 deletions Resources And Samples/torConnectionExample.py

This file was deleted.

9 changes: 0 additions & 9 deletions modules/__init__.py

This file was deleted.

Binary file removed modules/__init__.pyc
Binary file not shown.
28 changes: 13 additions & 15 deletions modules/bcolors.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
__all__ = ['Bcolors']


class Bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
WHITE = '\033[97m'
On_Black = '\033[40m'
On_Red = '\033[41m'


def __init__(self):
self.HEADER = '\033[95m'
self.OKBLUE = '\033[94m'
self.OKGREEN = '\033[92m'
self.WARNING = '\033[93m'
self.FAIL = '\033[91m'
self.ENDC = '\033[0m'
self.BOLD = '\033[1m'
self.UNDERLINE = '\033[4m'
self.WHITE = '\033[97m'
self.On_Black = '\033[40m'
self.On_Red = '\033[41m'
Binary file removed modules/bcolors.pyc
Binary file not shown.
Loading