Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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
Replies are listed 'Best First'.
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 surveying the Monastery: (11)
As of 2015-07-28 22:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls