Showing posts with label msxml. Show all posts
Showing posts with label msxml. Show all posts

Monday, June 11, 2007

Viral detection on multiple page loads

Aside from having too much page loads detected as being viral, too much query from a single point of origin is also detected as viral... now this is the time that when the search results will prompt you for message that this query format is detected as virus and will ask you to key in the confirmation code to confirm that it was a valid search query.

Anyway, since ie will just crash your machine when performing too much page load and queries, I have written another scriptlet that utilizes MSXML2.ServerXMLHTTP.4.0 instead, so no api calls are made to unreliable but wonderfully obedient ie.

Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP.4.0")

'::::: Set your proxy here, comment it if not required


xmlhttp.setProxy 2,"10.1.1.1:8080"

'::::: Open the url using http Get

xmlhttp.open "GET", purl, false

You may use the following as part of your query URL:

InURL:Index.Of?mp3 InText:Index.Of?mp3 InTitle:Index.Of?mp3 InURL:Top Keywords InText:Top Keywords InTitle:Top Keywords InURL:scripts InText:scripts InTitle:scripts InURL:niche InText:niche InTitle:niche InURL:adsense InText:adsense InTitle:adsense InURL:income InText:income InTitle:income InURL:3gp InText:3gp InTitle:3gp InURL:hotel InText:hotel InTitle:hotel InURL:travel InText:travel InTitle:travel InURL:medicine InText:medicine InTitle:medicine InURL:new InText:new InTitle:new InURL:best InText:best InTitle:best InURL:rare InText:rare InTitle:rare InURL:free InText:free InTitle:free InURL:finance InText:finance InTitle:finance InURL:movie InText:movie InTitle:movie InURL:download InText:download InTitle:download InURL:source InText:source InTitle:source InURL:game InText:game InTitle:game InURL:music InText:music InTitle:music InURL:audio InText:audio InTitle:audio InURL:film InText:film InTitle:film InURL:digital InText:digital InTitle:digital InURL:flight InText:flight InTitle:flight InURL:school


':::::: Make sure you define your Browser Agent or else queries will not be allowed and will prompt you for blocks of code that you might need to submit to rectify the malformed query.

xmlhttp.setRequestHeader "User-Agent","Microsoft Internet Explorer"


xmlhttp.send()


':::::: You can do anything with the search results, follow the links, blah
WScript.Echo xmlhttp.responseText

set xmlhttp = nothing


If at first you fail, call it version 1.0

Why Click it, If you can script it?

While 10,000 ecpm can earn you $0.40, one wonders how much it takes to actually earn...

A sequel to my previous post on my recent fascination on ecpm, page loads doesn't mean much if either the page loads are in millisecond and no links in the pages are clicked or the search option was utilized...

Adding an extra function allows the page loads to have a little extra sense as not only page loads will be peformed, but hey... even the search option is populated with a query string (maybe from an array, etc...)... and an added trick to perform the click to actually perform the query...

To fill up the input for the search utility:
.Document.All.tags("INPUT")("q").Value = searchKey

To Click the search button:
Set sButt = .Document.getElementsByTagName("INPUT")
For Each Butt in
sButt
If LCase(Butt.getAttribute("value")) = "search" Then
Butt.Click
Exit For
End If
Next

If this makes sense and actually is acceptable, why not click on all the links in the result page to add up to your ecpm queries...

Set xLinx = .Document.getElementsByTagName("a")
For Each Linx In xLinx
Linx.Click
Next

Note: Make sure that your site setting is to load the results in the same page, rather than popping up new windows... or else you will flood your screen with tons of ie windows... hahaha... (this, even if .visible=0)

