Guest sean_walsh Posted September 25, 2008 Posted September 25, 2008 Hi I have a zip file that is encrypted with a tricky password, which I need to extract from a .bat file. The password is: -33,33_(}33"33*33=33|33^%33 So I try this line in a .bat file: "c:\program files\winzip\wzunzip.exe" -o -s-33,33_(}33"33*33=33|33^%33 MYZIP.zip C:\MYZIP\ This hits a problem because of the double-quote in the password. "ERROR - missing closing quote on argument" This also doesn't work: -s"-33,33_(}33""33*33=33|33^%33" I believe the ^ char is an escape character for DOS Command Line arguments, but that doesn't work. I tried to simplify this by changing the password temporarily to 33"33 and using the following arguments: -s33^"33 -s"33^"33" No luck. If I try this: -s"33""33" It DOES actually get passed, but it comes back with "Skipping xxxx - the password is incorrect", even though if I use winzip through the interface, it works. Any ideas?
Guest Pegasus \(MVP\) Posted September 25, 2008 Posted September 25, 2008 Re: Command Line Escape Characters (WinZip) "sean_walsh" <seanmatthewwalsh@hotmail.com> wrote in message news:65387bf8-8f7d-4674-8c00-a34df5645af9@i76g2000hsf.googlegroups.com... > Hi > > I have a zip file that is encrypted with a tricky password, which I > need to extract from a .bat file. > > The password is: -33,33_(}33"33*33=33|33^%33 > > So I try this line in a .bat file: > "c:\program files\winzip\wzunzip.exe" -o -s-33,33_(}33"33*33=33|33^%33 > MYZIP.zip C:\MYZIP\ > > This hits a problem because of the double-quote in the password. > "ERROR - missing closing quote on argument" > > This also doesn't work: > -s"-33,33_(}33""33*33=33|33^%33" > > I believe the ^ char is an escape character for DOS Command Line > arguments, but that doesn't work. I tried to simplify this by changing > the password temporarily to 33"33 and using the following arguments: > -s33^"33 > -s"33^"33" > > No luck. If I try this: > -s"33""33" > > It DOES actually get passed, but it comes back with "Skipping xxxx - > the password is incorrect", even though if I use winzip through the > interface, it works. > > Any ideas? > Some password . . . Try this command: wzunzip.exe -o -s-33,33_(}33"33*33=33|33^%%33 MYZIP.zip C:\MYZIP\
Guest sean_walsh Posted September 25, 2008 Posted September 25, 2008 Re: Command Line Escape Characters (WinZip) nope, no luck. There seems to be a few problems: the ^ is a special char, the | is too, and the " needs to be doubled up somehow. I didnt realise % was too... I tried: -s-33,33_(}33"33*33=33|33^%%33 -s-33,33_(}33""33*33=33|33^%%33 -s-33,33_(}33"33*33=33^|33^^%%33 -s-33,33_(}33""33*33=33^|33^^%%33 -s-33,33_(}33^"33*33=33^|33^^%%33 no luck....
Guest Pegasus \(MVP\) Posted September 25, 2008 Posted September 25, 2008 Re: Command Line Escape Characters (WinZip) "sean_walsh" <seanmatthewwalsh@hotmail.com> wrote in message news:ae313e4e-c5b4-49aa-b73c-2798c4245373@34g2000hsh.googlegroups.com... > nope, no luck. > > There seems to be a few problems: the ^ is a special char, the | is > too, and the " needs to be doubled up somehow. > > I didnt realise % was too... > > I tried: > -s-33,33_(}33"33*33=33|33^%%33 > -s-33,33_(}33""33*33=33|33^%%33 > -s-33,33_(}33"33*33=33^|33^^%%33 > -s-33,33_(}33""33*33=33^|33^^%%33 > -s-33,33_(}33^"33*33=33^|33^^%%33 > > no luck.... As you have found out, there are several types of "poison" characters in your password, namely ("|^%. While it may be possible to compose a string that negates the interpreted meaning of each of them, it would be far more productive to compose a password that avoids these characters. There are numerous other special characters on the keyboard such as ~`!@#$*_-+={}[] - use them instead!
Guest Newell White Posted September 25, 2008 Posted September 25, 2008 Re: Command Line Escape Characters (WinZip) "sean_walsh" wrote: > nope, no luck. > > There seems to be a few problems: the ^ is a special char, the | is > too, and the " needs to be doubled up somehow. > > I didnt realise % was too... > > I tried: > -s-33,33_(}33"33*33=33|33^%%33 > -s-33,33_(}33""33*33=33|33^%%33 > -s-33,33_(}33"33*33=33^|33^^%%33 > -s-33,33_(}33""33*33=33^|33^^%%33 > -s-33,33_(}33^"33*33=33^|33^^%%33 > > no luck.... > Sean, Try running this .bat file set mypass=3,3"3|3^3 echo %mypass% Can't find a way to get % in the string though, maybe you can? -- Regards, Newell White
Recommended Posts