Skip to content

Commit d3ac2e2

Browse files
Joao F M FigueiredoJoao F M Figueiredo
authored andcommitted
bug fix
1 parent a104e24 commit d3ac2e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

jexboss.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,11 @@ def shell_http(url, type):
146146
print RED+ " * Error contacting the commando shell. Try again later..."
147147
conn.close()
148148
continue
149-
stdout = resp.read().split("pre>")[1]
149+
stdout = ""
150+
try:
151+
stdout = resp.read().split("pre>")[1]
152+
except:
153+
print RED+ " * Error contacting the commando shell. Try again later..."
150154
if stdout.count("An exception occurred processing JSP page") == 1:
151155
print RED + " * Error executing command \"%s\". " %cmd.split("=")[1] + ENDC
152156
else: print stdout,

0 commit comments

Comments
 (0)