0

My code is here:

from pypsexec import client    
import os    
import time    
import sys    
import paramiko    
host = '192.168.x.x'    
user = 'xxxxx'    
pass1 = 'xxxxx'    
c = client(host, username=user, password=pass1, encrypt=False, port=139)    
c.connect()    
try:    
    c.create_service()    
    stdout = c.run_executable("cmd.exe", arguments="xxxx")    
finally:    
    c.cleanup()    
    c.remove_service()    
    c.disconnect()

And it gives an error:

Module not callable with remote server connection

Scott
  • 4,974
  • 6
  • 35
  • 62

1 Answers1

3

This might help you to understand the error:

x = 1
print x()

x is not a callable object, but you are trying to call it as if it was it. This example produces the error:

TypeError: 'int' object is not callable
Scott
  • 4,974
  • 6
  • 35
  • 62
  • hi Sherzod i am new to python what is the other module other than paramiko to comment to remote server to run commands and capture result any script for reference plz – Karuna Pati Sep 17 '19 at 03:43
  • This is actually another question. Even so, check [this](https://stackoverflow.com/questions/28411960/execute-a-command-on-remote-machine-in-python) out. And please mark my answer as correct if it was helpful :) – Scott Sep 17 '19 at 03:54