实验吧try them all
来源:互联网 发布:sql找不到存储过程 编辑:程序博客网 时间:2024/06/03 23:01
http://www.shiyanbar.com/ctf/1981
try them all:
You have found a passwd file containing salted passwords.
An unprotected configuration file has revealed a salt of 5948.
The hashed password for the 'admin' user appears to be
81bdf501ef206ae7d3b92070196f7e98, try to brute force
this password.
解:别人思路:加盐+Md5+暴力
#-*- coding:utf -*-
__author__='xiaoyu'
__date__ ="$2017-7-30 9:47:51$"
from hashlib import md5
def bruteforce():
#rb以二进制读模式打开,file.readlines()返回一行
#另一方面,.readline() 每次只读取一行,通常比 .readlines() 慢得多。
#仅当没有足够内存可以一次读取整个文件时,才应该使用 .readline()
f=open('F:\p\webshellpassword.txt','rb').readlines()
salt='5948'.encode("utf-8")#盐值化成字节
m='81bdf501ef206ae7d3b92070196f7e98'#hash值
for line in f:
t=line.strip()+salt
#Python strip() 方法用于移除字符串头尾指定的字符(默认为空格)。
#md5.digest() 返回二进制的加密结果
#md5.hexdigest() 返回十六进制的机密结果
t=md5(t).hexdigest()
if(t==m):
print(line.strip())
break
pass
#用于在dos下直接运行.py文件
if __name__=='__main__':
bruteforce()
print('运行完成')
别人总结:这题只是考验md5加salt,明文找一份比较全的字典去跑即可,然而
我字典找的不好全扯淡。
最后我自己是用工具解决的,锻炼自己搜索能力。
这里说一下提交答案很重要,不然浪费老子松果,靠flag:sniper
try them all:
You have found a passwd file containing salted passwords.
An unprotected configuration file has revealed a salt of 5948.
The hashed password for the 'admin' user appears to be
81bdf501ef206ae7d3b92070196f7e98, try to brute force
this password.
解:别人思路:加盐+Md5+暴力
#-*- coding:utf -*-
__author__='xiaoyu'
__date__ ="$2017-7-30 9:47:51$"
from hashlib import md5
def bruteforce():
#rb以二进制读模式打开,file.readlines()返回一行
#另一方面,.readline() 每次只读取一行,通常比 .readlines() 慢得多。
#仅当没有足够内存可以一次读取整个文件时,才应该使用 .readline()
f=open('F:\p\webshellpassword.txt','rb').readlines()
salt='5948'.encode("utf-8")#盐值化成字节
m='81bdf501ef206ae7d3b92070196f7e98'#hash值
for line in f:
t=line.strip()+salt
#Python strip() 方法用于移除字符串头尾指定的字符(默认为空格)。
#md5.digest() 返回二进制的加密结果
#md5.hexdigest() 返回十六进制的机密结果
t=md5(t).hexdigest()
if(t==m):
print(line.strip())
break
pass
#用于在dos下直接运行.py文件
if __name__=='__main__':
bruteforce()
print('运行完成')
别人总结:这题只是考验md5加salt,明文找一份比较全的字典去跑即可,然而
我字典找的不好全扯淡。
最后我自己是用工具解决的,锻炼自己搜索能力。
这里说一下提交答案很重要,不然浪费老子松果,靠flag:sniper
阅读全文
1 0
- 实验吧try them all
- 泛函编程(14)-try to map them all
- 泛函编程(14)-try to map them all
- The Best Linux Distribution of them all
- hdu 3920 Clear All of Them I
- HDU 3920 Clear all of them I
- hdu 3921 Clear All of Them II
- hdu3920 Clear All of Them I
- [SPOJ INS14G Kill them All]数学、排列组合
- Try It Out! Mix Them Up! Input & Output!
- HDU3920:Clear All of Them I(状态压缩)
- HDU 3920 Clear All of Them I 状压DP
- One function to run them all… Or just eval
- Google advances AI with ‘one model to learn them all
- 【深度学习】One Model to Learn Them All详解
- 练习系统 实验二 All in All
- python try..except..finally 实验【细节决定成败】
- 【转】Programmers Need To Learn Statistics Or I Will Kill Them All
- 深度学习新星:GAN的基本原理、应用和走向(文末附其他GAN的原理、方法、问题、改进方式和应用)
- Java内存区域
- 1.2、class文件中的常量池
- 提交方式的注入
- ViewGroup事件分发
- 实验吧try them all
- D
- 把数组排成最小的数
- C语言基础之结构体
- 解决pyenv安装pyhton下载安装缓慢的问题
- Activemq 访问后台出现503错误
- java web 上传文件的中文名乱码纪要
- 1.2.2、Class文件中的常量池详解(上)
- cvte-c++-笔试1