MCPcopy
hub / github.com/knownsec/pocsuite3 / test_cmd_run

Method test_cmd_run

tests/test_cmd_diy_options.py:24–35  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

22 pass
23
24 def test_cmd_run(self):
25 path = os.path.dirname(os.path.realpath(__file__))
26
27 eval_path = os.path.join(path, "../pocsuite3/cli.py")
28 poc_path = os.path.join(path, "login_demo.py")
29 command = (
30 f'python3 {eval_path} -u http://httpbin.org/post -r {poc_path} --verify -v 2 --password mypass123 '
31 '--username "asd asd" --testt abctest'
32 )
33 pipeline = os.popen(command)
34 res = pipeline.buffer.read().decode('utf-8')
35 self.assertTrue('1 / 1' in res)

Callers

nothing calls this directly

Calls 3

joinMethod · 0.80
readMethod · 0.80
decodeMethod · 0.45

Tested by

no test coverage detected