Ruby libnet

hey,
I’ve read anansi’s email on this. but i’m having different problems.

when I run ‘ruby extconf.rb’, it says “ruby headers not found”. What
does this mean?

Also, do I need to download the original libnet files, and ruby-
libnet is just a port?

thanks,
ari
-------------------------------------------|
Nietzsche is my copilot

On Tue, May 22, 2007 at 07:46:18AM +0900, Ari B. wrote:

when I run ‘ruby extconf.rb’, it says “ruby headers not found”. What
does this mean?

It means the ruby header files are missing :slight_smile:

You need to be specific on exactly what platform you’re trying to do
this
on.

For example, if you’re on Debian or Ubuntu, then you’ll need to install
the
package “ruby1.8-dev” to get these header files.

could you get it to work to send a SYN packet?

could you test this script:

#!/usr/bin/env ruby

require ‘libnet’

$VERBOSE = true

l = Libnet.new

10.times do
l.build_tcp(31337, 80, rand(2 ** 3), 0, Libnet::TH_SYN, 0, 0, 0,
Libnet::LIBNET_TCP_H, nil, 0, nil)
l.auto_build_ipv4(Libnet::LIBNET_TCP_H + Libnet::LIBNET_IPV4_H,
Libnet::IPPROTO_TCP, “192.168.0.2”)
l.auto_build_ethernet(l.hex_aton(“00:11:11:94:D4:F5”),
Libnet::ETHERTYPE_IP)
ret = l.write
l.clear_packet
puts l.geterror if ret < 0
end

sent,error,written = l.stats
puts “”
puts “Sent: #{sent}”
puts “Error: #{error}”
puts “Bytes Written: #{written}”

end of file

because it is always segfaulting ruby on my machine :frowning:

Ari B. wrote:

ari
-------------------------------------------|
Nietzsche is my copilot


greets

                        (
                        )
                     (
              /\  .-"""-.  /\
             //\\/  ,,,  \//\\
             |/\| ,;;;;;, |/\|
             //\\\;-"""-;///\\
            //  \/   .   \/  \\
           (| ,-_| \ | / |_-, |)
             //`__\.-.-./__`\\
            // /.-(() ())-.\ \\
           (\ |)   '---'   (| /)
            ` (|           |) `
      jgs     \)           (/

one must still have chaos in oneself to be able to give birth to a
dancing star

James:

I know multiple people have asked you to drop this signature. I’m
adding my voice to the list.

Perhaps you could have a smaller (and slightly less chatoic) spider
instead?

o o
/|"|\

Or something? I’m not too good at ascii art though, sorry :frowning:

On May 22, 2007, at 3:35 AM, anansi wrote:

            //  \/   .   \/  \\
           (| ,-_| \ | / |_-, |)
             //`__\.-.-./__`\\
            // /.-(() ())-.\ \\
           (\ |)   '---'   (| /)
            ` (|           |) `
      jgs     \)           (/

one must still have chaos in oneself to be able to give birth to a
dancing star

I know multiple people have asked you to drop this signature. I’m
adding my voice to the list.

This signature is around 20 lines and you really should try to keep
them under 4. This means that one of your messages probably contains
as much fluff as actual content.

The real issue is that you waist the bandwidth of thousands of
readers every time you send a message to this list. That’s just bad
manners.

Please, trim the signature.

James Edward G. II

On 5/22/07, [email protected] [email protected] wrote:

o o
/|"|\

Or something? I’m not too good at ascii art though, sorry :frowning:

I don’t know what you’re talking about, that’s a beautiful hermit crab.

men calm down -.- …


greets

                 one must still have chaos in oneself to be able to

give birth to a dancing star

James Edward G. II wrote:

The real issue is that you waist the bandwidth of thousands of readers
every time you send a message to this list. That’s just bad manners.

A waist is a terrible thing to mind :wink:

Please, trim the signature.

Or replace it with a line of ruby that generates the same characters.

On 5/22/07, James Edward G. II [email protected] wrote:

On May 22, 2007, at 3:35 AM, anansi wrote:

The real issue is that you waist the bandwidth of thousands of
readers every time you send a message to this list. That’s just bad
manners.

For me the real issue is that it is extremely irritating to look at
and scroll past. Maybe if people don’t respond to anansi until he
shows that he can be polite to others on this list and get rid of the
stupid spider, he’ll get the picture.

On May 22, 2007, at 1:34 AM, Brian C. wrote:

On Tue, May 22, 2007 at 07:46:18AM +0900, Ari B. wrote:

when I run ‘ruby extconf.rb’, it says “ruby headers not found”. What
does this mean?

It means the ruby header files are missing :slight_smile:

You need to be specific on exactly what platform you’re trying to
do this
on.
Sorry about that.

I’m using Mac OS 10.4. Ruby is already installed, so I’m HOPING that
the dev files are already installed. However, I keep getting that
message. What’s going on? Anyone else ever have this problem?

thanks,
-------------------------------------------------------|
~ Ari
crap my sig won’t fit

On May 22, 2007, at 4:35 AM, anansi wrote:

because it is always segfaulting ruby on my machine :frowning:

I can’t require the libnet file. I tried downloading and installing
that (like a normal source program), but i couldn’t require it. Maybe
I installed it incorrectly?

I then attempted downloading ruby-libnet, but I am missing the header
files for ruby.

yargh
-------------------------------------------|
Nietzsche is my copilot

On May 22, 2007, at 9:40 AM, Gregory B. wrote:

stupid spider, he’ll get the picture.
Only after he helps me solve my problem.

-------------------------------------------|
Nietzsche is my copilot

Also, for the missing header files on Mac OS X, I did a locate
command, and found the file.

It was in my ruby folder, but once again, I CAN’T access it apparently.

Save me
~ Ari
English is like a pseudo-random number generator - there are a
bajillion rules to it, but nobody cares.

On Tue, May 22, 2007 at 10:36:36PM +0900, Gregory B. wrote:

On 5/22/07, [email protected] [email protected] wrote:

o o
/|"|\

Or something? I’m not too good at ascii art though, sorry :frowning:

I don’t know what you’re talking about, that’s a beautiful hermit crab.

. . . minus the claws. I played around with adding some, but failed.

On 5/22/07, Joel VanderWerf [email protected] wrote:

Or replace it with a line of ruby that generates the same characters.
Before the inevitable “how do I do that discussion”, let’s hope he can
just
use this :slight_smile:

require’base64’;require’zlib’;puts Zlib::Inflate.inflate(Base64.decode64
(%q{eJx
dkLEOAyEMQ/f7CovliETwB/ArkWCrdGtXPr6B9go6MxAb5w0AS/HAQ/JMVoUGZA0haB7mzkkjkFICjC
vutI5UhtI0W9/KxBSuPjnWfXD2HH4P0SFaOwwdRK/qMFmoVqtl9cNa28Zi1hgFUUSz/VkOEb9PVT2/b
N6sNtyS99pxvd7TmOz/wQ+15Dg3}.tr(“\n”,‘’)))

Or not…

Cheers,
Peter C.

Peter C. wrote:

On 5/22/07, Joel VanderWerf [email protected] wrote:

vutI5UhtI0W9/KxBSuPjnWfXD2HH4P0SFaOwwdRK/qMFmoVqtl9cNa28Zi1hgFUUSz/VkOEb9PVT2/b

N6sNtyS99pxvd7TmOz/wQ+15Dg3}.tr(“\n”,‘’)))

