Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7585773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:15:19+00:00 2026-05-30T19:15:19+00:00

I run zip utility from my app to create archive. Code similar to the

  • 0

I run zip utility from my app to create archive. Code similar to the following:

NSString *toolPath = @"/usr/bin/zip";
NSTask *task = [[[NSTask alloc] init] autorelease];
[task setLaunchPath:toolPath];
[task setArguments:arguments];
[task launch];

, where arguments it is typically string with paths to files. However, when need to create a password protected archive (with the -e argument), password is entered after the launch, and two times. In terminal it looks like this:

$ zip -e archive.zip file_to_archive.txt
Enter password:
Verify password:

How do I make enter a password in the app?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T19:15:21+00:00Added an answer on May 30, 2026 at 7:15 pm

    According to man zip:

       -P password
       --password password
              Use password to encrypt zipfile entries (if any).  THIS IS INSE-
              CURE!   Many  multi-user  operating systems provide ways for any
              user to see the current command line of any other user; even  on
              stand-alone  systems  there  is  always  the threat of over-the-
              shoulder peeking.  Storing the plaintext password as part  of  a
              command  line  in  an  automated script is even worse.  Whenever
              possible, use the non-echoing, interactive prompt to enter pass-
              words.   (And  where  security  is  truly  important, use strong
              encryption such as Pretty Good Privacy instead of the relatively
              weak standard encryption provided by zipfile utilities.)
    

    You can resolve the problem by using the -P parameter, I think you don’t need so much security.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a strange problem with truezip. i run the following code: TFile.setDefaultArchiveDetector(new TArchiveDetector(zip));
In a long run command line execution, like uncompressing a large .zip archive, how
In a single script, I need to do the following: create a zip out
I am trying to run this code $files = array('readme.txt', 'test.html', 'image.gif'); $zip =
I run this query: SELECT u.user_id, u.fname, u.lname, n.title, n.news_id, n.post, n.zip, z.city,z.state_abbr FROM
We run full re-indexes every 7 days (i.e. creating the index from scratch) on
I run into similar codes like this all the time in aspx pages: <asp:CheckBox
As a person who loves to follow the best practices, If i run code
I am trying to run a project from Github I do not have much
I'm trying to run a Powershell command to call 7-Zip to zip up a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.