GitGitBunny Posted April 11, 2017 Posted April 11, 2017 I also posted this on the github. Hi! I'm experiencing some issues with the extensions and i dont really know what i'm doing wrong.. According to the documentation of the bash bunny i can just invoke the commands but that leads to no results. ./payloads/switch1/payload.txt LED Y FOLDER ./payloads/library/extensions/folder.sh function FOLDER() { LED G } The led won't turn green. I also tried to do a RUN instead.. also not working. Anyone else have an idea? Quote
qdba Posted April 11, 2017 Posted April 11, 2017 22 minutes ago, GitGitBunny said: I also posted this on the github. Hi! I'm experiencing some issues with the extensions and i dont really know what i'm doing wrong.. According to the documentation of the bash bunny i can just invoke the commands but that leads to no results. ./payloads/switch1/payload.txt LED Y FOLDER ./payloads/library/extensions/folder.sh function FOLDER() { LED G } The led won't turn green. I also tried to do a RUN instead.. also not working. Anyone else have an idea? ./payloads/library/extensions/folder.sh function FOLDER() { LED G }export -f FOLDER Quote
GitGitBunny Posted April 11, 2017 Author Posted April 11, 2017 Not working either.. LED stays Y. Quote
GitGitBunny Posted April 11, 2017 Author Posted April 11, 2017 I actually think i found out what the problem is.. and seem to be able to reproduce the problem as well. I did some testing and came to the following conclusion: When creating a new file in Notepad++ (W7) and storing it on the BB, calling the function won't load it. However.. if i copy the original run.sh file, rename it to whatever and typing the script in this file (explicitly typing, so no copying), it works. I'll add this finding to the github, maybe hak5 can do a root cause analysis. Quote
qdba Posted April 11, 2017 Posted April 11, 2017 6 minutes ago, GitGitBunny said: I actually think i found out what the problem is.. and seem to be able to reproduce the problem as well. I did some testing and came to the following conclusion: When creating a new file in Notepad++ (W7) and storing it on the BB, calling the function won't load it. However.. if i copy the original run.sh file, rename it to whatever and typing the script in this file (explicitly typing, so no copying), it works. I'll add this finding to the github, maybe hak5 can do a root cause analysis. Remember... The first line of the folder.sh sccipt must be #!/bin/bash tested it - it works Quote
GitGitBunny Posted April 11, 2017 Author Posted April 11, 2017 #!/bin/bash function BLABLA() { LED FINISH } export -f BLABLA Stored above to a new file blabla.sh in extensions folder. #TESTSCRIPT LED STAGE1 BLABLA Tried the payload.. did not work when saving it as a new file. I think it is a file format issue. When copying run.sh, renaming it to blabla.sh and typing above code, script works and led goes green. Quote
qdba Posted April 11, 2017 Posted April 11, 2017 extension..... #!/bin/bash function BLABLA() { LED G } export -f BLABLA payload..... LED STAGE1 BLABLA Works for me.. payload.txt folder.sh Quote
GitGitBunny Posted April 11, 2017 Author Posted April 11, 2017 Yeah i know that the script works >_<! it is the new file that is being created with Notepad++ that cannot be read for some reason. Quote
qdba Posted April 11, 2017 Posted April 11, 2017 (edited) Open the File with the vi editor. Are there ^M at the end of the line. Be sure the notepad++ Edit --> EOL Conversion is set to "Convert to Unix Format" My scripts was also created with notepad++ Edited April 11, 2017 by qdba 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.