This repository was archived by the owner on Dec 17, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +57
-4
lines changed
Expand file tree Collapse file tree 3 files changed +57
-4
lines changed Original file line number Diff line number Diff line change 11function Get-UrlScanioDOM {
2+ <#
3+ . SYNOPSIS
4+ Return raw DOM of web page scanned by urlscan.io
5+
6+ . DESCRIPTION
7+ Returns raw DOM of the specified scan id by urlscan.io. If no path is specified DOM will write to console.
8+
9+ . PARAMETER id
10+ Unique ID of scan to return raw DOM of.
11+
12+ . PARAMETER Path
13+ Path to save copy of DOM as txt file.
14+
15+ . EXAMPLE
16+ Get-UrlScanioDOM -id b14db0aa-013c-4aa9-ad5a-ec947a2278c7 -Path c:\temp
17+ Saves output of specified id as C:\temp\b14db0aa-013c-4aa9-ad5a-ec947a2278c7.txt
18+ #>
19+
220 [CmdletBinding ()]
321 param (
4- [Parameter (ValueFromPipelineByPropertyName )]
22+ [Parameter (Mandatory = $true ,
23+ Position = 0 ,
24+ ValueFromPipelineByPropertyName ,
25+ ValueFromPipeline )]
26+ [ValidatePattern (' [\d\w]{8}-[\d\w]{4}-[\d\w]{4}-[\d\w]{4}-[\d\w]{12}' )]
527 [string ]$id ,
628 [string ]$Path
729 )
@@ -10,15 +32,15 @@ function Get-UrlScanioDOM {
1032 if ($PSBoundParameters.Path ) {
1133 if (Test-Path $Path - PathType Container) {
1234 try {
13- Invoke-WebRequest " https://urlscan.io/dom/$id /" - OutFile " $id .txt"
35+ Invoke-WebRequest " https://urlscan.io/dom/$id /" - OutFile " $id .txt" - UseBasicParsing
1436 Write-Verbose " DOM saved to $Path \$id .txt"
1537 } catch {
1638 $_.Exception.Message
1739 }
1840 }
1941 }
2042
21- $dom = Invoke-WebRequest " https://urlscan.io/dom/$id /"
43+ $dom = Invoke-WebRequest " https://urlscan.io/dom/$id /" - UseBasicParsing
2244
2345 return $dom.Content
2446 }
Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ Guid of scan to get details on.
1212. PARAMETER DataType
1313Data type to return. Provides quick access to specific subsets of data for interrogation.
1414
15+ . PARAMETER IncludeTaskDetails
16+ Includes details of scan along with data type specified.
17+
18+ . PARAMETER SimilarDomains
19+ List structurally similar domains.
20+
1521. EXAMPLE
1622Get-UrlScanioScan -uuid b14db0aa-013c-4aa9-ad5a-ec947a2278c7
1723Get urlscan.io report for the scan with uuid b14db0aa-013c-4aa9-ad5a-ec947a2278c7
Original file line number Diff line number Diff line change 11function Get-UrlScanioScreenshot {
2+ <#
3+ . SYNOPSIS
4+ Get copy of last screenshot taken by urlscan.io
5+
6+ . DESCRIPTION
7+ Retreives copy of screenshot present on urlscan.io result page and saves to the specified location.
8+
9+ . PARAMETER id
10+ Unique ID of scan to retrieve the screenshot of.
11+
12+ . PARAMETER Path
13+ Path to save the screenshot file to.
14+
15+ . EXAMPLE
16+ Get-UrlScanioScreenshot -id b14db0aa-013c-4aa9-ad5a-ec947a2278c7 -Path c:\temp
17+ Saves screenshot of specified id as C:\temp\b14db0aa-013c-4aa9-ad5a-ec947a2278c7.png
18+ #>
19+
220 [CmdletBinding ()]
321 param (
22+ [Parameter (Mandatory = $true ,
23+ Position = 0 ,
24+ ValueFromPipelineByPropertyName ,
25+ ValueFromPipeline )]
26+ [ValidatePattern (' [\d\w]{8}-[\d\w]{4}-[\d\w]{4}-[\d\w]{4}-[\d\w]{12}' )]
27+ [Alias (' uuid' , ' _id' )]
428 [string ]$id ,
29+ [Parameter (Mandatory = $true )]
530 [string ]$Path
631 )
732
@@ -12,7 +37,7 @@ function Get-UrlScanioScreenshot {
1237
1338 if (Test-Path $Path - PathType Container) {
1439 try {
15- Invoke-WebRequest " https://urlscan.io/screenshots/$id .png" - OutFile " $id .png"
40+ Invoke-WebRequest " https://urlscan.io/screenshots/$id .png" - OutFile " $id .png" - UseBasicParsing
1641 Write-Verbose " Screenshot saved to $Path \$id .png"
1742 } catch {
1843 $_.Exception.Message
You can’t perform that action at this time.
0 commit comments