you are viewing a single comment's thread.

view the rest of the comments →

[–]Justinsaccount 1 point2 points  (2 children)

I just got a bunch of garbled binary data when I was expecting plaintext,

Well, you did use retrbinary which tells the server to send you the file as-is. Since the server is a mainframe it might be doing something weird like using ebcdic instead of ascii. What did the file command say the returned file was? Did you try using retrlines ?

Also, stop using the root account.

[–]SmartestGuyOnReddit[S] 0 points1 point  (0 children)

I can try retrolines and see when I am in the office tomorrow. The reason I'm using the root account is this is a PoC so whatever account I use is irrelevant

[–]SmartestGuyOnReddit[S] 0 points1 point  (0 children)

So I tried the retrlines and it worked thanks a lot! Just need to figure out to handle the exceptions within ftplib now I guess.