MCPcopy Index your code
hub / github.com/secdev/scapy / run

Method run

scapy/automaton.py:1520–1551  ·  view source on GitHub ↗
(self,
            resume=None,    # type: Optional[Message]
            wait=True       # type: Optional[bool]
            )

Source from the content-addressed store, hash-verified

1518 self._do_start(*args, **kargs)
1519
1520 def run(self,
1521 resume=None, # type: Optional[Message]
1522 wait=True # type: Optional[bool]
1523 ):
1524 # type: (...) -> Any
1525 if resume is None:
1526 resume = Message(type=_ATMT_Command.RUN)
1527 self.cmdin.send(resume)
1528 if wait:
1529 try:
1530 c = self.cmdout.recv()
1531 if c is None:
1532 return None
1533 except KeyboardInterrupt:
1534 self.cmdin.send(Message(type=_ATMT_Command.FREEZE))
1535 return None
1536 if c.type == _ATMT_Command.END:
1537 return c.result
1538 elif c.type == _ATMT_Command.INTERCEPT:
1539 raise self.InterceptionPoint("packet intercepted", state=c.state.state, packet=c.pkt) # noqa: E501
1540 elif c.type == _ATMT_Command.SINGLESTEP:
1541 raise self.Singlestep("singlestep state=[%s]" % c.state.state, state=c.state.state) # noqa: E501
1542 elif c.type == _ATMT_Command.BREAKPOINT:
1543 raise self.Breakpoint("breakpoint triggered on state [%s]" % c.state.state, state=c.state.state) # noqa: E501
1544 elif c.type == _ATMT_Command.EXCEPTION:
1545 # this code comes from the `six` module (`.reraise()`)
1546 # to raise an exception with specified exc_info.
1547 value = c.exc_info[0]() if c.exc_info[1] is None else c.exc_info[1] # type: ignore # noqa: E501
1548 if value.__traceback__ is not c.exc_info[2]:
1549 raise value.with_traceback(c.exc_info[2])
1550 raise value
1551 return None
1552
1553 def runbg(self, resume=None, wait=False):
1554 # type: (Optional[Message], Optional[bool]) -> None

Callers 8

runbgMethod · 0.95
__next__Method · 0.95
accept_packetMethod · 0.95
reject_packetMethod · 0.95
_do_iterMethod · 0.45
exploreFunction · 0.45
example_server.pyFile · 0.45
example_client.pyFile · 0.45

Calls 3

MessageClass · 0.85
sendMethod · 0.45
recvMethod · 0.45

Tested by

no test coverage detected