Software management tool 0.1 compiled by hta (IE7.0 tested)

Source: Internet
Author: User

Custom classification is an archive file. For example, you can classify your tools into penetration, overflow, network horse, and browsing tools. You can create unlimited categories.
After the classification is created, you can perform the second step to classify the dll files based on the suffix you need. We do not recommend that you also classify the dll files. just collect the files such as exe and webshell.
After the second step is found, you can select the searchresult.txt created by the program, and select the category to be saved according to the prompt, and automatically save it to the database.
The third step is to find your tool based on the custom SQL statement.
The program is just a prototype. You can provide suggestions, fix bugs and upgrade the software. Copy codeThe Code is as follows: <HTML>
<HEAD>
<HTA: Application ID = "oHTA"
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">
<TITLE> Software v0.1 code by lcx myweb: http://www.haiyangtop.net </TITLE>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
</Head>
<Style>
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;
}
</Style>
<Body>
<Center>
<Br>
<Div id = "DivList"> </div>
<Div id = "start" style = "display: none;">
<Div id = baobao> Custom database fields, that is, software classification </div>
<Button onclick = vbs: addinput> <strong> set the field name + </strong> </button>
<Button onclick = vbs: delinput> <strong> reduce field names-</strong> </button>
<Button onclick = vbs: countall> <strong> Create a database </strong> </button>
</Div>
<A href = # onclick = "ShowHideLayer ('start')"> program initialization </a> </br>
<Div id = "starttwo" style = "display: none; overflow: scroll">
<Button onclick = vbs: startwo> <strong> tool sorting step 1 </strong> </button>
<Button onclick = vbs: showpath> <strong> the tool sorts out step 2. Select "write to Database" in the list. </strong> </button>
</Div>
<A href = # onclick = "ShowHideLayer ('starttwo')"> Software arrangement </a> </br>
<Div id = "startthree" style = "display: none;">
<Button onclick = vbs: mysqlecute> <strong> Software search, custom SQL statement execution </strong> </button>
</Div>
<A href = # onclick = "ShowHideLayer ('startthree ')"> Software search </a> </br>
<A href = # onclick = vbs: showHelp> software usage instructions </a> </br>
<Br>
<Div style = "position: absolute; top: 30px; left: 3px" id = "q00">
<Div style = "position: absolute; top: 30px; left: 3px; width: 3; height: 2; z-index: 4" id = "q2">
<P style = "font-size: 44pt"> <font color = "# FFFFff"> ○ </p>
</Div>
<Div style = "position: absolute; top:-10px; left: 0px; width: 3; height: 2; z-index: 5" id = "q3">
<P style = "font-size: 42pt"> <font color = "# FFFFff"> ○ </p>
</Div>
<Div style = "position: absolute; top: 17; left: 2px; width: 6; height: 2; z-index: 1" id = "q4">
<P style = "font-size: 32pt"> <font color = "# FF0000"> ■ </p>
</Div>
</Div>
</Center>
<SCRIPT language = vbs>
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
'---------------------------------------- Start of custom database table creation module ---------------------------------------------------------------
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 = "category name" & I
Baobao. appendChild (input)
Next
End sub
Sub delinput
Set input = document. getElementsByTagName ("input ")
If (input. length> 0) then baobao. removeChild (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 "the database already exists. Please delete it"
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 "the database has been created and you can proceed"
End if
Set clx = Nothing
Set cat = Nothing
Set fso = Nothing
Cn. Close
Set cn = Nothing
End Sub
'------------------------------------------ User-Defined database table creation module ends -------------------------------------------------------
'------------------------------------- Step 1 of the tool organization module ----------------------------------------
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, "select the folder you want to search for. The folder should not be too large to exceed a few GB.", OPTIONS, strPath)
If objFolder Is Nothing Then
Msgbox "You have not selected any valid directory! "
Else
Set objFolderItem = objFolder. Self
SPath = objFolderItem. Path
Txtpath = sPath
Set Fso = CreateObject ("scripting. filesystemobject ")
FileTotal = 0
DirTotal = 0
KeyWord = LCase (inputbox ("Enter the suffix of the file to be sorted:", "file search ",". exe or. bat or. php. This is generally the case. dll manually add "))
Set outFile = Fso. createtextfile (sPath & "\ SearchResult.txt ")
TimeSpend = Timer
MyFind txtPath
TimeSpend = round (Timer-TimeSpend, 2)
TxtResult = "search complete! "& VbCrLf &" found files: "& FileTotal. "& vbCrLf &" total search directories: "& DirTotal. "& vbCrLf &": "& TimeSpend &" seconds."
Msgbox txtResult & "results are saved in" & sPath & "\ SearchResult.txt"
OutFile. close
Set outFile = nothing
Set Fso = nothing
End if
END SUB
'------------------------------------- The first step of the tool sorting module is completed ----------------------------------------
'-------------------------------------- Step 2 of the tool organization module --------------------------------------------------
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, "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 ("Enter the SearchResult.txt address that was just generated:", "input", "SearchResult.txt ")
'Seletclist = split (replace (showColumn (dbname), "Id |", ""), "| ")
Seletclist = replace (showColumn (dbname), "Id | ","")
Seletclist = replace (seletclist, "demo | ","")
Seletclist = split (seletclist, "| ")
SSelect = "<select id = 'select'>"
For I = 0 to UBound (seletclist)-1
SSelect = sSelect & "<option value =" & seletclist (I) & ">" & seletclist (I) & "</option>"
Next
SSelect = sSelect & "</select>"
AList = Split (LoadFile (Exeurl), vbCrLf)
SHTML = "<table width = '000000' border = '1' cellspacing = '0' cellpadding = '0'>"
For I = 0 to UBound (aList)-1
SHTML = sHTML & "<tr> <td>"
SHTML = sHTML & aList (I) & "<input type = checkbox name = checkBox" & I & "value =" & aList (I) & "> category" & sSelect & "tool Description: <textarea rows = 1 cols = 20 name = demo" & I & "> </textarea>"
SHTML = sHTML & "<br/> </td> </tr>"
Next
SHTML = sHTML & "</table> <br/> <button onclick = 'javascript: SelectByPreName (" "checkBox ""); '/> <strong> select all </strong> </button> <button onclick = 'javascript: DoAction (); '/> <strong> write to database </strong> </button>"
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 "<div align = 'center'> unfortunately, your host does not support ADODB. Stream and cannot use this program </div>"
Err. Clear
End If
With objStream
. Type = 2
. Mode = 3
. Open
. LoadFromFile File
. Charset = "GB2312" 'You can modify the encoding here to UTF-8 and Other encoding formats as needed.
. Position = 2
. LineSeparator = 13
LoadFile =. ReadText
. Close
End
Set objStream = Nothing
End Function
</SCRIPT>
<Script language = javascript>
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'); change to database operation
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 ("Writing succeeded, you can operate another directory ");
}
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;
}
}
// ------------------------------------------------------------- The second step of the tool sorting module ends ------------------------------------------
</Script>
<SCRIPT Language = "VBScript">
'================================================ ================================== Start of the software search Module
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, "TABLE "))
Set objColumnRS = objConn. OpenSchema (4, Array (Empty, Empty, objTableRS ("Table_Name"). Value ))
Do While Not objTableRS. EOF
Document. write "table name --------------->" & objTableRS ("Table_Name"). Value & "</br>"
ObjTableRS. MoveNext
Loop
While Not objColumnRS. EOF
Columns = Columns & (objColumnRS ("Column_Name") & "|"
ObjColumnRS. MoveNext
Wend
ShowColumnss = Columns
Seletclist = split (showColumnss, "| ")
Document. write "field name <-->"
For I = 0 to UBound (seletclist)-1
Document. write"★"& Seletclist (I)
Next
Document. write "</br>"
Document. write ("<style>" & vbNewLine)
Document. write ("body" & vbNewLine)
Document. write ("{" & vbNewLine)
Document. write ("font-size: 12;" & vbNewLine)
Document. write ("BACKGROUND: # DADADA;" & vbNewLine)
Document. write ("margin-left: 5;" & vbNewLine)
'Document. write ("overflow: visible;" & vbNewLine)
Document. write ("}" & vbNewLine)
Document. write ("<" & Chr (47) & "style>" & vbNewLine)
Document. write ("<table width =" "100%" "border =" "1" cellspacing = "" 0 "" cellpadding = "" 1 "" bordercolorlight = "" #000000" "bordercolordark =" "# FFFFFF" ">" & vbNewLine)
Document. write ("<tr align =" "center" "valign =" "top"> "& vbNewLine)
Mysql = InputBox ("Enter the SQL statement:", "input", "select * from test where id <50 ")
Set objRS = objConn. Execute (mysql)
If objrs. state = 1 then
For I = 0 to objRs. Fields. Count-1
Document. write "<td>" & objRS. Fields (I). name & "</td>"
Next
Document. write "</tr>"
End If
Document. write ("<tr align =" "center" "valign =" "top"> "& vbNewLine)
DO While NOT objRS. Eof
For I = 0 to objRs. Fields. Count-1
If IsNull (objRs. Fields (I). value) or objRs. Fields (I). value = "" or objRs. Fields (I). value = "" then
Document. write "<td> </td>"
Else
If condition Rev (objRs. Fields (I). value, "\",-1, 0) <> 0 Then
Url = split (objRs. Fields (I). value ,"\")
Urllian = left (objRs. Fields (I). value, len (objRs. Fields (I). value)-len (url (UBound (url)-1)
Document. write "<td>" & objRs. Fields (I). value & "<a href =" & urllian & "> open the directory </a> </td>"
Else
Document. write "<td>" & objRs. Fields (I). value & "</td>"
End if
End if
Next
Document. write "</tr>"
ObjRS. MoveNext
J = j + 1
Loop
Set objRs = nothing
Set objTableRS = nothing
ObjConn. Close
Set objConn = nothing
Document. write ("<" & Chr (47) & "table>" & vbNewLine)
Else
MsgBox "the database does not exist. copy it to the same folder"
End if
End Sub
'================================================ =================================== Software search module ends
Sub showHelp
Dim msg
Msg = "software management tool 0.1 [IE7.0 tested]" & vbcrlf
Msg = msg & "--------------------------------------------------" & vbcrlf
Msg = msg & "program Initialization is to create a database with the same name as this file and suffix mdb" & vbcrlf
Msg = msg & "Custom classification: archive files. For example, you can classify your tools into penetration, overflow, network horse, and browsing tools. You can create unlimited classification." & vbcrlf
Msg = msg & "after the classification is created, you can perform Step 2 to classify the dll files based on the suffix you need. We do not recommend that you also classify the dll files, just collect exe and webshell. "& vbcrlf
Msg = msg & "after the second step is found, you can select the searchresult.txt created by the program, and select the category to be saved according to the prompt to automatically save it to the Database" & vbcrlf
Msg = msg & "The third step is to search for your tool based on custom SQL statements." & vbcrlf
Msg = msg & "the program is just a prototype. You can provide suggestions to fix bugs and upgrade the software." & vbcrlf
Msgbox msg
End sub
</Script>
<Script language = javascript>
// Display and hide Layers
Function ShowHideLayer (ID)
{
Var O = document. getElementById (ID );
If (O)
{
If (O. style. display = '')
O. style. display = 'none ';
Else
O. style. display = '';
}
}
</Script>
</BODY>
</HTML>

Because the direct code is prone to problems, we recommend that you download the script.
: Http://xiazai.jb51.net/200905/other/tools_hta.rar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.