Skip to content

Commit

Permalink
Merge pull request #21 from sourcekris/master
Browse files Browse the repository at this point in the history
change type of shell commands to bytes
  • Loading branch information
ChrisTheCoolHut committed Dec 23, 2021
2 parents eb46ecd + ce68d81 commit b7ccad9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions zeratool/formatExploiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,9 +760,9 @@ def sendExploit(

try:
proc.sendline()
proc.sendline("ls;\n")
proc.sendline("cat *flag*;\n")
proc.sendline("cat *pass*;\n")
proc.sendline(b"ls;\n")
proc.sendline(b"cat *flag*;\n")
proc.sendline(b"cat *pass*;\n")
command_results = proc.recvall(
timeout=30
) # Need a better way to "time out"
Expand Down
6 changes: 3 additions & 3 deletions zeratool/overflowExploitSender.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ def sendExploit(

# If we have a shell, send some commands!
proc.sendline()
proc.sendline("ls;\n")
proc.sendline("cat *flag*;\n")
proc.sendline("cat *pass*;\n")
proc.sendline(b"ls;\n")
proc.sendline(b"cat *flag*;\n")
proc.sendline(b"cat *pass*;\n")

# Sometimes the flag is just printed
results = proc.recvall(timeout=3)
Expand Down

0 comments on commit b7ccad9

Please sign in to comment.