Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 462
  • Last Modified:

pgp

Please take a look at http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21820017.html

even though it says vb , we are actaully trying to figure out command line pgp..
0
Sara_j_11
Asked:
Sara_j_11
  • 6
1 Solution
 
Sara_j_11Author Commented:
basically I am trying to do this:
 pgp –s c:\test.txt –e DOH_PGP_KEY -z "my passphrase sentence" +force
It still asks me the question that prompts me to enter y/n ( are you sure that u want to use this public key y/n)
and then I have to answer y and then it produces the encrypted file for me. But I want to automate that script so that I do not have to go to c: everytime I want to encrypt the file. so I want to bypass that question (y/n). How do I do this? I thoughht the +force would solve the problem...

0
 
PanoECommented:
echo y| pgp –s c:\test.txt –e DOH_PGP_KEY -z "my passphrase sentence" +force

That should do it!  Also, the "y" can be replaced with whatever key you're trying to simulate.

Good luck,
Pano
0
 
Sara_j_11Author Commented:
do you mean type the above mentioned:
echo y| pgp –s c:\test.txt –e DOH_PGP_KEY -z "my passphrase sentence" +force

in the command prompt.. I tried that , but it does not work... Also what do you mean by : "y" can be replaced with whatever key you're trying to simulate.
does that mean i have to do:
echo DOH_PGP_KEY | pgp –s c:\test.txt –e DOH_PGP_KEY -z "my passphrase sentence" +force
I tried both , but does not work..



0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Sara_j_11Author Commented:
it still asks me that question:
WARNING: Because this public key is not certified with a trusted signature , it is not known with high confidence that it actually belongs to DOH_PGP_KEY(email_id)
Are you sure you want to use this public key(y/N)?
At that point if I pick y , it creates the file, but how do i make it accept it by default
0
 
Sara_j_11Author Commented:
HOW TO MAKE SURE THAT :  the key is signed/certified ?
0
 
Sara_j_11Author Commented:
ok I did the following and now it works in command line..
There are 2 steps that I followed:
1) You should change trust parametesrparameters for someone's public key (pgp -ke)
2) Than you should sign this public key with yours (pgp -ks)

Now if i go to command prompt(C:\Program Files\Network Associates\PGPcmdln) and type
pgp –s test.txt –e DOH_PGP_KEY -z  "mypassphrase"

But I dont want to go to the command prompt every time to type this , insteas I want to create a batch file that I can double clcik.
I opened notepad and typed
c:
cd C:\Program Files\Network Associates\PGPcmdln
pgp –s test.txt –e DOH_PGP_KEY -z  "mypassphrase"

and saved it as batch.bat . But wehn I click on it it does not create the encrypted file , but it works if i do the same thing in the command prompt manually... Can you please help with this?
0
 
Sara_j_11Author Commented:
ok I finally got the batch file to work
0
 
CetusMODCommented:
PAQed with points refunded (500)

CetusMOD
Community Support Moderator
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now