0
  1. Suppose my foo.zip is encrypted with a password containing extended and control ASCII.
  2. Its password in hex format is e.g. something like 9E6A01D15774FF
  3. I have made a password.txt by editing its hex to match my password, so it will look like this when opening with a text editor: �j�ÑWtÿ
  4. I have no programming skills (!!!)

Problem is: I found no way to tell a zip extractor to read a binary password. I even tryed creating a simple script and editing its hex in the password part, so it looks like this

#!/bin/bash
unzip -P �j�ÑWtÿ /home/john/foo.zip

But stdin will always try to represent the non-printable characters and fails to pass the correct binary password to unzip.

My question is: Can you point me out a way to write a simple script (javascript?) that can extract zip files and supports full ascii passwords? (Please, remember I don't have any clue and my knowledge is very basic)

I know I may have made a stupid question, since nobody will want to include control characters in their password, but I'm stuck for a week in trying to figure this out. I would really appreciate your help!

Montblanc
  • 1
  • 3
  • You can hex-encode strings in the shell like so `echo $'\x74\x65\x73\x74'` outputs `test` – Alexander O'Mara Apr 02 '16 at 04:55
  • Thanks Alex but I've already tried both with echo and printf. Your solution works great for ASCII > 31 range, the problem is with non printable characters. There was no way the stdin could pass the right binary input as password – Montblanc Apr 02 '16 at 05:20

0 Answers0