Jump to content

How do I loop a section of code rather than just one line?


Citrik

Recommended Posts

Posted

I am trying to repeatedly type of string of text 20 times, but I can't figure out how to repeat the entire code. This is what I have:

STRING text
ENTER
DELAY 10000
REPEAT 20

I want to repeat those first 3 lines 20 times. How do I do this?

Posted
1 hour ago, dark_pyrro said:

Enter those 3 lines 20 times in the payload.

Dang is that the only way? Because the real purpose for this was to repeatedly type something for multiple hours. Like overnight.

Posted

OK, well, 20 repeats with that delay won't result in anything that lasts for multiple hours. In that case, the initial scenario description wasn't really valid. With the new requirements, my proposed way of doing it is less relevant. I would use a Bash Bunny in this case so that it would be possible to throw in other tools (like Bash scripting) to accomplish what is needed. In this case I would probably use the target and let it do the "logic". It all depends on the target though. What I mean by saying that is to create a script on the target using the Ducky and then execute the script which loops the thing for as long as it's needed. But, it all depends, so a full description of what the result should be and in what environment it will be used is needed to try to suggest any solution.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...