-
Notifications
You must be signed in to change notification settings - Fork 3
/
bing_rewards.ps1
30 lines (27 loc) · 1.06 KB
/
bing_rewards.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#I created this script to gain more Bing Rewards. I have it running as a schedualed task every hour while I'm asleep.
#The script gets its searches by querying google trends for that day then it opens IE with the search.
Add-Type -AssemblyName System.Web
Function QueryBing{
[cmdletbinding()]
param (
[parameter(mandatory = $true, ValueFromPipeline = $True, Position = 0)]
[string[]] $Query)
$IE = New-Object -ComObject internetexplorer.application
$Query = [System.Web.HttpUtility]::UrlEncode($Query)
$IE.navigate2("https://www.bing.com/search?q=" + $query)
$IE.visible = $true
Start-Sleep -Seconds 2
Get-Process iexplore | Stop-Process -Force
#add query to form from bing API
}
Function Get-GoogleTrends{
[xml] $result = Invoke-WebRequest http://www.google.com/trends/hottrends/atom/feed?pn=p1
$result.rss.channel.item.title
}
#loop twice because the xml from google only yeilds 20 results and bing allows 30 queries for rewards
$i = 0
for ($i -eq 0; $i -lt 2;)
{
Get-GoogleTrends | % { QueryBing $_ }
$i++
}