Skip to content

Instantly share code, notes, and snippets.

View AntoineAugusti's full-sized avatar
🚄
High speed, low carbon

Antoine Augusti AntoineAugusti

🚄
High speed, low carbon
View GitHub Profile
@AntoineAugusti
AntoineAugusti / ftplib_simple_proxy.py
Created August 8, 2022 12:41 — forked from fmoo/ftplib_simple_proxy.py
An FTP client implementation that supports sending and receiving data via SOCKS proxy using PASV transfers
import ftplib
import socket
import socks # socksipy (https://github.com/mikedougherty/SocksiPy)
class FTP(ftplib.FTP):
def __init__(self, host='', user='', passwd='', acct='',
timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
proxyconfig=None):
"""Like ftplib.FTP constructor, but with an added `proxyconfig` kwarg