Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.advocacy > #374011
| From | "Octavian W. Lagrange" <olagrang@perch.invalid> |
|---|---|
| Newsgroups | comp.os.linux.advocacy |
| Subject | Re: GreyCloud test |
| Date | 2016-10-01 18:29 +0000 |
| Organization | O.W.L. |
| Message-ID | <ajgdu003.faeu@perch.invalid> (permalink) |
| References | (5 earlier) <3cqdneG29ei-oHLKnZ2dnUU7-V-dnZ2d@giganews.com> <ahjfu30.aee@perch.invalid> <iYmdncBFyvRW2XLKnZ2dnUU7-aOdnZ2d@giganews.com> <shjdg.ioga3@perch.invalid> <qKSdnRk4OcaDyXLKnZ2dnUU7-YmdnZ2d@giganews.com> |
Marek Novotny <marek.novotny@marspolar.com> wrote:
> On 2016-10-01, Octavian W. Lagrange <olagrang@perch.invalid> wrote:
>> Marek Novotny <marek.novotny@marspolar.com> wrote:
>>> On 2016-10-01, Octavian W. Lagrange <olagrang@perch.invalid> wrote:
>>>> Marek Novotny <marek.novotny@marspolar.com> wrote:
>>>>> On 2016-10-01, Octavian W. Lagrange <olagrang@perch.invalid> wrote:
>>>>>> Marek Novotny <marek.novotny@marspolar.com> wrote:
>>>>>>> On 2016-10-01, Octavian W. Lagrange <olagrang@perch.invalid> wrote:
>>>>>>>> GreyCloud <Cumulus@mist.com> wrote:
>>>>>>>>> On 09/30/2016 07:08 PM, Marek Novotny wrote:
>>>>>>>>>> GreyCloud, just make sure you can read this one...
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> -----BEGIN PGP MESSAGE-----
>>>>>>>>>> =9u4N
>>>>>>>>>> -----END PGP MESSAGE-----
>>>>>>>>>>
>>>>>>>>> I have to reinstall enigma again and restart the process over again.
>>>>>>>>> Mozilla didn't give very good instructions, so will try one more time.
>>>>>>>>> Owl said to get a file in Cola keyring... which I haven't found.
>>>>>>>>> It looks like Thunderbird isn't very good at using pgp yet.
>>>>>>>>> I just may try IceDove instead.
>>>>>>>>>
>>>>>>>>
>>>>>>>> See if you can decrypt this:
>>>>>>>>
>>>>>>>> -----BEGIN PGP MESSAGE-----
>>>>>>>
>>>>>>> // snip
>>>>>>>
>>>>>>>> -----END PGP MESSAGE-----
>>>>>>>
>>>>>>> success
>>>>>>>
>>>>>>
>>>>>> Did GreyCloud ever verify that he can decrypt?
>>>>>
>>>>> Not yet, but I did get his public key imported into keyring
>>>>> successfully and I added him to my cola group. Now I need to look for a
>>>>> way to get passed all the y/N prompts. In a way I kind of like them
>>>>> though. I can see who I'm approving with that on. Might just leave it as
>>>>> is.
>>>>>
>>>>
>>>> I don't know of a way to get past the prompts. --batch and --yes have
>>>> no effect. There must be a way. I'll research it. The only thing
>>>> is on-the-fly disapproval for one key kills the whole thing, so it
>>>> would require removing the key from the group line.
>>>
>>> Maybe I could use autoexpect. I hate expect... I would guess it would
>>> work perfectly until I make a change to the group in which case I could
>>> just start another autoexpect.
>>>
>>
>> Yeah, I hate expect. It sort of works, but it's not pretty:
>>
>> anon@lowtide:~$ ls -l encrypted.asc
>> ls: cannot access encrypted.asc: No such file or directory
>> anon@lowtide:~$ ./dogpgcola >/dev/null 2>&1
>> anon@lowtide:~$ ls -l encrypted.asc
>> -rw-r--r-- 1 anon anon 3971 Oct 1 02:01 encrypted.asc
>> anon@lowtide:~$ head encrypted.asc
>> -----BEGIN PGP MESSAGE-----
>> Version: GnuPG v1
>>
>> hQIMAwYfknZGuk0IAQ/9Fiw2X6xUySrBMAY5l04fZ4wDJmTm5G0RuenL1isnQYNz
>> uFm0ESMHQXHAiI4fNyRZfkJHhp06EsjUknJHEmoVTNA1ih7KpTBwN49u78YAHAc1
>> vhnNo2V93Rcv1WRVw7weux4whaIBBg2zuppYyG2x6mhuz88Gytr7Yn6VXFw28N8h
>> vySwptfZx71qFoDOLBsq2NvLOBZgHHRJuM9ux/3BCNgS/aqSXeb6F5jZ7+LOH5zd
>> nzHa6F8VSOO3MzjleehSdQQsDX1kKY9tV6Vza7QvgebO1xi+cXIkk4cNwusXSYXi
>> vxxMCXBaplPLQ8v74Ld67L8vzhPr+hPgPmJuW5mwSbWTGsZlSTC2OSwb5yLXiZaN
>> cVOBQNa4B38DUIDMDAvCCEooNehZoEth3dAAaGQSoi7C8RnPuBr93aJ+Kl+nVjbx
>> anon@lowtide:~$
>>
>>
>> anon@lowtide:~$ cat dogpgcola
>> #!/bin/bash
>>
>> touch encrypted.asc
>> rm encrypted.asc
>>
>> ########### works but with "send: spawn id exp6 not open" #############
>> expect -c "
>> spawn ./gpgcola
>> expect \"(y/N)\"
>> send \"y\r\"
>> expect \"(y/N)\"
>> send \"y\r\"
>> expect \"(y/N)\"
>> send \"y\r\"
>> expect \"(y/N)\"
>> send \"y\r\"
>> expect \"(y/N)\"
>> send \"y\r\"
>> expect \"(y/N)\"
>> send \"y\r\"
>> expect \"(y/N)\"
>> send \"y\r\"
>> "
>> ########### end works #############
>>
>> ########## does not work ###########
>> #expect -c "
>> #spawn ./gpgcola
>> #for {set x 0} {$x<6} {incr x} {
>> # expect \"(y/N)\"
>> # send \"y\r\"
>> #}
>> #"
>> ########## end does not work ###########
>>
>> anon@lowtide:~$
>
> yeah, that's expect... Throw elegance out the window and hold your nose.
>
Got this working a bit better now. This is just for encrypting plaintext
file to encrypted file, but it gets a key count from the group line, so no
need to modify the script with added or removed keys, and handles the y/N.
anon@lowtide:~$ cat dogpgcola
#!/bin/bash
touch encrypted.asc
rm encrypted.asc
count=$(for i in $(grep '^group cola' .gnupg/gpg.conf |cut -f2 -d'=');\
do echo $i; done |wc -l)
expect -c "
spawn gpg -r cola --armor --output encrypted.asc --encrypt plaintext.txt
for {set i 0} {\"$i\"<$count} {incr i} {
expect \"(y/N)\"
send \"y\r\"
}
" >/dev/null 2>&1
anon@lowtide:~$
anon@lowtide:~$ ls encrypted.asc
ls: cannot access encrypted.asc: No such file or directory
anon@lowtide:~$ cat plaintext.txt
This is some text.
anon@lowtide:~$ ./dogpgcola
anon@lowtide:~$ ls encrypted.asc
encrypted.asc
anon@lowtide:~$ head encrypted.asc
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1
hQIMAwYfknZGuk0IAQ/9E2UbgQazSBsF0LsTnI7Bm0opAM5TigPWi2VfEJJQpV62
Mgd0d6QEW3xbqWpVlgGWpEZAW1AGZ5TrGmkp4IpUIHjrRngqeETuK9POutBTfMYk
TMCi5o33Z3Q/tM2lVMaLoXvqj/VgmdY+cxikU7ExnljJjf/KAJD1T0DXNirNmdGn
owO3SKuOl81qJW9hx9xep4wX+NDJ/5va/MdFvPb+BpWM+KVTdnnTq9UZttJTUU0W
bwfhKqnxZ3MlDa7sV/CAaDsJZ4+q0+9dB8zIqvdPXLwRUII7kWnTKOYev3MRiB2H
IO1WRQG5BnXy1qvEQZmWyZ2gFSoISJRvUB+V9NJhmKuj2J/ghZgrHudYLOSoemDv
mEaUPC/mnYuFfOJqmRoA9oSWp24kso5YTFDzqcwuLvUi3DREA+nN2CJ9gvB1/yTm
anon@lowtide:~$
anon@lowtide:~$ gpg -d encrypted.asc
You need a passphrase to unlock the secret key for
user: "owl (usenet) <owl@rooftop.invalid>"
2048-bit RSA key, ID 7B91B00A, created 2015-04-27 (main key ID B0984AAB)
gpg: encrypted with 2048-bit RSA key, ID FFAEBFAE, created 2015-07-22
" <a.m@unseen.is>"
gpg: encrypted with 4096-bit RSA key, ID 21C1AABB, created 2016-09-25
"Marek Novotny <marek.novotny@marspolar.com>"
gpg: encrypted with 4096-bit RSA key, ID 6EFD5B47, created 2015-04-26
"Steve Carroll (Do you hear me now?) <fretwizz@comcast.net>"
gpg: encrypted with 1024-bit ELG-E key, ID 086FD476, created 2003-11-18
"vallor <vallor@cultnix.org>"
gpg: encrypted with 2048-bit RSA key, ID D03B4C45, created 2016-09-26
"Sandman <mr@sandman.net>"
gpg: encrypted with 4096-bit RSA key, ID 46BA4D08, created 2016-09-30
"GreyCloud <Cumulus@mist.com>"
gpg: encrypted with 2048-bit RSA key, ID 7B91B00A, created 2015-04-27
"owl (usenet) <owl@rooftop.invalid>"
This is some text.
gpg: WARNING: message was not integrity protected
anon@lowtide:~$
Back to comp.os.linux.advocacy | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
GreyCloud test Marek Novotny <marek.novotny@marspolar.com> - 2016-10-01 01:08 +0000
Re: GreyCloud test Steve Carroll <fretwizzer@gmail.com> - 2016-09-30 18:47 -0700
Re: GreyCloud test "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-10-01 04:28 +0000
Re: GreyCloud test Marek Novotny <marek.novotny@marspolar.com> - 2016-10-01 04:38 +0000
Re: GreyCloud test "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-10-01 04:43 +0000
Re: GreyCloud test Marek Novotny <marek.novotny@marspolar.com> - 2016-10-01 05:06 +0000
Re: GreyCloud test GreyCloud <Cumulus@mist.com> - 2016-09-30 20:26 -0600
Re: GreyCloud test "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-10-01 03:24 +0000
Re: GreyCloud test "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-10-01 03:33 +0000
Re: GreyCloud test Marek Novotny <marek.novotny@marspolar.com> - 2016-10-01 04:23 +0000
Re: GreyCloud test "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-10-01 04:26 +0000
Re: GreyCloud test Marek Novotny <marek.novotny@marspolar.com> - 2016-10-01 04:35 +0000
Re: GreyCloud test "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-10-01 04:46 +0000
Re: GreyCloud test Marek Novotny <marek.novotny@marspolar.com> - 2016-10-01 05:08 +0000
Re: GreyCloud test "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-10-01 06:07 +0000
Re: GreyCloud test Marek Novotny <marek.novotny@marspolar.com> - 2016-10-01 06:13 +0000
Re: GreyCloud test "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-10-01 18:29 +0000
Re: GreyCloud test GreyCloud <Cumulus@mist.com> - 2016-10-01 14:18 -0600
Re: GreyCloud test "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-10-01 20:57 +0000
Re: GreyCloud test Silver Slimer <.m@nsn.s> - 2016-10-01 17:30 -0400
csiph-web