-5

I updated the code but there still seems to have an error.

import os
import subprocess

name = raw_input("\nWHO DO WE HACK? ")

passw = subprocess_check.input(['hydra -l ' + name + ' -P pss.txt smb://192.168.66.128'])

print passw
if passw == '0':
    print "HELLO"
else:
    print "NOT"
PeeHaa
  • 71,436
  • 58
  • 190
  • 262
user3079563
  • 1
  • 1
  • 3

1 Answers1

3

os.system() doesn' work like that. Check this. You're getting the return code, not the command output. 0 means that the process exited without errors. Use the subprocess module to get the command output.

jDo
  • 3,962
  • 1
  • 11
  • 30