Sponsored Content
Top Forums Shell Programming and Scripting Unzipping files <password protected> Post 302387680 by pludi on Monday 18th of January 2010 02:24:07 AM
Old 01-18-2010
InfoZIP's unzip has the -P parameter:
Quote:
-P password
use password to decrypt encrypted zipfile entries (if any). THIS IS INSECURE! 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 passwords. (And where security is truly important, use strong encryption such as Pretty Good Privacy instead of the relatively weak encryption provided by standard zipfile utilities.)
Check with the man page of your unzip to see if it offers a similar capability.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

I inhereted a Unix server that is password protected...Help!

I inhereted a project server that has UNIX installed with a SCO OS. I am trying to learn UNIX but I cannot go beyond the password and login. The original engineers have left the company and nothing was ever written down. How can access our server? (1 Reply)
Discussion started by: fxsaint
1 Replies

2. UNIX for Dummies Questions & Answers

Print on a printer which is password protected

Hi, I am trying to print from HP unix machine to a Toshiba printer which is password protected. How can I print? Thanks. Anuj (1 Reply)
Discussion started by: Anuj
1 Replies

3. Shell Programming and Scripting

How to make script password protected

Hi All, I want to make my script password protected. i e: if somebody runs my script it should prompt for password. Can somebody help me in to execute the same?? Thanks in Advance :b: (11 Replies)
Discussion started by: achararun
11 Replies

4. Shell Programming and Scripting

How to make files/folders Password protected

Any idea how to make files/folders password protected... I dont want to change the permissions of the files/folders... (1 Reply)
Discussion started by: know d unknown
1 Replies

5. UNIX for Dummies Questions & Answers

Unzipping multiple password-protected files

I am trying to unzip ~150 files on a SUN server in Unix via a telnet program (PuTTy), so I am restricted (I believe) to single-line command functions. All of the files are password protected, and each one contains three files. Is there a way to automate the process? I have tried 7z, but that only... (0 Replies)
Discussion started by: Davman
0 Replies

6. Shell Programming and Scripting

Get password protected URL folder using PHP fopen function

Hi everybody, Please some help over here, I`m pretty new in PHP. I have a cronrefresh php file within a website, I need this script get infornation from a URL of the site. Part of the script where $URL variable appears is: $fdURL = mysql_query("SELECT * FROM affiliSt_config WHERE name... (2 Replies)
Discussion started by: cgkmal
2 Replies

7. UNIX for Dummies Questions & Answers

SSH - Password Protected Directory Issue

I dug myself a hole yesterday that I can't seem to get myself out of. In a very futile attempt to create a new FTP user with limited access via SSH, I inadvertently changed permissions for who knows what and now I am having a problem accessing password protected directories. When I enter the... (1 Reply)
Discussion started by: HiddenColors
1 Replies

8. Shell Programming and Scripting

Make a password protected bash script resist/refuse “bash -x” when the password is given

I want to give my long scripts to customer. The customer must not be able to read the scripts even if he has the password. The following command locks and unlocks the script but the set +x is simply ignored. The code: read -p 'Script: ' S && C=$S.crypt H='eval "$((dd if=$0 bs=1 skip=//|gpg... (7 Replies)
Discussion started by: frad
7 Replies

9. Post Here to Contact Site Administrators and Moderators

Password protected excel file without encryption or zipping

All, I have requirement to send password protected excel file in an email from unix/linux box without zipping it. Any help would be appreciated. Thanks.. (1 Reply)
Discussion started by: Durgesh Gupta
1 Replies

10. Shell Programming and Scripting

Password protected excel file without encryption or zipping

All, I have requirement to send password protected excel file in an email from unix/linux box without zipping it. Any help would be appreciated. Thanks.. (8 Replies)
Discussion started by: Durgesh Gupta
8 Replies
dispcrypt(3)						     Library Functions Manual						      dispcrypt(3)

NAME
dispcrypt - encrypt a password, dispatching based on the associated algorithm (Enhanced Security) LIBRARY
Security Library (libsecurity.so) In order to quickstart a program, the program must be linked as follows: -lsecurity -ldb -laud -lm See the shared library discussion in the Programmer's Guide for more information about using the quickstarting feature. SYNOPSIS
#include <prot.h> char *discprypt( const char *plaintext, const char *salt, int algorithm_index); PARAMETERS
plaintext The unencrypted password to be encrypted. salt A string value which may be used as input to the selected encryption algorithm. This parameter should be at least two charac- ters in length, and null-terminated. For password validation, it should be the encrypted password which is already in use. algorithm_index A value from 0 to (get_num_crypts()-1), indicating which encryption algorithm is to be used. For password validation, use the fd_oldcrypt field of an es_passwd structure. For password generation, use the fd_newcrypt field (and update the fd_oldcrypt field at the same time as the fd_encrypt field if the change is successful). DESCRIPTION
The dispcrypt() function applies the specified encryption algorithm to the given password string and salt value, and returns the encrypted form of the password. The return value is static data which is overwritten on subsequent calls to this function or to the encryption algo- rithms which it calls, so callers should save a copy of the string unless the only use is an immediate comparison during password valida- tion. RETURN VALUES
This routine returns NULL if there is an encryption failure. Otherwise, it returns a pointer to static data, which is the null-terminated encrypted password result. RELATED INFORMATION
passwd(1), getespwent(3), get_num_crypts(3) Security delim off dispcrypt(3)
All times are GMT -4. The time now is 08:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy