Edmond Rodriguez on 7 Jul 2010 10:16:58 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Simple Python Help WAS:Filtering Packets in Monitor Mode


I can get some sort of action if I put a ":" after the line... *if line.find(':5A:84') != -1*

if line.find(':5A:84') != -1:

On Wed, Jul 7, 2010 at 11:51 AM, Jon Nelson <dotcop@gmail.com> wrote:


On Tue, Jul 6, 2010 at 10:28 PM, Paul L. Snyder <plsnyder@drexel.edu> wrote:
On Tue, 06 Jul 2010, Jon Nelson wrote:

> back|track4 has r1645, so no joy.  Also, the majority of the keys seem to
> effect the AP listing.  I hope that is not the case...

You may be stuck with to trying to script something.  Check the airodump
output formats to see if you can get something that's easily parsable and
has the signal strength info you're looking for.  You can then filter
the entries based on MAC and output just the info for the one you're
looking for.

Perhaps you could try creating a FIFO and having airodump write to it;
your script can then pull data from the FIFO as it becomes available.


I am by no means a Python or ncurses programmer, but I would think I would be able to figure this out.  I guess not :(  Here is what I have so far:

#!/usr/bin/env phthon

import curses
# create curses screen using whole display
stdscr = curses.initscr()
# I realize this is an infinite loop
while True:
  # parse the CSV file
  for line in open('foo-01.csv'):
    # look for the line with the right MAC
    if line.find(':5A:84') != -1
      # send the line to the screen
      stdscr.addstr(0, 0, line)
      # redraw the screen
      stdscr.refresh()
# I realize I am not properly cleaning up, but will get to that later

When I run this I get a blinking cursor.  If I create a variable in the code and send that to the screen it works.  If I just print the line variable using print() it prints out the line.  What am I missing.

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug