what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

dirtypgp.wish

dirtypgp.wish
Posted Dec 21, 1999

dirtypgp.wish

tags | encryption
SHA-256 | 5cdb8630900be6c17905f987116def0802263e0f7507bc16a39f80927fde94c8

dirtypgp.wish

Change Mirror Download
#!/usr/X11R6/bin/wish -f

#
#Version 0.02 PH 990608
#
# Comments to: dirtypgp@owlriver.com
#
# README
#
# When you look at the script, you'll understand why I call this "dirty"...
# Well, tcl ist not my mother tongue. There is no key management inside this
# script! Learn plain pgp commands first! It was tested with PGP263i.
#
# Before invoking ANY (!) PGP command enter your passphrase.
# If the script locks, just kill it. Your passphrase is stored somewhere
# in your system - leave the script with the "forget" button.
#
# Fuer Umlautkonvertierung gibt es im Script eine Zeile, die mit #d#
# beginnt. Kommentar loeschen und Script "killumlaut" installieren.
# PGP263i hat manchmal Probleme bei Clearsig und Umlauten...
#
# http://195.145.169.13/~cmeyer
# carsten.meyer@home.gelsen-net.de (Tue Jun 8 1999)
#
# Latest news: dirtypgp finally distributed under GNU General Public License
# http://www.gnu.org/copyleft/gpl.txt
#
# Very latest news: Need someone to take over this project!!!


wm title . "dirtyPGP"


text .txt1 -wrap word -yscrollcommand ".scroll set" -height 30
text .stat -height 2 -foreground red
scrollbar .scroll -command ".txt1 yview"
pack .scroll -side right -fill y
pack .txt1 .stat -expand yes -fill both

frame .topframe
pack .topframe -side top -fill x -pady 2m
button .bdis -text "Dismiss and forget!" -command "forget"
button .bent -foreground red -text "Passphrase" -command "enterpp1"
button .bwip -text "wipe" -command "wipe"
button .bdec -text "decrypt" -command "decrypt1"
button .benc -text "sign and encrypt" -command "signenc1"
button .bcle -text "clearsig" -command "clearsig1"

pack .bdis .bent .bwip .bdec .benc .bcle -side left -in .topframe

bind . <Control-c> {forget}

#-------------------------------------------------------

proc decrypt1 {} {

global env
delete

set ciphertext [open $env(HOME)/.dirtypgp.asc "w+"]
puts $ciphertext "[ .txt1 get 1.0 end ]"
close $ciphertext

catch {exec pgp $env(HOME)/.dirtypgp.asc} output

wipe

set pgpoutput [open $env(HOME)/.dirtypgp.out "w+"]
puts $pgpoutput $output
close $pgpoutput

catch {exec grep from $env(HOME)/.dirtypgp.out} out
.stat insert 1.0 $out\n
catch {exec grep made $env(HOME)/.dirtypgp.out} out
.stat insert 2.0 $out

set plaintext [open $env(HOME)/.dirtypgp]
.txt1 insert 0.0 [ read $plaintext ]
close $plaintext }

#-------------------------------------------------------

proc signenc1 {} {

toplevel .enterid
wm title .enterid "recipient?"
button .enterid.ok2 -text "OK" -state active -command {

global env
delete

if {$herid == ""} {set herid "foo.bar"}

set plaintext [open $env(HOME)/.dirtypgp "w+"]
puts $plaintext "[ .txt1 get 1.0 end ]"
close $plaintext

catch {exec pgp -sea $env(HOME)/.dirtypgp $herid +batchmode} output

set pgpoutput [open $env(HOME)/.dirtypgp.out "w+"]
puts $pgpoutput $output
close $pgpoutput

wipe

catch {exec grep ID: $env(HOME)/.dirtypgp.out} out
if {[lindex $out 3] != "abnormally"} {.stat insert 1.0 $out\n}
catch {exec grep Error $env(HOME)/.dirtypgp.out} out
if {[lindex $out 3] != "abnormally"} {.stat insert 2.0 $out\n}
catch {exec grep Cannot $env(HOME)/.dirtypgp.out} out
if {[lindex $out 3] != "abnormally"} {.stat insert 3.0 $out\n}

set ciphertext [open $env(HOME)/.dirtypgp.asc]
.txt1 insert 0.0 [ read $ciphertext ]
close $ciphertext

destroy .enterid }

entry .enterid.e2 -textvariable herid
pack .enterid.e2 .enterid.ok2 -side top -pady 5 -padx 15 -fill x }

#-------------------------------------------------------

proc clearsig1 {} {

global env
delete

set plaintext [open $env(HOME)/.dirtypgp "w+"]
puts $plaintext "[ .txt1 get 1.0 end ]"
close $plaintext

#d# catch {exec killumlaut $env(HOME)/.dirtypgp} popel0

catch {exec pgp -sat +clearsig=on $env(HOME)/.dirtypgp} output

set pgpoutput [open $env(HOME)/.dirtypgp.out "w+"]
puts $pgpoutput $output
close $pgpoutput

wipe

catch {exec grep ID: $env(HOME)/.dirtypgp.out} out
if {[lindex $out 3] != "abnormally"} {.stat insert 1.0 $out\n}
catch {exec grep Error $env(HOME)/.dirtypgp.out} out
if {[lindex $out 3] != "abnormally"} {.stat insert 2.0 $out\n}
catch {exec grep Cannot $env(HOME)/.dirtypgp.out} out
if {[lindex $out 3] != "abnormally"} {.stat insert 3.0 $out\n}

set ciphertext [open $env(HOME)/.dirtypgp.asc]
.txt1 insert 0.0 [ read $ciphertext ]
close $ciphertext }

#-------------------------------------------------------

proc enterpp1 {} {

toplevel .enterpp
wm title .enterpp "passphrase?"
button .enterpp.ok -text "OK" -command {

set env(PGPPASS) $passphrase
destroy .enterpp
.bent configure -foreground grey -state disabled }

entry .enterpp.e1 -show "#" -textvariable passphrase
pack .enterpp.e1 .enterpp.ok -side top -pady 5 -padx 15 -fill x }

#-------------------------------------------------------

proc forget {} {
set env(PGPPASS) "passphrase deleted"
delete
destroy . }

#-------------------------------------------------------

proc wipe {} {
.txt1 delete 0.0 1000.0
.stat delete 0.0 10.0 }

#-------------------------------------------------------

proc delete {} {
global env
catch {exec rm -f $env(HOME)/.dirtypgp} popel1
catch {exec rm -f $env(HOME)/.dirtypgp.asc} popel2
catch {exec rm -f $env(HOME)/.dirtypgp.pgp} popel3
catch {exec rm -f $env(HOME)/.dirtypgp.out} popel4 }
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    16 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close