OS/X encoding issues
Opened this issue · 2 comments
OS/X 10.11.2 (El Capitan), Python versions 2.7.10 (Apple supplied) and 2.7.13 (via Anaconda)
Take the following source (named $HOME/a.txt):
DELAY 3000
GUI r
DELAY 200
STRING notepad
ENTER
DELAY 200
STRING Hello World!!!
ENTER
Encode it with: /usr/bin/python ducktools.py -l us -e $HOME/a.txt inject.bin
then decode it with: /usr/bin/python ducktools.py -l us -d inject.bin test.txt
Results in only the following in the output file test.txt:
DELAY
Run with Anaconda Python located in $HOME/anaconda/bin/python and get the same results.
Version reports:
csadmins-mbp-2:DuckToolkit dyoung2$ python --version
Python 2.7.13 :: Anaconda 4.3.1 (x86_64)
csadmins-mbp-2:DuckToolkit dyoung2$ /usr/bin/python --version
Python 2.7.10
having the same issue in kali
I've just pulled this down from master and I'm receiving the following which is likely the same issue (not explored much yet):
python2 ./ducktools.py -e -l us /root/exploits/payloads/ducky/helloworld.txt /tmp/ducky/output.bin
[+] Reading Input file.
[-] Encoding File
Error parsing duck_text: 'DELAY 2000'
[!] Something went wrong
[-] Encoding complete
[-] Writing inject.bin to /tmp/ducky/output.bin
Traceback (most recent call last):
File "./ducktools.py", line 69, in
out.write(duck_bin)
TypeError: argument 1 must be string or buffer, not bool
Here's the output of helloworld.txt:
DELAY 2000
CTRL ESC
DELAY 2000
STRING notepad.exe
ENTER DELAY 2000
STRING HELLO WORLD!!!
ENTER
Running on a clean image of Kali 2017.2, ran ./setup.py install
before execution.
I haven't tried a tagged build yet.