diff --git a/libs/nftk_socket_controller.py b/libs/nftk_socket_controller.py index 64ddcf3..c4350b5 100755 --- a/libs/nftk_socket_controller.py +++ b/libs/nftk_socket_controller.py @@ -196,7 +196,7 @@ def spawn_socket(self, t_instance=0): runstmt.append(self.torarguments[k] % bcp) elif k == '--PidFile': runstmt.append(k) - runstmt.append(self.torarguments[k] % str(t_instance)) + runstmt.append(self.torarguments[k] % (str(t_instance), str(t_instance))) elif k == '--SocksPort': runstmt.append(k) runstmt.append(self.torarguments[k] % (self.selfip,bsp)) diff --git a/vars/socket_controller_vars.py b/vars/socket_controller_vars.py index 8008364..febd9c5 100644 --- a/vars/socket_controller_vars.py +++ b/vars/socket_controller_vars.py @@ -116,7 +116,7 @@ def createRandAlpha(length=0): torarguments = {"--RunAsDaemon":'1', "--CookieAuthentication":'0', "--ControlPort":'%s', - "--PidFile":'tor%s.pid', + "--PidFile":datadir + '/tor%s/tor%s.pid', "--SocksPort":'%s:%s', "--DataDirectory":datadir + '/tor%s' #"--HashedControlPassword":createTorPassword(secret=createRandAlpha(length=5)),