From: anansi Date: 2007-05-22T17:35:03+09:00 Subject: Re: ruby libnet 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 :( Ari Brown wrote: > 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 > > > -- greets ( ) ( /\ .-"""-. /\ //\\/ ,,, \//\\ |/\| ,;;;;;, |/\| //\\\;-"""-;///\\ // \/ . \/ \\ (| ,-_| \ | / |_-, |) //`__\.-.-./__`\\ // /.-(() ())-.\ \\ (\ |) '---' (| /) ` (| |) ` jgs \) (/ one must still have chaos in oneself to be able to give birth to a dancing star