Re: Programa para checar login/password
> Preciso de um programa, que eu entre algo como:
>
> $ programa -u username -p password
>
> e ele retorne se o login/password estão corretos ou não.
> (e funcione independente se o sistema tem ou não shadow e independente
> se o shadow usa crypt, DES ou md5)
Faça um script que abra um socket com o sistema de pop e simplesmente entre
com a sintaxe de verificação. É algo como:
helio in helio> telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK QPOP (version 2.53) at yojimbo starting. <9513.991055831@yojimbo>
user helio
+OK Password required for helio.
pass errado
-ERR Password supplied for "helio" is incorrect.
+OK Pop server at yojimbo signing off.
Connection closed by foreign host.
Aqui a resposta verifica que a senha está errada.
helio in helio> telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK QPOP (version 2.53) at yojimbo starting. <9522.991055921@yojimbo>
user helio
+OK Password required for helio.
pass minhasenha
+OK helio has 0 messages (0 octets).
quit
+OK Pop server at yojimbo signing off.
Connection closed by foreign host.
Aqui a reposta retorna OK, o que valida login e senha. Um programa em perl,
python, ou qualquer outra linguagem (até shell script) funciona.
--
Hélio Alexandre Lopes Loureiro
e-mail:helio.loureiro@edb.ericsson.se
Tel.: + 55 11 6224-1795
Division Multiservice Networks - First Deployments
Public Key => http://cipsga.procempa.com.br/oks/pt_BR/
(pgp-i 2.6.3) http://www.engnux.ufsc.br/helio/identity.pub.txt
/"\
\ / Campanha da fita ASCII - Contra mail HTML
X ASCII ribbon campaign - Against HTML mail
/ \
Reply to: