TftpException: Invalid options in buffer
QGB opened this issue · 0 comments
QGB commented
import tftpy
client = tftpy.TftpClient('192.168.0.42', 69, options={'blksize': 8})
In [1014]: client.download('breed.bin','output.bin')
2022-08-24:09:17:49,158 INFO [TftpContexts.py:389] Sending tftp download request to 192.168.1.3
2022-08-24:09:17:49,171 INFO [TftpContexts.py:390] filename -> breed.bin
2022-08-24:09:17:49,171 INFO [TftpContexts.py:391] options -> {'blksize': 8}
---------------------------------------------------------------------------
TftpException Traceback (most recent call last)
<ipython-input-1014-e736a6ad1e28> in <module>
----> 1 client.download('breed.bin','output.bin')
C:\QGB\Anaconda3\lib\site-packages\tftpy\TftpClient.py in download(self, filename, output, packethook, timeout, retries)
60 retries=retries,
61 localip=self.localip)
---> 62 self.context.start()
63 # Download happens here
64 self.context.end()
C:\QGB\Anaconda3\lib\site-packages\tftpy\TftpContexts.py in start(self)
408 try:
409 log.debug("State is %s" % self.state)
--> 410 self.cycle()
411 except TftpTimeout as err:
412 log.error(str(err))
C:\QGB\Anaconda3\lib\site-packages\tftpy\TftpContexts.py in cycle(self)
181
182 # Decode it.
--> 183 recvpkt = self.factory.parse(buffer)
184
185 # Check for known "connection".
C:\QGB\Anaconda3\lib\site-packages\tftpy\TftpPacketFactory.py in parse(self, buffer)
35 packet = self.__create(opcode)
36 packet.buffer = buffer
---> 37 return packet.decode()
38
39 def __create(self, opcode):
C:\QGB\Anaconda3\lib\site-packages\tftpy\TftpPacketTypes.py in decode(self)
467
468 def decode(self):
--> 469 self.options = self.decode_options(self.buffer[2:])
470 return self
471
C:\QGB\Anaconda3\lib\site-packages\tftpy\TftpPacketTypes.py in decode_options(self, buffer)
77 length = -1
78 else:
---> 79 raise TftpException("Invalid options in buffer")
80 length += 1
81
TftpException: Invalid options in buffer
server: mobaxterm