The code _vbs using the ADSL dialing variable IP brush voting with VBS

Source: Internet
Author: User
Tags sleep
Previously wrote a use of ADSL dial-up IP Brush flow of the VBS, as long as the refresh of the page slightly modified (add an automatic submission of JS) is, but how to find can not find, can not be written again.
There is a way is the VBS directly submitted, but wrote a half-day, how did not run up, later modified in the post.
Write time encountered a problem, is the use of the Web page JS submission, will jump to show the results of the voting page, will pop up a successful dialog box, which will affect the following open page. and can not shield, so using a compromise, each end of the browser process, the page behind the brush.
Copy Code code as follows:

Const ForAppending = 8
Const ForReading = 1
Const FileName = "Iplog.txt"
Set objFSO = CreateObject ("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile (FileName, ForAppending, True)
objTextFile.WriteLine "------------------use ADSL dialing to change IP brush to vote-----------------"
objTextFile.WriteLine "" & Now
Objtextfile.close
For I=1 to 300 ' brushes how many tickets
Todo
'----------------------------dialing---------------------------------
Set pp = WScript.CreateObject ("Wscript.Shell")
Pp.run "rasdial outside the net/disconnect", 0
Wscript.Sleep 2000
Pp.run "rasdial outer net LAN245561315 11811", 0
Set pp = Nothing
Wscript.Sleep 2000
'----------------------------Read IP-------------------------------
StrComputer = "."
Set objWMIService = GetObject ("winmgmts:\\" & StrComputer & "\root\cimv2")
Set Ipconfigset = objWMIService.ExecQuery ("Select IPAddress from Win32_NetworkAdapterConfiguration where IPEnabled= TRUE ")
For each IPConfig in Ipconfigset
If ipconfig.ipaddress (0) <> "169.254.1.232" Then ' ADSL Local Area Connection
IPAddress = ipconfig.ipaddress (0)
End If
Next
'----------------------------determine if IP is duplicated-----------------------
Set objFSO = CreateObject ("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile (FileName, ForReading)
Do Until Objtextfile.atendofstream
StrIP = objTextFile.ReadLine
Arriplist = Split (StrIP, ",")
If arriplist (0) = IPAddress Then
Issame = True
Exit do
Else
Issame = False
End If
Loop
Objtextfile.close
Loop while issame = True
'----------------------------Save IP Records---------------------------
Set objFSO = CreateObject ("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile (FileName, ForAppending, True)
objTextFile.WriteLine IPAddress & "," & Now
Objtextfile.close
'----------------------------open the browser to start the brush---------------------
Set ie=wscript.createobject ("Internetexplorer.application")
Ie.visible=1 ' 1 browser visible 0 not visible
Ie.navigate "http://www.169ol.com/
"' Solve the problem of CNC Redirect (Netcom This is very annoying OH)
Wscript.Sleep 3000
' Submitted modified form, local also line, you need to set the IE security low, or each will be prompted.
Ie.navigate "Http://www.link888.net/testspeed.html"
Wscript.Sleep 10000
'----------------------------end the browser process------------------------
StrComputer = "."
Set objWMIService = GetObject ("winmgmts:" & "{impers}!\\" & strComputer & "\root\cimv2")
Set colprocesslist = objWMIService.ExecQuery ("select * from Win32_Process Where Name = ' IEXPLORE.exe '")
For each objprocess in colProcessList
Objprocess.terminate ()
Next
Next

Testspeed.html
Copy Code code as follows:

<form action= "http://www.xxx.cn/vote/kuangquanshui/addvote.asp" method= "Post" Name= "Form1" Id= "Form1" >
<input name= "vote" type= "checkbox" id= "vote" value= "" checked= "checked"/>
<input type= "Submit" name= "Submit2" value= "vote" >
</form>
<script language= "JavaScript" >
SetTimeout ("Document.form1.submit ()", 3000)//3 seconds after submission
</script>

This is the use of the Brush page (which contains the automatic submission of JS) to submit, there is a better way to directly use the VBS script to submit the form.
However, this will have limitations, I tested the voting system does not limit the submission of addresses, only limited IP, so can be submitted locally. Some servers are limited, so it's not possible to use direct submission forms.
You can use a frame to include the original page, and then use the JS script to submit the form in the frame to break through.
If he disables the frame reference, it will not be sent, it will have to be implemented through the software.
Prevent the ticket to be brushed:
1. Restrict IP
2. Verification code (slightly more complex, not too easy)
3. Restrictions on the source of the submission form.
4. Prohibit external frame references

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.