[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

embedding a library into a method ...

|||=[Mathspeedy]=||| |||=[Z3d0clan]=|||

5/12/2009 11:37:00 PM

Hi all,
I wanted to embed the Net::Telnet into a method, just look my code ...

#CODE start here
#!/usr/bin/ruby

require "net/telnet"

class VictimInfo
attr_accessor :ip, :port
#ask for Victim infos
def initialize( )
puts "Victim infos:."
puts "Ip Address: "
puts "Ip Address: #{@ip = gets.to_s}"
puts "Remote Port: "
puts "Remote Port: #{@port = gets.to_i}"
end
#connect to the Victim computer
def connect( ) # I want to use the Net::Telnet library in this
method
#CODE finish here

someone know the way to do it; I know complex method but if there's a
simple way to do it ...
3 Answers

|||=[Mathspeedy]=||| |||=[Z3d0clan]=|||

5/13/2009 12:13:00 AM

0

Could someone ANSWER my QUESTION please ...

Joel VanderWerf

5/13/2009 12:38:00 AM

0

Mathspeedy wrote:
> Hi all,
> I wanted to embed the Net::Telnet into a method, just look my code ...

Try copying some of the code from here...

http://www.ruby-doc.org/stdlib/libdoc/net/telnet/rdoc/classes/Net/T...

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

|||=[Mathspeedy]=||| |||=[Z3d0clan]=|||

5/13/2009 1:26:00 AM

0

On 12 mai, 20:37, Joel VanderWerf <vj...@path.berkeley.edu> wrote:
> Mathspeedy wrote:
> > Hi all,
> > I wanted to embed the Net::Telnet into a method, just look my code ...
>
> Try copying some of the code from here...
>
> http://www.ruby-doc.org/stdlib/libdoc/net/telnet/rdoc/class......
>
> --
>        vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

I think I have an idea ...