curlydog Posted February 7, 2023 Share Posted February 7, 2023 Brand new to ducky script. Trying to get my head round it by working through the exercises in the advanced duckscript book. I'm trying to make the LED blink for five seconds. The book tells me that the default behaviour when payload is being processed is to blink green. So after intially turning the led off (LEF_OFF) I'm using the following line when I want to start it blinking; $_INJECTING_LED_ENABLED = TRUE I'm getting a warning int the duckscript console (Payload studio Pro) to say that the "Warning on Line 14: Deprecated Syntax will only the first character: $". Why is that? I only bought the book a month ago. Is it out of date already? Link to comment Share on other sites More sharing options...
dark_pyrro Posted February 7, 2023 Share Posted February 7, 2023 A bit difficult to say anything about that without knowing what the full payload looks like. Just inserting that line alone into PayloadStudio won't result in any warning. However, my guess is that $_INJECTING_LED_ENABLED = TRUE really should be $_INJECTING_LEDS_ENABLED = TRUE (page 107 in the book) Link to comment Share on other sites More sharing options...
curlydog Posted February 7, 2023 Author Share Posted February 7, 2023 1 minute ago, dark_pyrro said: A bit difficult to say anything about that without knowing what the full payload looks like. Just inserting that line alone into PayloadStudio won't result in any warning. However, my guess is that $_INJECTING_LED_ENABLED = TRUE really should be $_INJECTING_LEDS_ENABLED = TRUE (page 107 in the book) Sorry my bad typing. I did use LEDS in the code. I've removed all other code and just put int he one lone $_INJECTING_LEDS_ENABLED = TRUE. Strangely, I do get a the same warning. Link to comment Share on other sites More sharing options...
dark_pyrro Posted February 7, 2023 Share Posted February 7, 2023 No idea. Are you using the default settings in PayloadStudio or have you tweaked any settings? Link to comment Share on other sites More sharing options...
curlydog Posted February 7, 2023 Author Share Posted February 7, 2023 The only setting I remember changing is the language, to "gb.json". Of the syntax/version control options, only " Allow DEPRECATED DuckyScript 1.0 Fallback Syntax" is checked and this was the default setting. Link to comment Share on other sites More sharing options...
dark_pyrro Posted February 7, 2023 Share Posted February 7, 2023 What happens if you generate an inject.bin despite the error in PayloadStudio? Successful encoding? Does the payload run as intended? Link to comment Share on other sites More sharing options...
curlydog Posted February 7, 2023 Author Share Posted February 7, 2023 6 minutes ago, dark_pyrro said: What happens if you generate an inject.bin despite the error in PayloadStudio? Successful encoding? Does the payload run as intended? It compiles and I can run the payload, but it doesn't run as expected. My script should simply open notepad, write "Hello world" and then make the led flash green for five seconds. What actually happens is that notepad opens and "hello world" is written, but after a few seconds "$" is appended to the "hello world". There's no flashing of the LED. Here's the code I'm using; ATTACKMODE HID STORAGE LED_OFF DELAY 5000 GUI r DELAY 1000 STRING notepad.exe ENTER DELAY 3000 STRING hello world DELAY 1000 $_INJECTING_LEDS_ENABLED=TRUE LED_G DELAY 5000 LED_OFF Link to comment Share on other sites More sharing options...
dark_pyrro Posted February 7, 2023 Share Posted February 7, 2023 42 minutes ago, curlydog said: $_INJECTING_LEDS_ENABLED=TRUE If I write it like the line above (like you did in your payload code in your previous post), I also get the error in PayloadStudio. You should write it as I posted before: $_INJECTING_LEDS_ENABLED = TRUE That is; using spaces around the '=' char Link to comment Share on other sites More sharing options...
curlydog Posted February 7, 2023 Author Share Posted February 7, 2023 10 minutes ago, dark_pyrro said: If I write it like the line above (like you did in your payload code in your previous post), I also get the error in PayloadStudio. You should write it as I posted before: $_INJECTING_LEDS_ENABLED = TRUE That is; using spaces around the '=' char That was it! Adding the spaces around the equals sign solved it. Noted for future. Thanks for your help. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.