24/06/09 21:55:25.33 SX44F/wM0.net
EMail = "xxxxxx@gmail.com"
Pass = "xxxxxxxx"
If CreateObject("Scripting.FileSystemObject").FileExists("acorn_login.curl") Then
D = DateDiff("s", CreateObject("Scripting.FileSystemObject").GetFile("acorn_login.curl").DateLastModified, Now) / 60 / 60 / 24
Else D = 1 End If
If D > 0.5 Then
S = CreateObject("WScript.Shell").Exec("conhost --headless curl -D - -d ""email=" & EMail & """ -d ""pass=" & Pass & """ URLリンク(donguri.5ch.net)).StdOut.ReadAll
If InStr(S, "Set-Cookie: acorn=") > 0 Then
CreateObject("Scripting.FileSystemObject").OpenTextFile("acorn_login.curl", 2, True).Write S
S = Replace(Replace(Split(Split(S, "Set-Cookie: acorn=")(1), ";")(0), vbCr, ""), vbLf, "")
Ini = CreateObject("Scripting.FileSystemObject").OpenTextFile("Jane2ch.ini", 1).ReadAll
Set RE = New RegExp : RE.Pattern = ";acorn=\w*(;?)" : Ini = RE.Replace(Ini, ";acorn=" & S & "$1")
Set RE = New RegExp : RE.Pattern = "=acorn=\w*(;?)" : Ini = RE.Replace(Ini, "=acorn=" & S & "$1")
Ini = Replace(Ini, vbCrLf & "WrtCookie=" & vbCrLf, vbCrLf & "WrtCookie=acorn=" & S & vbCrLf)
If InStr(Ini, "acorn=" & S) = 0 Then Ini = Replace(Ini, vbCrLf & "WrtCookie=", vbCrLf & "WrtCookie=acorn=" & S & ";")
CreateObject("Scripting.FileSystemObject").OpenTextFile("Jane2ch.ini", 2, True).Write Ini
Else MsgBox "Warning: Login failed." & vbCrLf & S, 48, "acorn login" End If
End If
CreateObject("WScript.Shell").Run "Jane2ch.exe"