MCPcopy Create free account
hub / github.com/secdev/scapy / BEGIN

Method BEGIN

scapy/layers/tftp.py:177–189  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

175 # BEGIN
176 @ATMT.state(initial=1)
177 def BEGIN(self):
178 self.blocksize = 512
179 self.my_tid = self.sport or RandShort()._fix()
180 bind_bottom_up(UDP, TFTP, dport=self.my_tid)
181 self.server_tid = None
182 self.res = b""
183
184 self.l3 = IP(dst=self.server) / UDP(sport=self.my_tid, dport=self.port) / TFTP() # noqa: E501
185 self.last_packet = self.l3 / TFTP_RRQ(filename=self.filename, mode="octet") # noqa: E501
186 self.send(self.last_packet)
187 self.awaiting = 1
188
189 raise self.WAITING()
190
191 # WAITING
192 @ATMT.state()

Callers

nothing calls this directly

Calls 9

WAITINGMethod · 0.95
RandShortClass · 0.90
bind_bottom_upFunction · 0.90
IPClass · 0.90
UDPClass · 0.90
TFTPClass · 0.85
TFTP_RRQClass · 0.85
_fixMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected