MCPcopy
hub / github.com/Gallopsled/pwntools / process

Function process

pwnlib/adb/adb.py:824–850  ·  view source on GitHub ↗

Execute a process on the device. See :class:`pwnlib.tubes.process.process` documentation for more info. Returns: A :class:`pwnlib.tubes.process.process` tube. Examples: .. doctest:: :skipif: skip_android >>> adb.root() >>> print(adb.process(['cat',

(argv, *a, **kw)

Source from the content-addressed store, hash-verified

822
823@with_device
824def process(argv, *a, **kw):
825 """Execute a process on the device.
826
827 See :class:`pwnlib.tubes.process.process` documentation for more info.
828
829 Returns:
830 A :class:`pwnlib.tubes.process.process` tube.
831
832 Examples:
833
834 .. doctest::
835 :skipif: skip_android
836
837 >>> adb.root()
838 >>> print(adb.process(['cat','/proc/version']).recvall().decode('utf-8')) # doctest: +ELLIPSIS
839 Linux version ...
840 """
841 if isinstance(argv, (bytes, six.text_type)):
842 argv = [argv]
843
844 message = "Starting %s process %r" % ('Android', argv[0])
845
846 if log.isEnabledFor(logging.DEBUG):
847 if argv != [argv[0]]: message += ' argv=%r ' % argv
848
849 with log.progress(message) as p:
850 return AdbClient().execute(argv)
851
852@with_device
853def interactive(**kw):

Callers 15

adbFunction · 0.70
mkdirFunction · 0.70
shellFunction · 0.70
whichFunction · 0.70
whoamiFunction · 0.70
logcatFunction · 0.70
pidofFunction · 0.70
proc_exeFunction · 0.70
getpropFunction · 0.70
setpropFunction · 0.70
readlinkFunction · 0.70
installFunction · 0.70

Calls 4

AdbClientClass · 0.90
isEnabledForMethod · 0.80
progressMethod · 0.80
executeMethod · 0.80

Tested by

no test coverage detected