Announcement

Collapse
No announcement yet.

Python script snippet, grab information from kismet ?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Python script snippet, grab information from kismet ?

    Hello, does anyone know how i grab the value " Detected new network" from a already running kismet_server process ?
    It looks that the easiest metod is to do it with the python-kismet threaded listener found here:
    http://code.google.com/p/python-kismet/

    It looks like that kismet can send information via a internal IP adress ( 127.0.0.1 ) and does so in clear text, but i can be wrong.
    There is also "Named pipe output for integration with other tools" mentioned in the sparse documentation.
    I have looked for solutions on this problem to no avail.

    I have written a small "template", to clarify things:

    import RPi.GPIO as GPIO
    import os
    #import kismet ( imports the tread listener mentioned ? )
    GPIO.setwarnings(False)
    GPIO.setmode(GPIO.BOARD)
    GPIO.setup(4, GPIO.OUT)#LED ( NEW AP FOUND)
    #Makes sure the led is initially off:
    GPIO.output(4, True)
    #start of loop:
    #get info from kismet, if the sentence "Detected new network" is present in output:
    GPIO.output(4, False) #turns on the LED
    time.sleep(1.5)#waits 1.5 sec
    GPIO.output(4, True) #turns off the LED
    #if the if the sentence "Detected new network" is not present in output:
    Do nothing, return to start of loop.
Working...
X