Skip to content

Commit

Permalink
being paranoic now..
Browse files Browse the repository at this point in the history
  • Loading branch information
bdamele committed Oct 21, 2013
1 parent ba23ef5 commit 753a700
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions keimpx.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ def __init__(self, svc, mgr_handle, rpc, mode):
cmd.Cmd.__init__(self)
self.__svc = svc
self.__mgr_handle = mgr_handle
self.__rpc = rpc
self.__share = 'C$'
self.__mode = mode
self.__output_file = '%s.txt' % ''.join([random.choice(string.letters) for _ in range(8)])
Expand All @@ -466,18 +467,16 @@ def __init__(self, svc, mgr_handle, rpc, mode):
logger.info('Launching semi-interactive shell')
logger.debug('Going to use temporary service %s' % self.__service_name)

s = rpc.get_smb_connection()
s = self.__rpc.get_smb_connection()

# We don't wanna deal with timeouts from now on
s.setTimeout(100000)

if mode == 'SERVER':
myIPaddr = s.getSMBServer().get_socket().getsockname()[0]
self.__copyBack = 'copy %s \\\\%s\\%s' % (self.__output, myIPaddr, self.__smbserver_share)
#self.__output = '\\\\%s\\%s\\%s' % (myIPaddr, self.__smbserver_share, self.__output_file)
#self.__batchFile = '\\\\%s\\%s\\%s' % (myIPaddr, self.__smbserver_share, self.__batch_filename)

self.transferClient = rpc.get_smb_connection()
self.transferClient = self.__rpc.get_smb_connection()
self.execute_remote('cd ')

if len(self.__outputBuffer) > 0:
Expand Down

0 comments on commit 753a700

Please sign in to comment.