From 4a57344ddcec30bb63571cbb9649bfaa70103333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Mon, 23 Feb 2015 00:05:08 +0100 Subject: [PATCH] Infer absolute path with drive letter on Windows --- src/frida/application.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/frida/application.py b/src/frida/application.py index 32889d1..4b2f327 100755 --- a/src/frida/application.py +++ b/src/frida/application.py @@ -3,6 +3,7 @@ import collections from optparse import OptionParser import os +import platform import sys import threading import time @@ -180,7 +181,11 @@ def find_device(type): return None def infer_target(target_value): - if target_value.startswith('.') or target_value.startswith(os.path.sep): + if target_value.startswith('.') or target_value.startswith(os.path.sep) \ + or (platform.system() == 'Windows' \ + and target_value[0].isalpha() \ + and target_value[1] == ":" \ + and target_value[2] == "\\"): target_type = 'file' target_value = [target_value] else: