刚刚看到有人发帖,说需要本地搭建社工库,前两天正好写了一个比较坑爹的,发出来分享给大家。
本人是前几天才来论坛,水平较菜,大家看看就好。
00x1 库的转换脚本
这个之前在法客发过,不过比较凌乱,现在整理一下
c++版#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
int i=0;
string temp1,temp2;
ifstream sql("sql.txt");
ofstream sql_res("sql_res.txt",ios_base::app);
cout<<"converting!please wait...\n";
while(!sql.eof())
{
sql>>temp1>>temp2;
sql_res<<"insert into 7k7k (email,password) values ('"<<temp1<<"','"<<temp2<<"');"<<endl;
i++;
}
cout<<"I have converted "<<i<<"datas"<<endl;
sql.close();
sql_res.close();
return 0;
}php版
<?php
error_reporting(0);
$sql = fopen("sql.txt","r");
$sql_res = fopen("sql_res.txt","a");
$count = 0;
echo "converting ! please wait...<br/>";
while (!feof($sql))
{
$line = trim(fgets($sql));
$temp= explode(' ',$line);
$sql_string="insert into `wangyi` (`email`,`password`) values ('".$temp[0]."','".$temp[1]."');\r\n";
fputs($sql_res,$sql_string);
$count++;
}
echo "convert ended! total [".$count." ]datas!<br/>";
fclose($sql);
fclose($sql_res);
?>后来知道,mysql库可以用Navicat for MySQL导入,不过复杂的貌似还是需要转换。
由于本人代码水平比较菜,php才初学不久,所以大牛些帮忙修改一下!
部分代码参考他人经验,在此感谢!
00x2 查询源码
下面是源码:
test.zip
外链:http://115.com/file/anly1i58#test.zip
代码在本地测试成功,速度还算能用,按说明几乎不用改动什么就可以
使用了,目前只支持下面附上的库,有其它需要得自己修改!
关于界面,美工比较差,只能说勉强能看。
附上几个转换好的库:
[+]http://115.com/file/ancxshpy#7k7k-mysql.zip
[+]http://115.com/file/bemdm3d2#csdn-sql.zip
[+]http://115.com/file/bemt3es5#renren.zip
[+]http://115.com/file/dpkr5dlv#wangyi163.zip
希望能帮到大家!大牛勿喷!{:4_65:}