mirror of
https://github.com/frida/frida-python.git
synced 2026-11-12 18:27:15 -10:00
Infer absolute path with drive letter on Windows
This commit is contained in:
1 parent
24b45d6d54
commit
4a57344ddc
1 file changed
+6
-1
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user