darkoperator / Posh-Shodan

PowerShell Module to interact with the Shodan service
BSD 3-Clause "New" or "Revised" License
133 stars 54 forks source link

Set-ShodanAPIKey fails in pwsh 7.3.3 #3

Open n-engelhardt opened 1 year ago

n-engelhardt commented 1 year ago
PS C:\Users\[redacted]> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.3
PSEdition                      Core
GitCommitId                    7.3.3
OS                             Microsoft Windows 10.0.22621
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

PS C:\Users\[redacted]> Get-Module -Name Posh-Shodan

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     1.2                   Posh-Shodan                         {Get-ShodanAPIInfo, Get-ShodanDNSResolve, Get-ShodanDNSReverse, Get-ShodanHostService…}

PS C:\Users\[redacted]> Set-ShodanAPIKey

cmdlet Set-ShodanAPIKey at command pipeline position 1
Supply values for the following parameters:
APIKey: [redacted]
MasterPassword: [redacted]
Set-Content: Cannot process argument transformation on parameter 'Encoding'. 'Byte' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. (Parameter 'name')
darkoperator commented 1 year ago

Makes sense I stopped maintaining the module almost 10yrs ago. The functions it depends on changed from version 5.1. Will see if I can ge my hands on another key to tests and updated the function./