Esempio n. 1
0
 def ssh_shell(*args):
     self.ssh_run_command_count += 1
     if self.ssh_run_command_count == 1:
         # md5sum check
         raise SshcpError("an ssh error")
     else:
         # later tries
         return pickle.dumps([])
Esempio n. 2
0
 def ssh_shell(*args):
     self.ssh_run_command_count += 1
     if self.ssh_run_command_count < 2:
         raise SshcpError(
             "connect to host host.remote.com port 2202: Connection timed out"
         )
     else:
         return pickle.dumps([])
Esempio n. 3
0
 def ssh_run_command(*args):
     self.ssh_run_command_count += 1
     if self.ssh_run_command_count < 2:
         raise SshcpError(
             "ssh_exchange_identification: read: Connection reset by peer"
         )
     else:
         return pickle.dumps([])
Esempio n. 4
0
 def ssh_shell(*args):
     self.ssh_run_command_count += 1
     if self.ssh_run_command_count < 2:
         raise SshcpError(
             "[23033] INTERNAL ERROR: cannot create temporary directory!"
         )
     else:
         return pickle.dumps([])
Esempio n. 5
0
 def ssh_shell(*args):
     self.ssh_run_command_count += 1
     if self.ssh_run_command_count == 1:
         # md5sum check
         return b''
     elif self.ssh_run_command_count == 2:
         # first try
         raise SshcpError("SystemScannerError: something failed")
     else:
         # later tries
         return pickle.dumps([])
Esempio n. 6
0
 def ssh_shell(*args):
     self.ssh_run_command_count += 1
     if self.ssh_run_command_count == 1:
         # md5sum check
         return b''
     elif self.ssh_run_command_count == 2:
         # first try
         raise SshcpError("bash: /remote/path/to/scan: Text file busy")
     else:
         # later tries
         return pickle.dumps([])
Esempio n. 7
0
 def ssh_shell(*args):
     self.ssh_run_command_count += 1
     if self.ssh_run_command_count == 1:
         # md5sum check
         return b''
     elif self.ssh_run_command_count == 2:
         # first try
         raise SshcpError(
             "connect to host host.remote.com port 2202: Connection timed out"
         )
     else:
         # later tries
         return pickle.dumps([])
Esempio n. 8
0
 def ssh_shell(*args):
     self.ssh_run_command_count += 1
     if self.ssh_run_command_count == 1:
         # md5sum check
         return b''
     elif self.ssh_run_command_count == 2:
         # first try
         raise SshcpError(
             "[23033] INTERNAL ERROR: cannot create temporary directory!"
         )
     else:
         # later tries
         return pickle.dumps([])
Esempio n. 9
0
 def ssh_shell(*args):
     self.ssh_run_command_count += 1
     if self.ssh_run_command_count == 1:
         # md5sum check
         return b''
     elif self.ssh_run_command_count == 2:
         # first try
         return pickle.dumps([])
     elif self.ssh_run_command_count == 3:
         # second try
         raise SshcpError("an ssh error")
     else:
         # later tries
         return pickle.dumps([])
Esempio n. 10
0
 def ssh_copy(*args, **kwargs):
     raise SshcpError("an scp error")
Esempio n. 11
0
 def ssh_shell(*args):
     raise SshcpError("bash: /remote/path/to/scan: Text file busy")
Esempio n. 12
0
 def ssh_shell(*args):
     self.ssh_run_command_count += 1
     if self.ssh_run_command_count < 2:
         raise SshcpError("bash: /remote/path/to/scan: Text file busy")
     else:
         return pickle.dumps([])
Esempio n. 13
0
 def ssh_shell(*args):
     self.ssh_run_command_count += 1
     if self.ssh_run_command_count < 2:
         raise SshcpError("an ssh error")
     else:
         return pickle.dumps([])