So, I made this little script as a way to quickly check several different websites for the reputation on an IP address. I do have a question though…well 2
First, run the script, and see how I had to open up several different IE browser windows. Is there a way to keep all of this in one window, and still input the necessary info?
Also, I have an issue with a website that really needs to be able to be queried, it’s one of our real go to guys.
www.dnsbl.info
Any suggestions on how to get to query this website like the other ones listed in this script? I am new to powershell, so any advice would help.
And if anyone else does IT security, this script has definitely been a pretty quick and easy way to tell if an IP is malicious or not.
====================================================================
$host.ui.rawui.ForegroundColor=“Red”
$a = (Get-Host).UI.RawUI
$b = $a.WindowSize
$b.Width = 50
$b.Height = 20
$a.WindowSize = $b
$global=$name = Read-Host ‘Which IP do you want to scan?’
$ie = New-Object -com InternetExplorer.Application
$ie.visible=$true
start-sleep 1
$ie.navigate2(“http://www.ipvoid.com”)
$ie.top = 0; $ie.width = 600; $ie.height = 600; $ie.Left = 0
while($ie.ReadyState -ne 4) {start-sleep -m 100}
$ie.document.getElementById(“ip_address”).value= “$name”
start-sleep 1
$submit = $ie.Document.getElementsByTagName(‘button’) | where-object {$_.type -eq “submit”}
$submit.Click()
$ie = New-Object -com InternetExplorer.Application
$ie.visible=$true
$ie.navigate(“http://www.trustedsource.org/”)
$ie.top = 0; $ie.width = 600; $ie.height = 600; $ie.Left = 600
while($ie.ReadyState -ne 4) {start-sleep -m 100}
$ie.document.getElementById(“q”).value= “$name”
start-sleep 1
$ie.document.getElementById(“dummy”).Click()
$ie = New-Object -com InternetExplorer.Application
$ie.visible=$true
$ie.navigate(“http://urlquery.net”)
$ie.top = 0; $ie.width = 600; $ie.height = 600; $ie.Left = 1200
while($ie.ReadyState -ne 4) {start-sleep -m 100}
$ie.document.getElementById(“url”).value= “$name”
start-sleep 1
$ie.document.getElementById(“url-submit”).Click()
$ie = New-Object -com InternetExplorer.Application
$ie.visible=$true
$ie.navigate(“http://whois.domaintools.com”)
$ie.top = 600; $ie.width = 600; $ie.height = 600; $ie.Left = 0
while($ie.ReadyState -ne 4) {start-sleep -m 100}
$ie.document.getElementById(“landing-whois”).value= (“$name”)
start-sleep 1
$ie.document.getElementById(“whois-search”).Click()
$ie = New-Object -com InternetExplorer.Application
$ie.visible=$true
$ie.navigate(“zulu.zscaler.com”)
$ie.top = 600; $ie.width = 600; $ie.height = 600; $ie.Left = 600
while($ie.ReadyState -ne 4) {start-sleep -m 100}
$ie.document.getElementById(“submission_submission”).value= “$name”
start-sleep 1
$submit = $ie.Document.getElementsByTagName(‘input’) | where-object {$_.type -eq “image”}
$submit.Click()
$ie = New-Object -com InternetExplorer.Application
$ie.visible=$true
$ie.navigate(“http://www.borderware.com”)
$ie.top = 600; $ie.width = 600; $ie.height = 600; $ie.Left = 1200
while($ie.ReadyState -ne 4) {start-sleep -m 100}
$ie.document.getElementById(“ip”).value= (“$name”)
start-sleep 1
$ie.document.getElementById(“submit”).Click()