Skip to content

Commit a5e75d0

Browse files
committed
Revert "Merge pull request #75 from tiagoCMatias/feature-db"
This reverts commit e2e7690, reversing changes made to 8c7263b.
1 parent 2d863a6 commit a5e75d0

3 files changed

Lines changed: 3 additions & 28 deletions

File tree

.env

Lines changed: 0 additions & 4 deletions
This file was deleted.

settings.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

torBot.py

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import argparse
22
import socket
33
import socks
4-
import os
5-
import settings
64
from modules import (bcolors, getemails, pagereader, getweblinks, updater,
7-
info, savefile, savedb)
5+
info, savefile)
86

97
# GLOBAL CONSTS
108
LOCALHOST = "127.0.0.1"
@@ -116,10 +114,7 @@ def get_args():
116114
action="store_true",
117115
help=' '.join(("Info displays basic info of the",
118116
"scanned site, (very slow)")))
119-
parser.add_argument("-db", "--database",
120-
action="store_true",
121-
help="Specify a database to connect.")
122-
args = parser.parse_args()
117+
return parser.parse_args()
123118

124119

125120
def main(conn=False):
@@ -135,16 +130,6 @@ def main(conn=False):
135130
if args.update:
136131
updater.updateTor()
137132
exit()
138-
if args.database:
139-
if 'DATABASE_NAME' and 'DATABASE_USERNAME' and 'DATABASE_PASSWORD' in os.environ:
140-
DATABASE_PASSWORD = os.getenv("DATABASE_PASSWORD")
141-
DATABASE_USERNAME = os.getenv("DATABASE_USERNAME")
142-
DATABASE_NAME = os.getenv("DATABASE_NAME")
143-
#print("DB - ", DATABASE_NAME, " - ", DATABASE_USERNAME, " - ", DATABASE_PASSWORD)
144-
else:
145-
print("Wrong Database Configurations")
146-
exit()
147-
148133
if not args.quiet:
149134
header()
150135
# If url flag is set then check for accompanying flag set. Only one
@@ -170,11 +155,9 @@ def main(conn=False):
170155
links = getweblinks.get_links(soup=html_content, ext=args.extension, live=args.live)
171156
if args.save:
172157
savefile.saveJson("Links", links)
173-
if(args.database):
174-
savedb.saveToDatabase(DATABASE_NAME, DATABASE_USERNAME, DATABASE_PASSWORD, links)
175158
else:
176159
print("usage: torBot.py [-h] [-v] [--update] [-q] [-u URL] [-s] [-m]",
177-
"[-e EXTENSION] [-l] [-i] [-db]")
160+
"[-e EXTENSION] [-l] [-i]")
178161

179162
print("\n\n")
180163

0 commit comments

Comments
 (0)