<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki.ixheim.de/index.php?action=history&amp;feed=atom&amp;title=Raspberry_pico_Payload_Ausf%C3%BChrer</id>
	<title>Raspberry pico Payload Ausführer - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ixheim.de/index.php?action=history&amp;feed=atom&amp;title=Raspberry_pico_Payload_Ausf%C3%BChrer"/>
	<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Raspberry_pico_Payload_Ausf%C3%BChrer&amp;action=history"/>
	<updated>2026-06-29T15:01:59Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Xinux Wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.ixheim.de/index.php?title=Raspberry_pico_Payload_Ausf%C3%BChrer&amp;diff=37264&amp;oldid=prev</id>
		<title>Mario.zimmermann am 15. Oktober 2022 um 09:03 Uhr</title>
		<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Raspberry_pico_Payload_Ausf%C3%BChrer&amp;diff=37264&amp;oldid=prev"/>
		<updated>2022-10-15T09:03:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 15. Oktober 2022, 09:03 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l8&quot; &gt;Zeile 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 8:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;from debug import DEBUG_MOUNT&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;from debug import DEBUG_MOUNT&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;from adafruit_hid.keyboard import Keyboard&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;from adafruit_hid.keyboard import Keyboard&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;from &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;adafruit_hid.&lt;/del&gt;keyboard_layout_de import KeyboardLayoutDE  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;from keyboard_layout_de import KeyboardLayoutDE  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;from &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;adafruit_hid.&lt;/del&gt;keycode_de import Keycode&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;from keycode_de import Keycode&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mario.zimmermann</name></author>
	</entry>
	<entry>
		<id>https://wiki.ixheim.de/index.php?title=Raspberry_pico_Payload_Ausf%C3%BChrer&amp;diff=37211&amp;oldid=prev</id>
		<title>Mario.zimmermann: Die Seite wurde neu angelegt: „* Bei verschiedenen Tasterturlayouts müssen diese in den lib/adafruit ordner gelegt werden  &lt;syntaxhighlight lang=&quot;python&quot;&gt; import usb_hid import time import…“</title>
		<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Raspberry_pico_Payload_Ausf%C3%BChrer&amp;diff=37211&amp;oldid=prev"/>
		<updated>2022-10-14T08:21:02Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „* Bei verschiedenen Tasterturlayouts müssen diese in den lib/adafruit ordner gelegt werden  &amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt; import usb_hid import time import…“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;* Bei verschiedenen Tasterturlayouts müssen diese in den lib/adafruit ordner gelegt werden&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import usb_hid&lt;br /&gt;
import time&lt;br /&gt;
import digitalio&lt;br /&gt;
from board import *&lt;br /&gt;
from debug import DEBUG_MOUNT&lt;br /&gt;
from adafruit_hid.keyboard import Keyboard&lt;br /&gt;
from adafruit_hid.keyboard_layout_de import KeyboardLayoutDE &lt;br /&gt;
from adafruit_hid.keycode_de import Keycode&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
duckyCommands = [&amp;quot;WINDOWS&amp;quot;, &amp;quot;GUI&amp;quot;, &amp;quot;APP&amp;quot;, &amp;quot;MENU&amp;quot;, &amp;quot;SHIFT&amp;quot;, &amp;quot;ALT&amp;quot;, &amp;quot;CONTROL&amp;quot;, &amp;quot;CTRL&amp;quot;, &amp;quot;DOWNARROW&amp;quot;, &amp;quot;DOWN&amp;quot;,&lt;br /&gt;
&amp;quot;LEFTARROW&amp;quot;, &amp;quot;LEFT&amp;quot;, &amp;quot;RIGHTARROW&amp;quot;, &amp;quot;RIGHT&amp;quot;, &amp;quot;UPARROW&amp;quot;, &amp;quot;UP&amp;quot;, &amp;quot;BREAK&amp;quot;, &amp;quot;PAUSE&amp;quot;, &amp;quot;CAPSLOCK&amp;quot;, &amp;quot;DELETE&amp;quot;, &amp;quot;END&amp;quot;,&lt;br /&gt;
&amp;quot;ESC&amp;quot;, &amp;quot;ESCAPE&amp;quot;, &amp;quot;HOME&amp;quot;, &amp;quot;INSERT&amp;quot;, &amp;quot;NUMLOCK&amp;quot;, &amp;quot;PAGEUP&amp;quot;, &amp;quot;PAGEDOWN&amp;quot;, &amp;quot;PRINTSCREEN&amp;quot;, &amp;quot;SCROLLLOCK&amp;quot;, &amp;quot;SPACE&amp;quot;,&lt;br /&gt;
&amp;quot;TAB&amp;quot;, &amp;quot;ENTER&amp;quot;, &amp;quot; a&amp;quot;, &amp;quot; b&amp;quot;, &amp;quot; c&amp;quot;, &amp;quot; d&amp;quot;, &amp;quot; e&amp;quot;, &amp;quot; f&amp;quot;, &amp;quot; g&amp;quot;, &amp;quot; h&amp;quot;, &amp;quot; i&amp;quot;, &amp;quot; j&amp;quot;, &amp;quot; k&amp;quot;, &amp;quot; l&amp;quot;, &amp;quot; m&amp;quot;, &amp;quot; n&amp;quot;, &amp;quot; o&amp;quot;, &amp;quot; p&amp;quot;, &amp;quot; q&amp;quot;, &amp;quot; r&amp;quot;, &amp;quot; s&amp;quot;, &amp;quot; t&amp;quot;,&lt;br /&gt;
&amp;quot; u&amp;quot;, &amp;quot; v&amp;quot;, &amp;quot; w&amp;quot;, &amp;quot; x&amp;quot;, &amp;quot; y&amp;quot;, &amp;quot; z&amp;quot;, &amp;quot; A&amp;quot;, &amp;quot; B&amp;quot;, &amp;quot; C&amp;quot;, &amp;quot; D&amp;quot;, &amp;quot; E&amp;quot;, &amp;quot; F&amp;quot;, &amp;quot; G&amp;quot;, &amp;quot; H&amp;quot;, &amp;quot; I&amp;quot;, &amp;quot; J&amp;quot;, &amp;quot; K&amp;quot;, &amp;quot; L&amp;quot;, &amp;quot; M&amp;quot;, &amp;quot; N&amp;quot;, &amp;quot; O&amp;quot;, &amp;quot; P&amp;quot;,&lt;br /&gt;
&amp;quot; Q&amp;quot;, &amp;quot; R&amp;quot;, &amp;quot; S&amp;quot;, &amp;quot; T&amp;quot;, &amp;quot; U&amp;quot;, &amp;quot; V&amp;quot;, &amp;quot; W&amp;quot;, &amp;quot; X&amp;quot;, &amp;quot; Y&amp;quot;, &amp;quot; Z&amp;quot;, &amp;quot;F1&amp;quot;, &amp;quot;F2&amp;quot;, &amp;quot;F3&amp;quot;, &amp;quot;F4&amp;quot;, &amp;quot;F5&amp;quot;, &amp;quot;F6&amp;quot;, &amp;quot;F7&amp;quot;, &amp;quot;F8&amp;quot;, &amp;quot;F9&amp;quot;, &amp;quot;F10&amp;quot;, &amp;quot;F11&amp;quot;, &amp;quot;F12&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
keycodeCommands = [Keycode.WINDOWS, Keycode.GUI, Keycode.APPLICATION, Keycode.APPLICATION, Keycode.SHIFT, Keycode.ALT, Keycode.CONTROL,&lt;br /&gt;
Keycode.CONTROL, Keycode.DOWN_ARROW, Keycode.DOWN_ARROW ,Keycode.LEFT_ARROW, Keycode.LEFT_ARROW, Keycode.RIGHT_ARROW, Keycode.RIGHT_ARROW,&lt;br /&gt;
Keycode.UP_ARROW, Keycode.UP_ARROW, Keycode.PAUSE, Keycode.PAUSE, Keycode.CAPS_LOCK, Keycode.DELETE, Keycode.END, Keycode.ESCAPE,&lt;br /&gt;
Keycode.ESCAPE, Keycode.HOME, Keycode.INSERT, Keycode.KEYPAD_NUMLOCK, Keycode.PAGE_UP, Keycode.PAGE_DOWN, Keycode.PRINT_SCREEN,&lt;br /&gt;
Keycode.SCROLL_LOCK, Keycode.SPACE, Keycode.TAB, Keycode.ENTER, Keycode.A, Keycode.B, Keycode.C, Keycode.D, Keycode.E, Keycode.F, Keycode.G,&lt;br /&gt;
Keycode.H, Keycode.I, Keycode.J, Keycode.K, Keycode.L, Keycode.M, Keycode.N, Keycode.O, Keycode.P, Keycode.Q, Keycode.R, Keycode.S, Keycode.T,&lt;br /&gt;
Keycode.U, Keycode.V, Keycode.W, Keycode.X, Keycode.Y, Keycode.Z, Keycode.A, Keycode.B, Keycode.C, Keycode.D, Keycode.E, Keycode.F,&lt;br /&gt;
Keycode.G, Keycode.H, Keycode.I, Keycode.J, Keycode.K, Keycode.L, Keycode.M, Keycode.N, Keycode.O, Keycode.P,&lt;br /&gt;
Keycode.Q, Keycode.R, Keycode.S, Keycode.T, Keycode.U, Keycode.V, Keycode.W, Keycode.X, Keycode.Y, Keycode.Z,&lt;br /&gt;
Keycode.F1, Keycode.F2, Keycode.F3, Keycode.F4, Keycode.F5, Keycode.F6, Keycode.F7, Keycode.F8, Keycode.F9,&lt;br /&gt;
Keycode.F10, Keycode.F11, Keycode.F12]&lt;br /&gt;
&lt;br /&gt;
def convertLine(line):&lt;br /&gt;
    newline = []&lt;br /&gt;
    print(line)&lt;br /&gt;
    for j in range(len(keycodeCommands)):&lt;br /&gt;
		if line.find(duckyCommands[j]) != -1:&lt;br /&gt;
		    newline.append(keycodeCommands[j])&lt;br /&gt;
    print(newline)&lt;br /&gt;
    return newline&lt;br /&gt;
&lt;br /&gt;
def runScriptLine(line):&lt;br /&gt;
    for k in line:&lt;br /&gt;
        kbd.press(k)&lt;br /&gt;
    kbd.release_all()&lt;br /&gt;
&lt;br /&gt;
def sendString(line):&lt;br /&gt;
    layout.write(line)&lt;br /&gt;
&lt;br /&gt;
def parseLine(line):&lt;br /&gt;
    if(line[0:3] == &amp;quot;REM&amp;quot;):&lt;br /&gt;
        # ignore ducky script comments&lt;br /&gt;
        pass&lt;br /&gt;
    elif(line[0:5] == &amp;quot;DELAY&amp;quot;):&lt;br /&gt;
        time.sleep(float(line[6:])/1000)&lt;br /&gt;
    elif(line[0:6] == &amp;quot;STRING&amp;quot;):&lt;br /&gt;
        sendString(line[7:])&lt;br /&gt;
    else:&lt;br /&gt;
        newScriptLine = convertLine(line)&lt;br /&gt;
        runScriptLine(newScriptLine)&lt;br /&gt;
&lt;br /&gt;
kbd = Keyboard(usb_hid.devices)&lt;br /&gt;
layout = KeyboardLayoutDE(kbd)&lt;br /&gt;
&lt;br /&gt;
# sleep at the start to allow the device to be recognized by the host computer&lt;br /&gt;
time.sleep(.5)&lt;br /&gt;
&lt;br /&gt;
defaultDelay = 300 #Default Delay zwischen den einzelnen Schritten&lt;br /&gt;
progStatus = DEBUG_MOUNT().mount()&lt;br /&gt;
    &lt;br /&gt;
for idx in range(1):   #Der Payload wird 1 mal ausgeführt.&lt;br /&gt;
	&lt;br /&gt;
	if(progStatus == &amp;quot;disabled&amp;quot;):&lt;br /&gt;
	    # not in setup mode, inject the payload&lt;br /&gt;
	    duckyScriptPath = &amp;quot;payload.dd&amp;quot;&lt;br /&gt;
	    f = open(duckyScriptPath,&amp;quot;r&amp;quot;,encoding='utf-8')&lt;br /&gt;
	    print(&amp;quot;Running payload.dd&amp;quot;)&lt;br /&gt;
	    previousLine = &amp;quot;&amp;quot;&lt;br /&gt;
	    duckyScript = f.readlines()&lt;br /&gt;
	    for line in duckyScript:&lt;br /&gt;
		line = line.rstrip()&lt;br /&gt;
		if(line[0:6] == &amp;quot;REPEAT&amp;quot;):&lt;br /&gt;
		    for i in range(int(line[7:])):&lt;br /&gt;
		        #repeat the last command&lt;br /&gt;
		        parseLine(previousLine)&lt;br /&gt;
		        time.sleep(float(defaultDelay)/1000)&lt;br /&gt;
		else:&lt;br /&gt;
		    parseLine(line)&lt;br /&gt;
		    previousLine = line&lt;br /&gt;
		time.sleep(float(defaultDelay)/1000)&lt;br /&gt;
&lt;br /&gt;
	    print(&amp;quot;Done&amp;quot;)&lt;br /&gt;
	else:&lt;br /&gt;
	    print(&amp;quot;Update your payload&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mario.zimmermann</name></author>
	</entry>
</feed>