promiscuous mode

M

Marco Biscetti

Hi guys. i have a question. i am new in a ruby world.
How can i set my wlan device in a promiscuous mode?
thank at all :)
 
P

Phillip Gawlowski

Hi guys. i have a question. i am new in a ruby world.
How can i set my wlan device in a promiscuous mode?
thank at all :)

I'd check the WLAN card's documentation.
 
B

Bertram Scharpf

Hi,

Am Dienstag, 22. Dez 2009, 05:02:12 +0900 schrieb Marco Biscetti:
Hi guys. i have a question. i am new in a ruby world.
How can i set my wlan device in a promiscuous mode?
thank at all :)

When you ask in a forum that is about your WLAN device or your
OS/kernel, you should supply some information: what card you have,
error messages, and so on. Good luck.

Bertram
 
M

Marco Biscetti

i have a wireless card of netgear and i want to make a code in ruby that
set it in a promiscuous mode to read all packet in a lan for catch and
block all wrong packet. (wrong packet according at rule of my boss).
this program run in ubuntu 9.04 :)
thank to all :)
 
A

Aaron Turner

i have a wireless card of netgear and i want to make a code in ruby that
set it in a promiscuous mode to read all packet in a lan for catch and
block all wrong packet. (wrong packet according at rule of my boss).
this program run in ubuntu 9.04 :)
thank to all :)

just use:

system("<insert shell command to enable promisc mode>")

That's how you'd do it in ruby. The problem *you* have to answer is
what that shell command actually is.

--
Aaron Turner
http://synfin.net/
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
-- Benjamin Franklin
"carpe diem quam minimum credula postero"
 
R

Rob Biedenharn

If you are already running under Ubuntu 9.04, why do you want to write
a program to do this at all? Does something like 'iptables' satisfy
the 'wrong packet according at rule of my boss'?

Ruby is a very high-level language in which to be examining every
packet on a LAN.

-Rob
just use:

system("<insert shell command to enable promisc mode>")

That's how you'd do it in ruby. The problem *you* have to answer is
what that shell command actually is.

--
Aaron Turner
http://synfin.net/
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for
Unix & Windows
Those who would give up essential Liberty, to purchase a little
temporary
Safety, deserve neither Liberty nor Safety.
-- Benjamin Franklin
"carpe diem quam minimum credula postero"

Rob Biedenharn http://agileconsultingllc.com
(e-mail address removed)
 
B

Brian Candler

Marco said:
Hi guys. i have a question. i am new in a ruby world.
How can i set my wlan device in a promiscuous mode?

One answer is: use the Socket API. You have direct access there to all
the facilities there that you would have in a C program, e.g.
setsockopt.

So the problem boils down to: how do I create a raw socket, how do I set
promiscuous mode on it, how do I read packets from it? These are socket
questions, not Ruby ones. If you can find a C program which does what
you want, you can port it to ruby.

As has already been pointed out, Ruby is probably a poor choice of
language for packet inspection if you have any significant volume of
traffic.

But if you really want to do it in Ruby, I suggest you use someone
else's code: google for "ruby pcap".
 
M

Marco Biscetti

i have found the way to set my wlan device in promiscuos mode:

sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode monitor
sudo ifconfig wlan0 up
 
P

Paul Smith

i have found the way to set my wlan device in promiscuos mode:

sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode monitor
sudo ifconfig wlan0 up

Right. And which of those commands are ruby commands?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top