Procházet zdrojové kódy

[FL-3037, FL-3038, FL-3039] File format docs: RFID, iButton, BadUSB (#2177)

Co-authored-by: あく <alleteam@gmail.com>
Nikolay Minaylov před 3 roky
rodič
revize
dff73dfd38

+ 92 - 0
documentation/file_formats/BadUsbScriptFormat.md

@@ -0,0 +1,92 @@
+# Command syntax
+BadUsb app uses extended Duckyscript syntax. It is compatible with classic USB Rubber Ducky 1.0 scripts, but provides some additional commands and features, such as custom USB ID, ALT+Numpad input method, SYSRQ command and more fuctional keys.
+# Script file format
+BadUsb app can execute only text scrips from .txt files, no compilation is required. Both `\n` and `\r\n` line endings are supported. Empty lines are allowed. You can use spaces ore tabs for line indentation.
+# Command set
+## Comment line
+Just a single comment line. All text after REM command will be ignored by interpreter
+|Command|Parameters|Notes|
+|-|-|-|
+|REM|Comment text||
+
+## Delay
+Pause script execution by defined time
+|Command|Parameters|Notes|
+|-|-|-|
+|DELAY|Delay value in ms|Single delay|
+|DEFAULT_DELAY|Delay value in ms|Add delay before every next command|
+|DEFAULTDELAY|Delay value in ms|Same as DEFAULT_DELAY|
+
+## Special keys
+|Command|Notes|
+|-|-|
+|DOWNARROW / DOWN||
+|LEFTARROW / LEFT||
+|RIGHTARROW / RIGHT||
+|UPARROW / UP||
+|ENTER||
+|DELETE||
+|BACKSPACE||
+|END||
+|HOME||
+|ESCAPE / ESC||
+|INSERT||
+|PAGEUP||
+|PAGEDOWN||
+|CAPSLOCK||
+|NUMLOCK||
+|SCROLLLOCK||
+|PRINTSCREEN||
+|BREAK|Pause/Break key|
+|PAUSE|Pause/Break key|
+|SPACE||
+|TAB||
+|MENU|Context menu key|
+|APP|Same as MENU|
+|Fx|F1-F12 keys|
+
+## Modifier keys
+Can be combined with special key command or single character
+|Command|Notes|
+|-|-|
+|CONTROL / CTRL||
+|SHIFT||
+|ALT||
+|WINDOWS / GUI||
+|CTRL-ALT|CTRL+ALT|
+|CTRL-SHIFT|CTRL+SHIFT|
+|ALT-SHIFT|ALT+SHIFT|
+|ALT-GUI|ALT+WIN|
+|GUI-SHIFT|WIN+SHIFT|
+## String
+|Command|Parameters|Notes|
+|-|-|-|
+|STRING|Text string|Print text string|
+## Repeat
+|Command|Parameters|Notes|
+|-|-|-|
+|REPEAT|Number of additional repeats|Repeat previous command|
+## ALT+Numpad input
+On Windows and some Linux systems you can print character by pressing ALT key and entering its code on numpad
+|Command|Parameters|Notes|
+|-|-|-|
+|ALTCHAR|Character code|Print single character|
+|ALTSTRING|Text string|Print text string using ALT+Numpad method|
+|ALTCODE|Text string|Same as ALTSTRING, presents in some Duckyscript implementations|
+## SysRq
+Send [SysRq command](https://en.wikipedia.org/wiki/Magic_SysRq_key)
+|Command|Parameters|Notes|
+|-|-|-|
+|SYSRQ|Single character||
+## USB device ID
+You can set custom ID of Flipper USB HID device. ID command should be in the **first line** of script, it is executed before script run.
+
+|Command|Parameters|Notes|
+|-|-|-|
+|ID|VID:PID Manufacturer:Product||
+
+Example:
+`ID 1234:abcd Flipper Devices:Flipper Zero`
+
+VID and PID are hex codes and are mandatory, Manufacturer and Product are text strings and are optional.
+

+ 47 - 0
documentation/file_formats/LfRfidFileFormat.md

@@ -0,0 +1,47 @@
+# LF RFID key file format
+
+## Example
+```
+Filetype: Flipper RFID key
+Version: 1
+Key type: EM4100
+Data: 01 23 45 67 89
+```
+## Description
+
+Filename extension: `.rfid`
+
+The file stores single RFID key of type defined by `Key type` parameter
+
+### Version history
+
+1. Initial version.
+
+### Format fields
+
+|Name|Description|
+|-|-|
+|Key type|Key protocol type|
+|Data|Key data (HEX values)|
+
+### Supported key types
+
+|Type|Full name|
+|-|-|
+|EM4100|EM-Micro EM4100|
+|H10301|HID H10301|
+|Idteck|IDTECK|
+|Indala26|Motorola Indala26|
+|IOProxXSF|Kantech IOProxXSF|
+|AWID|AWID|
+|FDX-A|FECAVA FDX-A|
+|FDX-B|ISO FDX-B|
+|HIDProx|Generic HIDProx|
+|HIDExt|Generic HIDExt|
+|Pyramid|Farpointe Pyramid|
+|Viking|Viking|
+|Jablotron|Jablotron|
+|Paradox|Paradox|
+|PAC/Stanley|PAC/Stanley|
+|Keri|Keri|
+|Gallagher|Gallagher|

+ 27 - 0
documentation/file_formats/iButtonFileFormat.md

@@ -0,0 +1,27 @@
+# iButton key file format
+
+## Example
+```
+Filetype: Flipper iButton key
+Version: 1
+# Key type can be Cyfral, Dallas or Metakom
+Key type: Dallas
+# Data size for Cyfral is 2, for Metakom is 4, for Dallas is 8
+Data: 12 34 56 78 9A BC DE F0
+```
+## Description
+
+Filename extension: `.ibtn`
+
+The file stores single iButton key of type defined by `Key type` parameter
+
+### Version history
+
+1. Initial version.
+
+### Format fields
+
+|Name|Description|
+|-|-|
+|Key type|Currently supported: Cyfral, Dallas, Metakom|
+|Data|Key data (HEX values)|