Created
January 17, 2016 20:03
-
-
Save anonymous/45419c70419074381e3f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param | |
( | |
[string]$xmlpath="myscan.xml", | |
[string]$respath="result.html" | |
) | |
$hash = @{} | |
[xml]$data = Get-Content $xmlpath | |
foreach( $host1 in $data.nmaprun.host ) | |
{ | |
if( $host1.ports.port.script ) | |
{ | |
$hash.Add( $host1.address.addr, "ftp://"+$host1.address.addr ) | |
} | |
} | |
Function MyFunction | |
{ | |
$hash.GetEnumerator() | ConvertTo-HTML -Property @{Label="FTP";Expression={"<a href='$($_.Value)'>$($_.Name)</a>"}} | |
} | |
$html = MyFunction | |
Add-Type -AssemblyName System.Web | |
[System.Web.HttpUtility]::HtmlDecode($html) | Out-File $respath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment