The UNIX and Linux Forums  

Go Back   UNIX e Linux Forum > Inizio Forum > Shell scripting e di programmazione
.
google unix.com



Shell scripting e di programmazione Pubblica domande su KSH, CSH, SH, Bash, Perl, PHP, sed, awk e da altri script di shell e linguaggi di scripting shell qui.

Più di UNIX e Linux Forum Argomenti potreste trovare utili
Filo Thread Starter Forum Risposte Ultimo Post
login problema e file lista problema. pernasivam AIX 1 06-18-2009 10:09 AM
Loop problema con un altro problema aliahsan81 Shell scripting e di programmazione 3 01-07-2009 02:02 AM
problema a trovare un problema hardware girish.batra SUN Solaris 8 09-09-2008 11:10 AM
ssh script problema problema pcjandyala Shell scripting e di programmazione 2 07-31-2008 04:27 PM
problema con il comando dd o forse AFS problema Anta Shell scripting e di programmazione 0 08-25-2006 11:10 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Cerca in questo Thread Rate Thread Modalità di visualizzazione
  #1 (permalink)  
Old 07-01-2009
anushree.a anushree.a is offline
Utente Registrato
  
 

Iscriviti Data: maggio 2008
Interventi: 87
GPG Encription problema

Cari amici,
Sono stato utilizzando la crittografia simmetrica gpg. Cifrare un file come segue

gpg - symmetric <nome

E poi chiede di inserire la password due volte

Ora è il problme, ho qualche 700 dispari file ad essere codificato utilizzando simmetrica gpg encription
Can u plz dimmi come fare utilizzando "per"Loop.

Grazie in anticipo
Anushree.a
  #2 (permalink)  
Old 07-01-2009
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
Moderatore
  
 

Iscriviti Data: dicembre 2003
Luogo: Florida
Interventi: 1.941
man gpg. Leggi la modalità batch.
  #3 (permalink)  
Old 07-07-2009
anushree.a anushree.a is offline
Utente Registrato
  
 

Iscriviti Data: maggio 2008
Interventi: 87
l'uomo al livello di andata gpg risultati ... ma in grado di ottenere le informazioni richieste ...
Per favore, se qualcuno conosce la soluzione gentilmente fatemelo sapere
Grazie in anticipo
Anushree
  #4 (permalink)  
Old 07-07-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderatore
  
 

Iscriviti Data: dicembre 2008
Posizione:. A
Interventi: 1.951
Dalla pagina man (che hai letto ovviamente) alcune opzioni che possono essere utili:
Codice:
       --batch
       --no-batch
              Use batch mode.  Never ask, do not allow  interactive  commands.
              --no-batch disables this option.

       --no-tty
              Make  sure that the TTY (terminal) is never used for any output.
              This option is needed in  some  cases  because  GnuPG  sometimes
              prints warnings to the TTY even if --batch is used.

       --passphrase-fd n
              Read the passphrase from file descriptor n. Only the first  line
              will  be  read  from  file descriptor n. If you use 0 for n, the
              passphrase will be read from stdin. This can  only  be  used  if
              only  one  passphrase is supplied.  Note that this passphrase is
              only used if the option --batch has also been  given.   This  is
              different from gpg.


       --passphrase-file file
              Read  the passphrase from file file. Only the first line will be
              read from  file  file.  This  can  only  be  used  if  only  one
              passphrase is supplied. Obviously, a passphrase stored in a file
              is of questionable security if other users can read  this  file.
              Don't  use  this  option  if  you  can avoid it.  Note that this
              passphrase is only used if the  option  --batch  has  also  been
              given.  This is different from gpg.


       --passphrase string
              Use  string as the passphrase. This can only be used if only one
              passphrase is supplied. Obviously, this is of very  questionable
              security  on  a  multi-user system. Don't use this option if you
              can avoid it.  Note that this passphrase is  only  used  if  the
              option --batch has also been given.  This is different from gpg.

  #5 (permalink)  
Old 07-10-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderatore
  
 

Iscriviti Data: dicembre 2008
Posizione:. A
Interventi: 1.951
Dal momento che è stato avviato uno secondo thread per la stessa domanda (apparentemente) senza la lettura del man-page, I'll fornire una soluzione di questo momento.


Codice:
> cat pass
s3cr3t
> gpg --batch --no-tty --armor --passphrase-file pass --symmetric test.file
> ls test.*
test.file  test.file.asc
> file test.file.asc
test.file.asc: PGP armored data message

  #6 (permalink)  
Old 07-13-2009
anushree.a anushree.a is offline
Utente Registrato
  
 

Iscriviti Data: maggio 2008
Interventi: 87
I dont know-how per utilizzare la vostra soluzione.

In seguito è l'o / pi avuto quando ho eseguito lo script

test.sh: linea 1:. / pass: Autorizzazione negata
test.sh: linea 2: s3cr3t: comando non trovato
test.sh: Linea 3: - lotto: comando non trovato
test.sh: linea 4:. / test.file: Autorizzazione negata
test.sh: linea 5:. / test.file: Autorizzazione negata
test.sh: Linea 6: test.file.asc: comando non trovato
test.sh: Linea 7: test.file.asc:: command not found
  #7 (permalink)  
Old 07-13-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderatore
  
 

Iscriviti Data: dicembre 2008
Posizione:. A
Interventi: 1.951
Questo probabilmente perché quello che ho fornito non è una sceneggiatura completa, ma piuttosto un esempio di ciò che avrebbe fatto apparire come quando manualmente. Distacco di nuovo le osservazioni per chiarire:
Codice:
> cat pass    # Run the 'cat' program to show the contents of file 'pass' which
              # contains the passphrase
s3cr3t        # Contents of file 'pass'
# Calling gpg in batch mode, telling it not to allocate a TTY, asking for
# ASCII-Armor output (non-binary data), providing the passphrase in file 'pass',
# symmetric enryption for file 'test.file'
> gpg --batch --no-tty --armor --passphrase-file pass --symmetric test.file
> ls test.*   # Display a listing of the original & encypted file
test.file  test.file.asc
> file test.file.asc # Run the 'file' utility to take a guess at the type of the
                     # content of file 'test.file.asc'
test.file.asc: PGP armored data message # It tells us that it's encrypted,
                                        # armored data

Tutto quello che dovete fare è sostituire i nomi dei file che ho usato con quelle che avete. Non appena hai che verso il basso, iniziare a utilizzare le variabili invece di nomi di file. E il fatto che quando si può iniziare con il ciclo for.
Reply

Segnalibri

Tag
cifratura, gpg

Thread Tools Cerca in questo Thread
Cerca in questo Thread:

Ricerca Avanzata
Modalità di visualizzazione Vota questo thread
Vota questo thread:

Distacco regolamento
Tu non può post nuovo thread
Tu non può inviare una risposta
Tu non può postare allegati
Tu non può modificare i tuoi post

BB codice è Su
Smilies sono Su
[IMG] codice Su
Codice HTML è Chiuso
Trackbacks sono Su
Pingbacks sono Su
Refbacks sono Su




Tutti gli orari sono GMT -4. La data di oggi è 11:28 PM.


Powered by: vBulletin, Copyright © 2000 - 2006, Jelsoft Enterprises Limited. Traduzioni Powered by .
vBCredits v1.4 Copyright © 2007 - 2008, PixelFX Studios
UNIX e Linux Forum Content Copyright © 1993-2009. Tutti i diritti Reserved.Ad di gestione da RedTyger

Contenuti pertinenti URL da vBSEO 3.2.0