ウィルスの作り方・ウィルス保管場

このエントリーをはてなブックマークに追加
25ひよこ名無しさん
Option Explicit

Private mObjIE

Main

Public Sub Main()
On Error Resume Next

Dim strUrl, strMes, strRep
Dim objArgs
Dim i

Set objArgs = WScript.Arguments

strUrl = objArgs(0)
strMes = objArgs(1)
strRep = objArgs(2)

'ファイル読み取り
strMes = ReadFile(strMes)
26ひよこ名無しさん:04/12/01 23:41:03 ID:c1gxD9W8

'IEのオブジェクト作成
Set mObjIE = CreateObject("InternetExplorer.Application")

OpenIE(strUrl)
DoIE(strMes)
EatCookie(strRep)
CloseIE

'IEのオブジェクトをNothing
Set mObjIE = Nothing

End Sub
27ひよこ名無しさん:04/12/01 23:42:28 ID:c1gxD9W8


Private Function ReadFile(strPath)
On Error Resume Next

Dim strMes
Dim FSO
Dim f
Dim fStream

'オブジェクト作成
Set FSO = CreateObject("Scripting.FileSystemObject")
'ストリームオブジェクト作成
Set fStream = FSO.OpenTextFile(strPath)
'文字列取得
strMes = fStream.ReadAll()

ReadFile = strMes

End Function
28ひよこ名無しさん:04/12/01 23:42:49 ID:c1gxD9W8

Private Function OpenIE(u)
On Error Resume Next

mObjIE.Visible = True
mObjIE.Navigate u

Do Until mObjIE.Busy = False
WScript.Sleep 2000
Loop

End Function
29ひよこ名無しさん:04/12/01 23:43:18 ID:c1gxD9W8

Private Function DoIE(m)
On Error Resume Next

Dim objDoc
Dim objFrm

Set objDoc = mObjIE.Document
Set objFrm = objDoc.Forms(0)

objFrm.MESSAGE.Value = m

Do Until mObjIE.Busy = False
WScript.Sleep 2000
Loop

objFrm.submit.Click

Do Until mObjIE.Busy = False
WScript.Sleep 2000
Loop


Set ObjFrm = Nothing
Set ObjDoc = Nothing

End Function
30ひよこ名無しさん:04/12/01 23:47:34 ID:c1gxD9W8

Private Function EatCookie(SearchChar)
On Error Resume Next

Dim objDoc
Dim objFrm
Dim strFrm
Dim c

Set objDoc = mObjIE.Document
Set objFrm = objDoc.Forms(0)
strFrm = objFrm.innerHTML

c = InStr(1, strFrm, SearchChar, 1)

If c > 0 Then
objFrm.submit.Click
End If

Set objFrm = Nothing
Set objDoc = Nothing

End Function

Private Function CloseIE
On Error Resume Next

mObjIE.Quit

End Function
31ひよこ名無しさん:04/12/01 23:48:49 ID:c1gxD9W8
run.vbs "http://pc6.2ch.net/test/read.cgi/pcqa/1085576008/" "C:\res.txt" "承諾"