ascorbic Posted October 1, 2011 Share Posted October 1, 2011 I am fooling around with creating a Windows based IDE for DuckyScript. So far I have very basic syntax highlighting and very basic compilation. Is there any interest in an application like this? I do have a question for Jason Appelbaum though, how are the DELAY commands parsed? I am not too familiar with java, but it looks like the encoder class just says Byte.parseByte("500") or Byte.parseByte("1700") which would exceed a byte's capacity of 127. Does parseByte just return 127? Or am I missing something? Quote Link to comment Share on other sites More sharing options...
Netshroud Posted October 2, 2011 Share Posted October 2, 2011 How about a Notepad++ plugin? Quote Link to comment Share on other sites More sharing options...
Darren Kitchen Posted October 2, 2011 Share Posted October 2, 2011 Not sure but I'll loop Jason in here. Quote Link to comment Share on other sites More sharing options...
Xcellerator Posted October 2, 2011 Share Posted October 2, 2011 A Notepad++ plugin would be awesome! I'll have a look and see what it involves... Quote Link to comment Share on other sites More sharing options...
pyro2927 Posted October 2, 2011 Share Posted October 2, 2011 If it's converting a String to a Byte, each character would be equivalent to one byte (one ASCII character = 1 byte). Quote Link to comment Share on other sites More sharing options...
ascorbic Posted October 2, 2011 Author Share Posted October 2, 2011 I see the issue with the byte parsing was resolved in the shipped version jar, the one on the wiki is outdated. Quote Link to comment Share on other sites More sharing options...
ascorbic Posted October 2, 2011 Author Share Posted October 2, 2011 Another question for Jason though, my encodings are coming out a bit different. For the ESCAPE command, the code looks like it gets a byte for decimal 41 and for decimal 0. Which I would think output hex29, hex00. But it looks like it comes out as hex08 hex01. How should the ESCAPE command come out in hex? I must be missing something obvious. Quote Link to comment Share on other sites More sharing options...
Darren Kitchen Posted October 2, 2011 Share Posted October 2, 2011 I don't know the exact hex codes as I'm still on my cell coming home from Derbycon but let's use this as a test case for troubleshooting. What I'd like from you are the following: What text editor are you using? Can you attach both the txt and bin? Alternatively, Could you create a text file containing only "ESCAPE" (without quotes), duckencode it and provide the hexedit output of the resulting bin. For example: echo ESC >> esc.txt java -jar duckencode.jar -i esc.txt -o esc.bin hexedit esc.bin Thanks! Quote Link to comment Share on other sites More sharing options...
ascorbic Posted October 3, 2011 Author Share Posted October 3, 2011 Here is a zip with six files. One with only escape (08), one with escape, control escape (29, 01) and one with the previous and some more (08, 01, ...). I would think they all would start with the same hex values, but the one with some more starts differently. I need to find out more about java's default encoding format. I am using Windows 7 notepad. http://www.mediafire.com/?up1zgww6lw9wgjo Quote Link to comment Share on other sites More sharing options...
Darren Kitchen Posted October 3, 2011 Share Posted October 3, 2011 When I run your escape.txt against my duckencode.jar I get the same hex output: 08 01 cat'ing escape.txt reveals two lines: ESCAPE CONTROL ESCAPE When I create my own escape2.txt with the above two lines and compile it with the same duckencode.jar I get this hex output: 29 00 29 01 The "29 00" is line 1 -- ESCAPE while "29 01" is line 2 -- CONTROL ESCAPE. To break it down further, "29" is ESCAPE, "00" is null and "01" is CONTROL. I've tested and come up with the same results while working in nano, vi and gedit. So then I checked the hex results of both your escape.txt and my escape2.txt and here's what I've found Yours: 00000000 45 53 43 41 50 45 0D 0A 43 4F 4E 54 52 4F 4C 20 45 53 43 41 ESCAPE..CONTROL ESCA 00000014 50 45 0D 0A PE.. Mine: 00000000 45 53 43 41 50 45 0A 43 4F 4E 54 52 4F 4C 20 45 53 43 41 50 ESCAPE.CONTROL ESCAP 00000014 45 0A 0A E.. The carriage return "0A" is in common on both, but your editor seems to be adding "0D" before the return. May I ask, what text editor are you using and what format options do you have when saving? Will add this to the list of features to implement in the next version of the duckencoder -- ignoring the "0D" value. Quote Link to comment Share on other sites More sharing options...
Netshroud Posted October 3, 2011 Share Posted October 3, 2011 That's just CRLF instead of LF. Quote Link to comment Share on other sites More sharing options...
ascorbic Posted October 3, 2011 Author Share Posted October 3, 2011 (edited) see www.iducke.com Edited October 5, 2011 by ascorbic Quote Link to comment Share on other sites More sharing options...
pyro2927 Posted October 3, 2011 Share Posted October 3, 2011 That's just CRLF instead of LF. I updated duckencoder to jpduckencoder so it has a fix to automatically strip out the CR if a flag is set. Seems to be affecting Windows users mostly as it's the line encoding default. http://forums.hak5.org/index.php?showtopic=21056 Quote Link to comment Share on other sites More sharing options...
raytri3 Posted June 26, 2012 Share Posted June 26, 2012 +1 for IDE - would love to see the iducke function/writeline functionality w/o being connected to the Internet. I am fooling around with creating a Windows based IDE for DuckyScript. So far I have very basic syntax highlighting and very basic compilation. Is there any interest in an application like this? I do have a question for Jason Appelbaum though, how are the DELAY commands parsed? I am not too familiar with java, but it looks like the encoder class just says Byte.parseByte("500") or Byte.parseByte("1700") which would exceed a byte's capacity of 127. Does parseByte just return 127? Or am I missing something? 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.