xmuchbeastx Posted October 21, 2016 Share Posted October 21, 2016 Im not sure why but when i encoded my script the line: $sourcedirectory = "G:\Java\*" showed up as $sourcedirectory = @G:\Java\*@ . This only happened when it was encoded using the duckytoolkit website. Please help! Quote Link to comment Share on other sites More sharing options...
S0AndS0 Posted November 3, 2016 Share Posted November 3, 2016 Can ya give the full lines or examples of the full lines your having issues with? At first glance it looks like you might be setting variables in such a way that the conpiler does not understand, bellow is an example of setting a variable in Windows cmd using Ducky syntax STRING set "var_name=var_value" ENTER STRING ECHO Variable value "%var_name%" Check out StackOverflow's answer for more variable assignment examples; hint, quotes ar funky. At second glance it looks as though you maybe trying to complile a payload that should instead be copied to the target's file system and run there without re-compiling with Ducky, ie a plan-old .bat file. If that is the case then you may want to look tat the documentation on how to copie payload scripts to the target prior to running'em. Just be awair that the syntax stuff for Ducky script should be removed from these pailoads. I found it was easiest to consider the Ducky script syntax much like the syntax used for auto-building with .yml files. Hope ya get it all working. Quote Link to comment Share on other sites More sharing options...
0phoi5 Posted November 4, 2016 Share Posted November 4, 2016 Did you copy-paste the "s? I find that, occasionally, either quotation marks ('), double quotation marks (") or dashes (-) copied from internet sources are encoded differently that they would be in notepad/leafpad/terminal etc., so try deleting the "s and replacing them by actually typing them in, then try again. Quote Link to comment Share on other sites More sharing options...
S0AndS0 Posted November 4, 2016 Share Posted November 4, 2016 11 hours ago, haze1434 said: Did you copy-paste the "s? I find that, occasionally, either quotation marks ('), double quotation marks (") or dashes (-) copied from internet sources are encoded differently that they would be in notepad/leafpad/terminal etc., so try deleting the "s and replacing them by actually typing them in, then try again. I'll up-vote this solution as I have run into this issue too. It's the leading reason why I switched from fancy text GUI applications to using vim, nano, and other terminal based text editers. The other issues similar to this that I've run into while scripting are the newline/return marks on documents. Linux based systems use the `\n` for line feed and I think windows uses `\r` or `\r\n` for carage return. Additionally symbles such as `$`, `>`, `|` and others will often get messed with by web hosting software. Quote Link to comment Share on other sites More sharing options...
BrainEater Posted March 5, 2017 Share Posted March 5, 2017 I was having the same problem the other day with the online encoder while using some powershell I had written up. Easiest way to fix it is to just download the Java encoder and use that. I havent had an issue since. The Java encoder seams to be upto date with bug fixes Quote Link to comment Share on other sites More sharing options...
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.