How to use the archr.arsenal.NetCatBow function in archr

To help you get started, we’ve selected a few archr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github angr / archr / tests / test_bow_netcat.py View on Github external
def test_netcat_stdio():
    with archr.targets.DockerImageTarget('archr-test:cat').build().start() as t:
        b = archr.arsenal.NetCatBow(t)
        r = b.fire()
        r.send(b"hello!")
        assert r.readuntil(b"hello!", timeout=5) == b"hello!"
github angr / archr / tests / test_bow_netcat.py View on Github external
def netcat_checks(t):
    b = archr.arsenal.NetCatBow(t)
    try:
        r = b.fire()
    except nclib.NetcatError:
        time.sleep(5)
        r = b.fire()
    r.send(b"hello!")
    assert r.readuntil(b"hello!", timeout=5) == b"hello!"