Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Unzip with password?

by Sec (Scribe)
on Apr 01, 2009 at 15:05 UTC ( #754727=note: print w/ replies, xml ) Need Help??


in reply to Unzip with password?

As there is no appopriate perl module, I'm now doing it this way:

my $r; { open(ZIP,"-|","/usr/local/bin/unzip -P 'иииииии' -p cache/$zipname $fname") || die "unzip failure"; local($/)=undef; $r=<ZIP>; close(ZIP); };
Of course you need to make sure that $zipname and $fname contain no evil characters.


Comment on Re: Unzip with password?
Download Code
Re^2: Unzip with password?
by runrig (Abbot) on Jan 11, 2013 at 23:14 UTC
    Of course you need to make sure that $zipname and $fname contain no evil characters.

    You don't if you use the array form of open:

    open(ZIP,"-|","/usr/local/bin/unzip" => -P => 'иииииии', -p => "cache/$zipname", $fname, ) || die "unzip failure";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://754727]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2014-07-13 21:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (252 votes), past polls