定义分类,是归档文件,好比你可以把你的工具分为渗透、溢出、网马、浏览之类的,可无限建分类
建好分类后,你可以进行第二步,根据你需要的后缀来进行分类,不建议将dll文件也分类,只把exe和webshell之类进行收集吧
第二步查找结束后,可以选择程序建立的searchresult.txt,根据提示构选要存到哪一个分类,自动存进数据库
第三步当然是进行查找了,根据自定义sql语句查找你的工具
程序只是个雏形,可以提供建议,有时间再修正bug,进行软件升级
代码如下:
applicationname=myapp border=thin borderstyle=normal caption=yes maximizebutton=yes minimizebutton=yes showintaskbar=no singleinstance=no sysmenu=yes version=1.0 windowstate=normal scroll=yes>
body
{
font-size:12;
background: #dadada;
margin-left:5;
}
input
{
width:40;
overflow:visible;
border:1px solid lightblue;
background-color:#cccccc;
cursor:text;
}
button
{
border:1px solid gray;
width:260;
margin-left:2;
cursor:hand;
font-size:12;
filter:progid:dximagetransform.microsoft.gradient(startcolorstr='#eaeaff', endcolorstr='#618fff', gradienttype='0');
}
textarea
{
font-family:verdana;
font-size:12px;
overflow-x:visible;
overflow-y:scroll;
}
○
○
■
on error resume next
window.resizeto window.screen.availwidth/1.5,window.screen.availheight/1.5
window.moveto window.screen.availwidth/4,window.screen.availheight/4
'------------------------------------------自定义建数据库表模块开始---------------------------------------------------------------
set fso=createobject(scripting.filesystemobject)
set objconnection = createobject(adodb.connection)
set objrecordset = createobject(adodb.recordset)
set cn=createobject(adodb.connection)
set clx=createobject(adox.column)
set cat=createobject(adox.catalog)
set tblnam=createobject(adox.table)
sub addinput
for i=1 to 6
set input = document.createelement(input)
input.value=分类名&i
baobao.appendchild(input)
next
end sub
sub delinput
set input=document.getelementsbytagname(input)
if(input.length > 0)then baobao.removechild(input(input.length - 1))
end sub
sub countall
adcolnullable = 2
path=document.location.href
path=replace(path,file:///,)
path=replace(path,%20, )
path=replace(path,#,)
if fso.fileexists(path&.mdb) then
msgbox 数据库已存在,请删掉
end if
cat.create provider=microsoft.jet.oledb.4.0;data source=&path&.mdb
cn.open provider=microsoft.jet.oledb.4.0;data source=&path&.mdb
set cat.activeconnection = cn
tblnam.name = test
clx.parentcatalog = cat
clx.type = 3
clx.name = id
clx.properties(autoincrement) = true
tblnam.columns.append clx
for i=0 to document.all.tags(input).length -1
tblnam.columns.append document.all.tags(input).item(i).value,202,255
tblnam.columns(document.all.tags(input).item(i).value).attributes = adcolnullable
next
tblnam.columns.append demo,202,255
tblnam.columns(demo).attributes = adcolnullable
cat.tables.append tblnam
cat.tables.refresh
if fso.fileexists(path&.mdb) then
msgbox 数据库已建好,可以下一步了
end if
set clx = nothing
set cat = nothing
set fso = nothing
cn.close
set cn = nothing
end sub
'------------------------------------------自定义建数据库表模块结束-------------------------------------------------------
'-------------------------------------工具整理模块第一步----------------------------------------
on error resume next
dim keyword, dirtotal, timespend, filetotal, fso, outfile, txtresult, txtpath, spath
const my_computer = &h11&
const window_handle = 0
const options = 0
set objshell = createobject(shell.application)
set objfolder = objshell.namespace(my_computer)
set objfolderitem = objfolder.self
strpath = objfolderitem.path
function myfind(byval thepath)
dim fso, myfolder, myfile, curfolder
set fso = createobject(scripting.filesystemobject)
set curfolders = fso.getfolder(thepath)
dirtotal = dirtotal + 1
if curfolders.files.count > 0 then
for each myfile in curfolders.files
if instr(1, lcase(myfile.name), keyword) > 0 then
outfile.writeline formatpath(thepath) & \ & myfile.name
filetotal = filetotal + 1
end if
next
end if
if curfolders.subfolders.count > 0 then
for each myfolder in curfolders.subfolders
myfind formatpath(thepath) & \ & myfolder.name
next
end if
end function
function formatpath(byval thepath)
thepath = trim(thepath)
formatpath = thepath
if right(thepath, 1) = \ then formatpath = mid(thepath, 1, len(thepath) - 1)
end function
sub startwo
set objfolder = objshell.browseforfolder(window_handle, 选择你要搜索的文件夹,文件夹不宜过大超过几g哪样:, options, strpath)
if objfolder is nothing then
msgbox 您没有选择任何有效目录!
else
set objfolderitem = objfolder.self
spath = objfolderitem.path
txtpath=spath
set fso = createobject(scripting.filesystemobject)
filetotal = 0
dirtotal = 0
keyword = lcase(inputbox(请输入要整理的文件后缀:,文件搜索,.exe或.bat或.php,一般就这些,至于.dll手工添加吧))
set outfile = fso.createtextfile(spath & \searchresult.txt)
timespend = timer
myfind txtpath
timespend = round(timer - timespend,2)
txtresult = 搜索完成! & vbcrlf & 共找到文件: & filetotal & 个. & vbcrlf & 共搜索目录: & dirtotal & 个. & vbcrlf & 用时: & timespend & 秒.
msgbox txtresult &结果保存在&spath &\searchresult.txt
outfile.close
set outfile = nothing
set fso = nothing
end if
end sub
'-------------------------------------工具整理模块第一步结束----------------------------------------
'----------------------------------------工具整理模块第二步开始--------------------------------------------------
path=document.location.href
path=replace(path,file:///,)
path=replace(path,%20, )
path=replace(path,#,)
dbname=path&.mdb
'msgbox dbname
function showcolumn(mdb)
dbdriver = provider=microsoft.jet.oledb.4.0;data source=
set objconn = createobject(adodb.connection)
objconn.connectionstring = dbdriver & mdb
objconn.open
set objtablers = objconn.openschema(20,array(empty, empty, empty, table))
set objcolumnrs = objconn.openschema(4,array(empty, empty, objtablers(table_name).value))
while not objcolumnrs.eof
columns=columns&(objcolumnrs(column_name))&|
objcolumnrs.movenext
wend
showcolumn=columns
end function
sub showpath
exeurl = inputbox( 请输入刚才生成的searchresult.txt地址:, 输入, searchresult.txt )
'seletclist= split(replace(showcolumn(dbname),id|,),|)
seletclist= replace(showcolumn(dbname),id|,)
seletclist=replace(seletclist,demo|,)
seletclist=split(seletclist,|)
sselect=
for i=0 to ubound(seletclist)-1
sselect=sselect&
next
sselect=sselect &
alist=split(loadfile(exeurl), vbcrlf)
shtml =
shtml = shtml & alist(i)& 分类&sselect&工具说明: shtml = shtml & |
document.getelementbyid(divlist).innerhtml = shtml
end sub
function loadfile(byval file)
dim objstream
on error resume next
set objstream = createobject(adodb.stream)
if err.number=-2147221005 then
msgbox
err.clear
end if
with objstream
.type = 2
.mode = 3
.open
.loadfromfile file
.charset = gb2312 '可以根据需求,把这里的编码修改成utf-8等编码格式
.position = 2
.lineseparator=13
loadfile = .readtext
.close
end with
set objstream = nothing
end function
function doaction()
{
var conn = new activexobject(adodb.connection);
conn.open(dbq=+window.location.pathname + '.mdb'+;driver={microsoft access driver (*.mdb)};);
var rs = new activexobject(adodb.recordset);
var i, o, memo;
o = document.getelementsbytagname('select');
i = 0;
while(true)
{
o[i];
if(!o[i]) break;
if(document.getelementsbyname('checkbox' + i)[0].checked)
{
memo = document.getelementsbyname('demo' + i)[0];
input= document.getelementsbyname('checkbox' + i)[0]
// alert(input.value+'\r\n'+o[i].value + '\r\n' + memo.value+'\r\n'); 换成数据库操作
sql=insert into test (+o[i].value+,demo) values (+'+input.value+'+,+'+memo.value+'+);
//alert(sql);
rs.open(sql, conn);
//rs.close();
//rs = null;
//conn.close();
//conn = null;
}
i++;
}
alert(写入成功,你可以再操作别的目录了);
}
function selectbyprename(sprename)
{
var o;
o = document.getelementsbytagname('input');
for(var i = 0; i < o.length; i++)
{
if(o[i].name.indexof(sprename) == 0)
o[i].checked = !o[i].checked;
}
}
//---------------------------------------------------------工具整理模块第二步结束------------------------------------------
'=============================================================软件查找模块开始
sub mysqlecute
path=document.location.href
path=replace(path,file:///,)
path=replace(path,%20, )
path=replace(path,#,)
dbname=path&.mdb
set fso=createobject(scripting.filesystemobject)
if fso.fileexists(path&.mdb) then
dbdriver = provider=microsoft.jet.oledb.4.0;data source=
set objconn = createobject(adodb.connection)
objconn.connectionstring = dbdriver & dbname
objconn.open
set objtablers = objconn.openschema(20,array(empty, empty, empty, table))
set objcolumnrs = objconn.openschema(4,array(empty, empty, objtablers(table_name).value))
do while not objtablers.eof
document.write 表名--------------->&objtablers(table_name).value&
objtablers.movenext
loop
while not objcolumnrs.eof
columns=columns&(objcolumnrs(column_name))&|
objcolumnrs.movenext
wend
showcolumnss=columns
seletclist= split(showcolumnss,|)
document.write 字段名<-->
for i=0 to ubound(seletclist)-1
document.write ★ &seletclist(i)
next
document.write
document.write(