Cute, but it needs some golfing :wink:

[/tmp] cat t.rb
require’base64’;require’zlib’;puts
Zlib::Inflate.inflate(Base64.decode64(
%q{eJxdkLEOAyEMQ/f7CovliETwB/ArkWCrdGtXPr6B9go6MxAb5w0AS/HAQ/JMVoUGZA0ha
B7mzkkjkFICjCvutI5UhtI0W9/KxBSuPjnWfXD2HH4P0SFaOwwdRK/qMFmoVqtl9cNa28Zi1h
gFUUSz/VkOEb9PVT2/bN6sNtyS99pxvd7TmOz/wQ+15Dg3}.tr(“\n”,‘’)))

[/tmp] ruby t.rb | wc
14 42 322
[/tmp] cat t.rb | wc
4 5 283

Joel VanderWerf wrote:

Cute, but it needs some golfing :wink:

[/tmp] cat t.rb
require’base64’;require’zlib’;puts
Zlib::Inflate.inflate(Base64.decode64(
%q{eJxdkLEOAyEMQ/f7CovliETwB/ArkWCrdGtXPr6B9go6MxAb5w0AS/HAQ/JMVoUGZA0ha
B7mzkkjkFICjCvutI5UhtI0W9/KxBSuPjnWfXD2HH4P0SFaOwwdRK/qMFmoVqtl9cNa28Zi1h
gFUUSz/VkOEb9PVT2/bN6sNtyS99pxvd7TmOz/wQ+15Dg3}.tr("\n",’’)))

[/tmp] ruby t.rb | wc
14 42 322
[/tmp] cat t.rb | wc
4 5 283
require’zlib’;puts Zlib::Inflate.inflate(
%q{eJxdkLEOAyEMQ/f7CovliETwB/ArkWCrdGtXPr6B9go6MxAb5w0AS/HAQ/JMVoUGZA0ha
B7mzkkjkFICjCvutI5UhtI0W9/KxBSuPjnWfXD2HH4P0SFaOwwdRK/qMFmoVqtl9cNa28Zi1h
gFUUSz/VkOEb9PVT2/bN6sNtyS99pxvd7TmOz/wQ+15Dg3}.tr("\n",’’).unpack(‘m’)[0])

$ ruby t.rb | wc
14 42 322
$ cat t.rb | wc
4 5 265

:slight_smile:

Kind regards
Jan

On 5/23/07, Karl von Laudermann [email protected] wrote:

On May 22, 8:15 am, James Edward G. II [email protected]
wrote:

The real issue is that you waist the bandwidth of thousands of
readers every time you send a message to this list. That’s just bad
manners.

Actually, a linefeed character doesn’t use up any more bandwidth than
any other character.

True. I think the commodity being wasted isn’t really net bandwidth,
though, but rather screen real estate (pixel bandwidth), which can be
a little annoying. I have an old development system that I frequently
use to check my mail on. It has a crappy monitor. Can I scroll
through the fluff? Of course. But I like having as much info on the
screen at one time. Besides, the same artwork on “every” post gets
tiresome. Maybe if it was ruby code that depicted something new every
time :slight_smile:

On May 22, 8:15 am, James Edward G. II [email protected]
wrote:

On May 22, 2007, at 3:35 AM, anansi wrote:

This signature is around 20 lines and you really should try to keep
them under 4. This means that one of your messages probably contains
as much fluff as actual content.

The real issue is that you waist the bandwidth of thousands of
readers every time you send a message to this list. That’s just bad
manners.

Actually, a linefeed character doesn’t use up any more bandwidth than
any other character. Thus, the whole “more than 4 lines = wasted
bandwidth” idea is rather arbitrary. A 300-character signature wastes
no more bandwidth if 20 of those characters are linefeeds than if only
3 of them are. If he simply deletes most of the space characters that
are being used to center the spider, thus shifting the spider over to
the left edge, his signature would be using fewer characters than a
signature consisting of 4 full 80-character lines.

Also, I note that you felt the need to quote the entire “waste of
bandwidth” in your reply. :slight_smile: