md5碰撞脚本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash   
user=root
pwd=password
DB=test
TABLE=md5
mysql -u$user -p$pwd -e "USE $DB;CREATE TABLE $TABLE(id int not null primary key auto_increment,md5 text(32),plain varchar(100));"
while read line
do
md5=`echo $linemd5sumawk -F " " '{print $1}'`
#plain=$line
mysql -u$user -p$pwd -e "USE $DB;INSERT $TABLE (md5,plain) VALUES('$md5','$line');"
done < plaindic

#mysql -u$user -p$pwd -e "USE $DB;SELECT * FROM md5;"
Bash快捷操作 重置mysql用户密码
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×