usbrubberducky-payloads/payloads/extensions/hello_os.txt

42 lines
1.2 KiB
Plaintext
Raw Normal View History

EXTENSION HELLO_OS
2023-03-14 22:19:57 +00:00
REM VERSION 1.1
REM AUTHOR: Korben
2023-03-14 22:19:57 +00:00
REM_BLOCK DOCUMENTATION
USAGE:
For use with OS_DETECT Extension, call HELLO_OS() after DETECT_OS()
prints the OS determination
END_REM
2022-09-29 06:06:15 +00:00
REM Additional Example: Defining custom $_OS enums
2023-03-14 22:19:57 +00:00
DEFINE #EXTRA_EXAMPLES FALSE
DEFINE #SOME_OTHER_OS 6
DEFINE #ANOTHER_OS 7
2022-09-29 06:06:15 +00:00
FUNCTION HELLO_OS()
2022-09-29 06:06:15 +00:00
IF ($_OS == WINDOWS) THEN
STRING Hello Windows!
ELSE IF ($_OS == MACOS) THEN
STRING Hello Mac!
ELSE IF ($_OS == LINUX) THEN
STRING Hello Linux!
ELSE IF ($_OS == IOS) THEN
STRING Hello iOS!
ELSE IF ($_OS == CHROMEOS) THEN
STRING Hello ChromeOS!
ELSE IF ($_OS == ANDROID) THEN
STRING Hello Android!
2023-03-14 22:19:57 +00:00
IF_DEFINED_TRUE #EXTRA_EXAMPLES
ELSE IF($_OS == #SOME_OTHER_OS) THEN
REM Example Only
STRING HELLO Custom OS Type!
ELSE IF($_OS == #ANOTHER_OS) THEN
REM Example Only
STRING HELLO Another Custom OS Type!
END_IF_DEFINED
2022-09-29 06:06:15 +00:00
ELSE
STRING Hello World!
END_IF
END_FUNCTION
END_EXTENSION