aspose file tools*
The moose likes C / C++ and the fly likes option to not provide a password in command line Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » C / C++
Bookmark "option to not provide a password in command line" Watch "option to not provide a password in command line" New topic
Author

option to not provide a password in command line

kunal kulkarni
Greenhorn

Joined: Mar 29, 2012
Posts: 11

Guys,
I am trying to figure out the best way for my below requirment:

I run C compiled exe's and the command looks like these:
my_sample_exe -u=username -p=password -g=group -log=path_to_log_file

I have to provide these exe's to end users and give them the above command to run it. However, I dont want to give them the actual password in -p= argument (rather hide the actual password). what would be the best way to achieve this?

we developed the following alternative:
created a code specific to encryption decryption logic and we are recommending developers to reuse (copy) the same function in their codes. but not all exe's are developed by us! there are few cases we only have exe's but no access to code. in this case, we dont know what to do!

can you please help us achieve our goal of hiding password in -p argument for above command?

Thanks,
Kunal
Tony Docherty
Bartender

Joined: Aug 07, 2007
Posts: 2310
    
  49
Apologies if I've misunderstood your question but what does this have to do with Java?
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18896
    
  40


Topic moved to C/C++ forum.


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
kunal kulkarni
Greenhorn

Joined: Mar 29, 2012
Posts: 11

Tony:My sincere apologies for posting it in incorrect forum.
Henry: thanks.

since, it a generic logical programming question, do you guys have an idea on how I could do this?

thanks,
Kunal
Tony Docherty
Bartender

Joined: Aug 07, 2007
Posts: 2310
    
  49
Can have your own exe which just handles the decryption and then launches the third party exe with decrypted args.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: option to not provide a password in command line