Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local file not found error #13

Closed
frakman1 opened this issue Dec 16, 2018 · 1 comment · Fixed by #15
Closed

local file not found error #13

frakman1 opened this issue Dec 16, 2018 · 1 comment · Fixed by #15

Comments

@frakman1
Copy link

frakman1 commented Dec 16, 2018

I'm running py3tftp on Windows 7 64bit and Python 3.7.0

When I run pytftp in a folder containing the file myip.py, I expect it to be able to serve that file.
However, when I ran a tftp client (on the same machine) and requested this file, I got a File Not Found error. Am I doing something wrong? Also, how do I quit without having to kill the process in Task Manager? Ctrl+C etc doesn't work.

Server invocation:

 Directory of c:\dev

12/16/2018  10:59 AM    <DIR>          .
12/16/2018  10:59 AM    <DIR>          ..
12/16/2018  10:43 AM               246 myip.py
12/16/2018  11:01 AM               334 myports.py
12/16/2018  11:01 AM    <DIR>          nppBackup
07/13/2009  10:20 PM    <DIR>          PerfLogs
               2 File(s)            580 bytes
               4 Dir(s)  60,627,619,840 bytes free

c:\dev>py3tftp -p 69 -v
2018-12-16 11:11:21,443 [INFO] Starting TFTP server on 0.0.0.0:69
2018-12-16 11:11:21,443 [DEBUG] Using selector: SelectSelector
2018-12-16 11:11:21,443 [INFO] Listening...
2018-12-16 11:11:25,819 [DEBUG] received:  ☺myip.py octet tsize 0
2018-12-16 11:11:25,819 [DEBUG] Request: b'myip.py\x00octet\x00tsize\x000\x00'
2018-12-16 11:11:25,819 [DEBUG] b'tsize'
2018-12-16 11:11:25,819 [DEBUG] packet type: RRQ
2018-12-16 11:11:25,819 [DEBUG] Request: b'myip.py\x00octet\x00tsize\x000\x00'
2018-12-16 11:11:25,819 [DEBUG] b'tsize'
2018-12-16 11:11:25,819 [DEBUG] b'tsize'
2018-12-16 11:11:25,819 [INFO] Initiating RRQProtocol with ('127.0.0.1', 54144)
2018-12-16 11:11:25,819 [DEBUG] Initializing file transfer to ('127.0.0.1', 54144)
2018-12-16 11:11:25,819 [DEBUG] Set protocol attributes as {b'ack_timeout': 0.5, b'timeout': 3.0, b'blksize': 512, b'windowsize': 1, b'tsize': 0}
2018-12-16 11:11:25,819 [ERROR] File "b'myip.py'" does not exist!
2018-12-16 11:11:25,819 [DEBUG] opening pkt: <py3tftp.tftp_packet.TFTPErrPacket object at 0x00000000032E19B0>
2018-12-16 11:11:25,819 [INFO] Closing connection to ('127.0.0.1', 54144) due to error. "b'myip.py'" Not transmitted.
2018-12-16 11:11:25,819 [INFO] Connection to 127.0.0.1:54144 terminated

client invocation (using mobaxterm cygwin-like shell):

➤ tftp -g -r myip.py 0.0.0.0
tftp: using blksize 512
using server '0.0.0.0:69', remote_file 'myip.py', local_file 'myip.py'
sending 24 bytes
00 01 6d 79 69 70 2e 70 79 00 6f 63 74 65 74 00 74 73 69 7a 65 00 30 00
received 19 bytes: 0005 0001
tftp: server error: (1) File not found
                                         
@sirMackk
Copy link
Owner

Hey @frakman1 , thanks for bringing this to my attention. I'm out for the holiday's, but I'll look into this in a few days when I'm back home.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants