473,473 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

execute gpg commands in dotnet?

I've been trying for some time now to decrypt with GPG from inside vb .net
to no avail. my normal decrypt command goes something like this:

gpg.exe --armor --passphrase-fd 0 <
P:\mis\mfg\NorelcoIBM\etc\foxpassphrase.txt -o
\\fox7\mfg$\Applica\Infomercial\Orders\West\%1 -d
\\www\d$\Inetpub\ftproot\littermaid_west\inbox\%1. PGP

The input file is normally called something.txt.pgp and this command
generates the output file for me something.txt

The problem is coming inside .net from the fact that I am reading from
standard input the passphrase. I tried to write the passphrase to the
standard input of the process, that didn't work. I tried using Windows
scripting host to execute the command instead, that didn't work.

Has anyone found a way to make this work?

--
Scott Emick
Web Programmer
Fox International
Remove the ham from mail address if it's not spam

Mar 27 '06 #1
3 3693


c# code wrapper implements that:

http://www.codeproject.com/csharp/gnupgdotnet.asp
Scott Emick wrote:
I've been trying for some time now to decrypt with GPG from inside vb .net
to no avail. my normal decrypt command goes something like this:

gpg.exe --armor --passphrase-fd 0 <
P:\mis\mfg\NorelcoIBM\etc\foxpassphrase.txt -o
\\fox7\mfg$\Applica\Infomercial\Orders\West\%1 -d
\\www\d$\Inetpub\ftproot\littermaid_west\inbox\%1. PGP

The input file is normally called something.txt.pgp and this command
generates the output file for me something.txt

The problem is coming inside .net from the fact that I am reading from
standard input the passphrase. I tried to write the passphrase to the
standard input of the process, that didn't work. I tried using Windows
scripting host to execute the command instead, that didn't work.

Has anyone found a way to make this work?

--
Get the new
http://www.you-read-it-here-first.com
content from Texeme Textcasting Technology
Mar 27 '06 #2
Scott Emick wrote:
I've been trying for some time now to decrypt with GPG from inside vb
.net to no avail. my normal decrypt command goes something like this:


There's a COM wrapper for PGP which might help:
http://community.wow.net/grt/nsdpgp.html

Although it may only work with pgp, not gpg
Mar 27 '06 #3

Very cool.

He might want to look at that library though -- it's a good blue print
for working with the ProcessInfo for complicated external commands. I
know I learned a lot from it!

Leon Mayne wrote:
Scott Emick wrote:
I've been trying for some time now to decrypt with GPG from inside vb
.net to no avail. my normal decrypt command goes something like this:

There's a COM wrapper for PGP which might help:
http://community.wow.net/grt/nsdpgp.html

Although it may only work with pgp, not gpg

--
Get the new
http://www.you-read-it-here-first.com
content from Texeme Textcasting Technology
Mar 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Lance | last post by:
Hi All, I would like to read commands from a file and execute them in VB, something like reading str = "hello world" into VB and execute it. Any suggestions will be appreciated. Thanks, Lance
0
by: Helmut | last post by:
I have a strange problem in my dotnet Windows service: I have developed a service, using the core of the "windows service sample" found all over the net. Its like: .... ############...
4
by: Kartik | last post by:
Hi, I have an ASP.NET application using VB.NET.I am sending a DOS command to a machine on the network to print a file. This is achieved using xp_cmdshell Dim str As String = "xp_cmdshell...
15
by: Madhanmohan S | last post by:
Hi All, I want to run a command line appplication from C#. When i start the application, it will go into specific mode. After that, i have to give commands to use the application. How Can This Be...
2
by: Rich | last post by:
Hello, I have an oleDBDataAdapter (da1) which gets data from an Access mdb and fills a dataset (ds1) with integer data from "tbl1" in Access. Data displays in textboxes on a form. The...
4
by: Joe | last post by:
Hi all... In the old Quick Basic days there used to be 3 commands that seem to have disappeared from the new visual basic. I was wondering if there are equivalent commands to the VarPtr, Peek, and...
15
by: tmp123 | last post by:
Hello, Thanks for your time. We have very big files with python commands (more or less, 500000 commands each file). It is possible to execute them command by command, like if the commands...
1
by: raocheng | last post by:
Please see the following code. Suppose I have many shell commands to be executed. And I don't want to fork a sub shell for each command(eg: status,output = commands.getstatusoutput(cmd)) because...
2
by: rcook349 | last post by:
I'm trying to automate our builds and publishes of our Windows application (deployed to a website via ClickOnce). I'm getting close, I think, on the commands I need to execute. However, how do...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.