A terminate process will help in getting rid of all the unwanted window popups:

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("SELECT * FROM Win32_Process WHERE Name = 'Iexplore.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next

Note: Do this after each page finishes loading after the click.

A draw back is that all your cookies and such are tracked, hence after numerous reloads and queries it might be detected as a viral activity, solution... clear your tracks...

First, get you cache path from your registry:
CachePath = WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Paths\Directory")

Then parse through the folders to delete all cache:
Set rootFolder = fso.GetFolder(CachePath)
Set subFolders = rootFolder.SubFolders
For Each folder in subFolders
fso.DeleteFolder(folder)
Next

You may reuse the same to delete the remaining files in the rootfolder. Just replace .SubFolders to .Files.

There you go...

As easy as it looks like and as cool as it may seem, this will not guarantee that you will actually earn anything based on pageloads and queries... ecpm is not as easily attainable although your site is now generating billions of pageloads\month...

And knowing how M$oft Internet Explorer sucks bigtime, you know that it will crash alot if you execute this like 10,000 times????

Anyway, I use Opera and Firefox 50/50... I only use IE to test my scripts to see how long it will take to crash it...

Good luck!

If your first attempt fails, call it version 1.0

Tuesday, June 05, 2007

1,000 eCPM can earn you only $0.01

Just a script that does nothing but loads a page repeatedly...
Hmmm... might be useful or not useful...
Can It be used to accumulate eCPM?

Totally up to you...

psURL = "Your desired url..."
psURL2 = "Second desired url..."
Dim x
Dim IE

x=0
Set IE = CreateObject("InternetExplorer.Application")

With IE
.menubar=0

.toolbar=0
.statusBar=0
.navigate psURL
.visible=0
.resizable=1
Do while .busy
Loop

Do While x < "desired amout of page loads"
WScript.Echo Now & " - Count Load: " & x
.navigate2 psURL
WScript.Echo Now & " - Loaded: " & psURL
Do while .busy
Loop

x =x + 1
WScript.Echo Now & " - 15sec sleep..."
WScript.Sleep(15000)
.navigate2 psURL2
WScript.Echo Now & " - Loaded: " & psURL2
Loop
End With




Monday, May 21, 2007

Powershell Lynx Project

Those were the days of Lynx when you used to browse the web as text thru the console...

My previous blogs were about scripting with Yahoo api search services. Well, since blogging at work is not really encouraged, I have decided to create my powershell version of Lynx. Since I'm scripting most of the time due to adHoc script requests, my boss won't even realize that I'm actually blogging... hehehe...

For starters, a scriptlet that navigates IE:

$ie = New-Object -com InternetExplorer.Application
$ie.Visible=$true
$ie.MenuBar=$false
$ie.ToolBar=$false
$ie.StatusBar=$false
$ie.Navigate("http://26thgstreet.blogspot.com")


Visibility of IE can be set to false later after I finalized the function to get the HTMLDocument.Innertext and write it to the console.

I will aso have to create a function to accept console arguments to be posted to the HTMLDocument so that I can update my blogs...

Stay tuned for the script updates.



Free PowerShell Book

My msdn feeds shed some light on my powershell addiction after receiving the good news.

It's finally out, thanks to Frank Koch.


The subtitle is "An introduction to scripting technologies for people with no real background knowledge". Read more.

Get it here.


Friday, May 18, 2007

Yahoo Search Script

Something to share...

Using MsXML.DOMDocument, you will be able to query Yahoo! API (
http://api.search.yahoo.com/WebSearchService/V1/webSearch?) .

Query Parameters used:


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Yahoo Search Script
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Const APP_ID = "insert your app ID"

'Grab the incoming search query or ask for one
If WScript.Arguments.Length = 0 Then
strQuery = InputBox("Enter a search Term")
Else
strQuery = WScript.Arguments(0)
End If

'Construct a Yahoo! Search Query
strLanguage = "en"
strReqURL = "http://api.search.yahoo.com/" & _
"WebSearchService/V1/webSearch?" & _
"appid=" & APP_ID & _
"&query=" & strQuery & _
"&language=" & strLanguage

'Start the XML Parser
Set MSXML = CreateObject("MSXML.DOMDocument")

'Set the XML Parser options
MSXML.Async = False

'Make the Request
strResponse = MSXML.Load(strReqURL)

'Make sure the request loaded
If (strResponse) Then

'Load the results
Set Results = MSXML.SelectNodes("//Result")

'Loop through the results
For x = 0 to Results.length - 1
strTitle = Results(x).SelectSingleNode("Title").text
strSummary = Results(x).SelectSingleNode("Summary").text
strURL = Results(x).SelectSingleNode("Url").text
strOut = (x + 1) & ". " & _
strTitle & vbCrLf & _
strSummary & vbCrLf & _
strURL & vbCrLf & vbCrLf
WScript.Echo strOut
Next

'Unload the results
Set Results = Nothing

End If

'Unload the XML Parser
Set MSXML = Nothing
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''