Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Unzip with password?

by Sec (Monk)
on Apr 01, 2009 at 15:05 UTC ( [id://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.

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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://754727]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-04-24 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found