Created
October 15, 2011 00:45
-
-
Save miyukki/1288787 to your computer and use it in GitHub Desktop.
Saving ".vbs" file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
On Error Resume Next | |
Dim objWshShell | |
Dim objFSO | |
Dim objFile | |
Set objWshShell = WScript.CreateObject("WScript.Shell") | |
Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") | |
If Err.Number = 0 Then | |
Set objFile = objFSO.OpenTextFile(objWshShell.ExpandEnvironmentStrings("%USERPROFILE%") & "\AppData\Local\GGOOD marketing\NicoGadget\system\_.html") | |
If Err.Number = 0 Then | |
getAccountInfo(objFile.ReadAll) | |
objFile.Close | |
Else | |
WScript.Echo "ファイルオープンエラー: " & Err.Description | |
End If | |
Else | |
WScript.Echo "エラー: " & Err.Description | |
End If | |
Set objFile = Nothing | |
Set objFSO = Nothing | |
Function getAccountInfo(text) | |
Dim objRE | |
Dim reMatch | |
Dim Mail | |
Dim Password | |
Set objRE = new RegExp | |
objRE.IgnoreCase = True | |
objRE.pattern = "<input value=""(.*?)"" type=""hidden"" name=""mail"" id=""mail"">" | |
Set reMatch = objRE.Execute(text) | |
If reMatch.Count > 0 Then | |
'WScript.Echo reMatch(0).SubMatches.Item(0) | |
Mail = reMatch(0).SubMatches.Item(0) | |
End If | |
objRE.pattern = "<input value=""(.*?)"" type=""hidden"" name=""password"" id=""password"">" | |
Set reMatch = objRE.Execute(text) | |
If reMatch.Count > 0 Then | |
'WScript.Echo reMatch(0).SubMatches.Item(0) | |
Password = reMatch(0).SubMatches.Item(0) | |
End If | |
Set objRE = Nothing | |
WScript.Echo "メールアドレス: " & Mail & vbCrLf &_ | |
"パスワード: " & Password | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment