Re: Sending a broadcast message using raw sockets

2013-01-22 Thread Peter Steele
013 at 4:57 AM, Peter Steele wrote: > > > In fact, I have used scapy in the past, but I am working in a restricted > > environment and don't have this package available. It provides tones more > > than I really need anyway, and I figured a simple raw socket send/receiv

Re: Sending a broadcast message using raw sockets

2013-01-22 Thread Peter Steele
> http://www.secdev.org/projects/scapy/ > > > > On Jan 22, 2013 9:17 AM, "Peter Steele" wrote: > > I just tried running you code, and the "sendto" call fails with "Network is > unreachable". That's what I expected, based on othe

Re: Sending a broadcast message using raw sockets

2013-01-22 Thread Peter Steele
I just tried running you code, and the "sendto" call fails with "Network is unreachable". That's what I expected, based on other tests I've done. That's why I was asking about how to do raw sockets, since tools like dhclient use raw sockets to do what they do. It can clearly be duplicated in Pyt

Re: Sending a broadcast message using raw sockets

2013-01-21 Thread Peter Steele
On Monday, January 21, 2013 1:10:06 AM UTC-8, Rob Williscroft wrote: > Peter Steele wrote in > > news:f37ccb35-8439-42cd-a063-962249b44...@googlegroups.com in > > comp.lang.python: > > > I want to write a program in Python that sends a broadcast message > > using

Sending a broadcast message using raw sockets

2013-01-18 Thread Peter Steele
I want to write a program in Python that sends a broadcast message using raw sockets. The system where this program will run has no IP or default route defined, hence the reason I need to use a broadcast message. I've done some searches and found some bits and pieces about using raw sockets in

Specifying two log files with one configuration file

2013-01-06 Thread Peter Steele
I want to configure the Python logging module to manage two separate log files, allowing me to do something like this: import logging import logging.config logging.config.fileConfig("mylogging.conf") root = logging.getLogger() test = logging.getLogger("test") root.debug("This is a message target