Instantly share code, notes, and snippets.

Embed
What would you like to do?
PowerShell snippet for submitting to urlscan.io - By Nicholas Gipson
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$Invoke = Invoke-WebRequest -Headers @{"API-Key" = "$apikey"} -Method Post ` -Body "{`"url`":`"$url`"}" -Uri https://urlscan.io/api/v1/scan/ ` -ContentType application/json
@unexpectedBy

This comment has been minimized.

Copy link

unexpectedBy commented Jul 5, 2018

thanks for this bro, if i need submit a url list, how can a edit this script?

@dmissp

This comment has been minimized.

Copy link

dmissp commented Jan 31, 2019

@unexpectedBy - I know it's a bit old, but I believe the list submission would just be wrapped inside a foreach.

$apikey = 'yourapikey'
$list = gc .\listofurls.txt
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

foreach ($url in $list){
write-host "Submitting $url"
$Invoke = Invoke-WebRequest -Headers @{"API-Key" = "$apikey"} -Method Post -Body "{"url":"$url"}" -Uri https://urlscan.io/api/v1/scan/ -ContentType application/json
start-sleep 2
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment