Skip to content

Commit d93e39e

Browse files
committed
improved debug print
1 parent 3b1de87 commit d93e39e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

friTap/friTap.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,21 @@ def main():
159159
stack_trace.append("File : %s , Line : %d, Func.Name : %s, Message : %s" % (trace[0], trace[1], trace[2], trace[3]))
160160

161161
if parsed.debug or parsed.debugoutput:
162-
print("Exception type : %s " % ex_type.__name__)
163-
print("Exception message : %s" %ex_value)
164-
print("Stack trace : %s" %stack_trace)
162+
if "NotSupportedError" in ex_type.__name__:
163+
print("[-] Frida based error:")
164+
print("[-] Exception type : %s " % ex_type.__name__)
165+
print("[-] Exception message : %s" %ex_value)
166+
print("[-] Stack trace : %s" %stack_trace)
165167

166168

167169
if "unable to connect to remote frida-server: closed" in str(ar):
168170
print("\n[-] frida-server is not running in remote device. Please run frida-server and rerun")
169171

170-
print(f"\n[-] Unknown error: {ex_value}")
172+
if "NotSupportedError" in ex_type.__name__:
173+
print(f"\n[-] Frida error: {ex_value}")
174+
else:
175+
print(f"\n[-] Unknown error: {ex_value}")
176+
171177
if "unable to access process with pid" in str(ex_value).lower():
172178
print("\n\nThx for using friTap\nHave a great day\n")
173179
os._exit(0)

0 commit comments

Comments
 (0)