Detected 2 occurrence(s) of ‘\s*pass[word]+\s*[:=]\s*["'][a-z0-9\-_\!\$]+["']‘: at(sourceFilePath).st_size) while True: data = sourceFile.read(4096) if not data: break channel.write(data) exitStatus = channel.exit_status() channel.close() import libssh2, socket, os SERVER = 'someserver' username = 'someuser' password = 'secret!' sourceFilePath = 'source/file/path' destinationFilePath = 'dest/file/path' sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((SERVER, 22)) session = libssh2.Session() session.startup(sock) session.userauth_password(username, passw Source: http://pastebin.com/raw.php?i=XmKuiq4i
↧