Skip to content

Commit

Permalink
TOR mode help option improvents
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Apr 4, 2014
1 parent e436221 commit 204980f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
18 changes: 9 additions & 9 deletions framework/core.py
Expand Up @@ -159,17 +159,17 @@ def start_reporter(self):

def Start_TOR_Mode(self, Options):
if Options['TOR_mode'] != None:
if Options['TOR_mode'][0] != "help":
if tor_manager.TOR_manager.is_tor_running():
self.TOR_process = tor_manager.TOR_manager(self, Options['TOR_mode'])
self.TOR_process = self.TOR_process.Run()
else:
tor_manager.TOR_manager.msg_start_tor(self)
tor_manager.TOR_manager.msg_configure_tor(self)
self.Error.FrameworkAbort("TOR Daemon is not running")
#if Options['TOR_mode'][0] != "help":
if tor_manager.TOR_manager.is_tor_running():
self.TOR_process = tor_manager.TOR_manager(self, Options['TOR_mode'])
self.TOR_process = self.TOR_process.Run()
else:
tor_manager.TOR_manager.msg_start_tor(self)
tor_manager.TOR_manager.msg_configure_tor()
self.Error.FrameworkAbort("Configuration help is running")
self.Error.FrameworkAbort("TOR Daemon is not running")
#else:
#tor_manager.TOR_manager.msg_configure_tor()
#self.Error.FrameworkAbort("Configuration help is running")

def StartBotnetMode(self, Options):
self.Proxy_manager = None
Expand Down
7 changes: 5 additions & 2 deletions framework/http/proxy/tor_manager.py
Expand Up @@ -97,7 +97,7 @@ def Open_connection(self):
cprint("Connected to TOR control")
return s
except Exception as error:
self.core.Error.FrameworkAbort("Can't connect to the TOR daemon : " + error.strerror)
self.core.Error.FrameworkAbort("Can't connect to the TOR Control port daemon : " + error.strerror)

#Starts a new TOR_control_process which will renew the IP address.
def Run(self):
Expand All @@ -117,7 +117,10 @@ def is_tor_running():
@staticmethod
def msg_start_tor(self):
cprint ("""Error : TOR daemon is not running
(Tips: service tor start)""")
(Tips:
Start TOR --> service tor start)
See if tor is running --> service tor status
""")

#TOR configuration Info
@staticmethod
Expand Down
6 changes: 4 additions & 2 deletions owtf.py
Expand Up @@ -42,7 +42,7 @@
from framework import core
from framework.lib.general import *
from framework import update

from framework.http.proxy import tor_manager # Is needed for printing configuration help
def Banner():
print("""
__ ___
Expand Down Expand Up @@ -286,7 +286,9 @@ def ProcessOptions(Core, user_args):

if Arg.TOR_mode:
Arg.TOR_mode = Arg.TOR_mode.split(":")
print(Arg.TOR_mode[0])
if(Arg.TOR_mode[0] == "help"):
tor_manager.TOR_manager.msg_configure_tor()
exit(0);
if len(Arg.TOR_mode) == 1:
if Arg.TOR_mode[0] != "help":
Usage("Invalid argument for TOR-mode")
Expand Down

0 comments on commit 204980f

Please sign in to comment.