The UNIX and Linux Forums  


Go Back   O UNIX e Linux Forum > Top Fóruns > Programação Shell Script e
.
google unix.com



Programação Shell Script e Post perguntas sobre ksh, CSH, SH, BASH, Perl, PHP, SED, Awk e outros scripts shell e shell scripts línguas aqui.

Mais UNIX e Linux Fórum Tópicos Você pode achar Helpfull
Fio Thread Starter Fórum Respostas Última postagem
login de usuário problema & Ficheiros listagem problema. pernasivam AIX 1 06-18-2009 10:09
Loop problema com mais um problema aliahsan81 Programação Shell Script e 3 01-07-2009 02:02
problema em encontrar um problema de hardware girish.batra Sun Solaris 8 09-09-2008 11:10
ssh script problema problema pcjandyala Programação Shell Script e 2 07-31-2008 04:27
problema com o comando dd ou talvez AFS problema Anta Programação Shell Script e 0 08-25-2006 11:10

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 Pesquisar este Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-01-2009
anushree.a anushree.a is offline
Usuário
  
 

Join Date: May 2008
Lugares: 87
GPG Encription problema

Caros Amigos,
Tenho vindo a utilizar criptografia simétrica gpg. Eu criptografar um arquivo da seguinte forma

gpg - symmetric <nome_do_ficheiro>

Ela então pede para digitar a senha duas vezes

Agora, o problme é, eu tenho alguns 700 ímpar arquivos a ser encriptada simétrica usando gpg encription
U plz pode me dizer como fazer isso utilizando "para"Loop.

Thank you in advance
Anushree.a
  #2 (permalink)  
Old 07-01-2009
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
Moderador
  
 

Join Data: dezembro 2003
Localização: Florida
Posts: 1.937
man gpg. Leia-se sobre o modo batch.
  #3 (permalink)  
Old 07-07-2009
anushree.a anushree.a is offline
Usuário
  
 

Join Date: May 2008
Lugares: 87
o homem desapareceu thro gpg resultados ... mas não foi possível obter as informações pedidas ...
Por favor se alguém sabe a solução gentileza me avise
Thank you in advance
Anushree
  #4 (permalink)  
Old 07-07-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderador
  
 

Join Data: dezembro 2008
Localização:. Em
Posts: 1.944
A partir da página man (o que você tem, obviamente ler), algumas opções que poderão ser úteis:
Código:
       --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  
Moderador
  
 

Join Data: dezembro 2008
Localização:. Em
Posts: 1.944
Desde que você começou um segunda discussão para a mesma pergunta (aparentemente) sem a leitura do homem-página, vou dar uma solução neste momento.


Código:
> 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
Usuário
  
 

Join Date: May 2008
Lugares: 87
Eu não sei como usar a sua solução.

É o seguinte o / pi tenho quando eu executar o script

test.sh: line 1:. / pass: Permissão negada
test.sh: linha 2: s3cr3t: comando não encontrado
test.sh: linha 3: - lote: comando não encontrado
test.sh: linha 4:. / test.file: Permissão negada
test.sh: linha 5:. / test.file: Permissão negada
test.sh: linha 6: test.file.asc: comando não encontrado
test.sh: linha 7: test.file.asc:: comando não encontrado
  #7 (permalink)  
Old 07-13-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderador
  
 

Join Data: dezembro 2008
Localização:. Em
Posts: 1.944
Isso é provavelmente porque desde que eu não seja um completo roteiro, mas sim um exemplo do que teria parecido como quando feito manualmente. Destacamento de novo com os comentários para esclarecer:
Código:
> 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

Tudo que você tem a fazer é substituir o arquivo com aqueles que eu costumava ter. Tão logo você tem que estabelece, para começar a usar variáveis em vez do arquivo. E quando isso é feito, pode começar com o ciclo for.
Reply

Marcadores

Tags
criptografia, gpg

Thread Tools Pesquisar este Thread
Pesquisar este Thread:

Pesquisa Avançada
Display Modes Esta taxa Thread
Esta taxa Thread:

Destacamento Regimento
Você não pode postar novas threads
Você não pode postar respostas
Você não pode postar anexos
Você não pode editar suas postagens

BB code é Ligado
Smilies são Ligado
[IMG] código é Ligado
Código HTML é Desligado
Trackbacks são Ligado
Pingbacks são Ligado
Refbacks são Ligado




Todos os horários são GMT -4. A hora é agora 03:45.


Powered by: vBulletinCopyright © 2000 - 2006, Jelsoft Enterprises Limited. Língua Traduções Powered by .
vBCredits v1.4 Copyright © 2007 - 2008, PixelFX Studios
O UNIX e Linux Fóruns Content Copyright © 1993-2009. Todos os Direitos Reserved.Ad Gestão por RedTyger

Content Relevant URLs por vBSEO 3.2.0