desired output:
nicholas@mordor:~$
nicholas@mordor:~$ lynx https://api.iocparser.com/url --dump
{"message": "The method is not allowed for the requested URL."}
nicholas@mordor:~$
doesn't have to be pretty.
current output:
PS /home/nicholas>
PS /home/nicholas> (Invoke-RestMethod -Method Post -Uri 'https://api.iocparser.com/url' -Headers @{"Content-Type" = "application/json"} -Body (@{'url' = 'https://pastebin.com/raw/rgnvuYi2'} | ConvertTo-Json) | ConvertTo-xml).outerxml
<?xml version="1.0" encoding="utf-8"?><Objects><Object Type="System.Management.Automation.PSCustomObject"><Property Name="data" Type="System.Management.Automation.PSCustomObject"><Property Type="System.String">@{FILE_HASH_SHA1=System.Object[]; DOMAIN=System.Object[]; IPv6=System.Object[]; YARA_RULE=System.Object[]; IPv4=System.Object[]; EMAIL=System.Object[]; FILE_NAME=System.Object[]; BITCOIN_ADDRESS=System.Object[]; URL=System.Object[]; MAC_ADDRESS=System.Object[]; FILE_HASH_MD5=System.Object[]; CVE=System.Object[]; FILE_HASH_SHA256=System.Object[]; ASN=System.Object[]; MITRE_ATT&CK=System.Object[]}</Property><Property Name="FILE_HASH_SHA1" Type="System.Management.Automation.PSNoteProperty">System.Object[]</Property><Property Name="DOMAIN" Type="System.Management.Automation.PSNoteProperty">System.Object[]</Property><Property Name="IPv6" Type="System.Management.Automation.PSNoteProperty">System.Object[]</Property><Property Name="YARA_RULE" Type="System.Management.Automation.PSNoteProperty">System.Object[]</Property><Property Name="IPv4" Type="System.Management.Automation.PSNoteProperty">System.Object[]</Property><Property Name="EMAIL" Type="System.Management.Automation.PSNoteProperty">System.Object[]</Property><Property Name="FILE_NAME" Type="System.Management.Automation.PSNoteProperty">System.Object[]</Property><Property Name="BITCOIN_ADDRESS" Type="System.Management.Automation.PSNoteProperty">System.Object[]</Property><Property Name="URL" Type="System.Management.Automation.PSNoteProperty">System.Object[]</Property><Property Name="MAC_ADDRESS" Type="System.Management.Automation.PSNoteProperty">System.Object[]</Property><Property Name="FILE_HASH_MD5" Type="System.Management.Automation.PSNoteProperty">System.Object[]</Property><Property Name="CVE" Type="System.Management.Automation.PSNoteProperty">System.Object[]</Property><Property Name="FILE_HASH_SHA256" Type="System.Management.Automation.PSNoteProperty">System.Object[]</Property><Property Name="ASN" Type="System.Management.Automation.PSNoteProperty">System.Object[]</Property><Property Name="MITRE_ATT&CK" Type="System.Management.Automation.PSNoteProperty">System.Object[]</Property></Property><Property Name="meta" Type="System.Management.Automation.PSCustomObject"><Property Type="System.String">@{description=https://pastebin.com/raw/rgnvuYi2; title=https://pastebin.com/raw/rgnvuYi2; url=https://pastebin.com/raw/rgnvuYi2; tags=System.Object[]}</Property><Property Name="description" Type="System.Management.Automation.PSNoteProperty">https://pastebin.com/raw/rgnvuYi2</Property><Property Name="title" Type="System.Management.Automation.PSNoteProperty">https://pastebin.com/raw/rgnvuYi2</Property><Property Name="url" Type="System.Management.Automation.PSNoteProperty">https://pastebin.com/raw/rgnvuYi2</Property><Property Name="tags" Type="System.Management.Automation.PSNoteProperty">System.Object[]</Property></Property><Property Name="status" Type="System.String">success</Property></Object></Objects>
PS /home/nicholas>
PS /home/nicholas>
PS /home/nicholas>
PS /home/nicholas> (Invoke-RestMethod -Method Post -Uri 'https://api.iocparser.com/url' -Headers @{"Content-Type" = "application/json"} -Body (@{'url' = 'https://pastebin.com/raw/rgnvuYi2'} | ConvertTo-Json) | ConvertTo-json).tostring
OverloadDefinitions
-------------------
string ToString()
string ToString(System.IFormatProvider provider)
string IConvertible.ToString(System.IFormatProvider provider)
PS /home/nicholas>
leaving aside that I'm not passing the URL
properly, I'm only interested in the raw result, or, even better, a JSON
object (or similar).