Jump to content

MrGadget

Active Members
  • Posts

    17
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by MrGadget

  1. Hi guys, 

    I just wanted to share a little script I made to trigger PineAP & Karma if my phone connects to my management AP. 

    As soon as my device with the specified MAC address connects to it, PineAP and Karma are started (including some visual feedback using the LEDs).

    When the device disconnects from the AP, PineAP & Karma are turned off.

     

    #!/bin/bash
    <<COMMENT1
    Script that checks if a defined MAC address is connected
    to the hotspot on interface wlan0-1. If the device is connected,
    the pineapple automatically starts to generate wifi-honeypots.
    On client dissconnect the honeypots are turned off.
    
    COMMENT1
    
    triggerMAC="FF:FF:FF:FF:FF:FF"
    
    #Checks if a client with the defined MAC connects to AP
    client=`iw dev wlan0-1 station dump | grep "$triggerMAC"`
    echo "Starting to listen for "
    
    #Wait for client to connect
    while [ -z "$client" ];
    do
    	sleep 1
    	client=`iw dev wlan0-1 station dump | grep "$triggerMAC"`
    done
    
    #Notification to WebGUI on client connect
    pineapple notify "Client connected"
    
    #LED animation for visual feedback
    for i in {1..3}
    do
    	pineapple led red on
    	pineapple led blue on
    	pineapple led yellow on
    	sleep 1
    	pineapple led red off
    	pineapple led blue off
    	pineapple led yellow off
    	sleep 1
    done
    pineapple notify "Firing up PineAP and Karma"
    #Start PineAP
    pineapple module PineAP start
    sleep 5
    pineapple led yellow on
    echo "Starting dogma"
    #Start dogma
    pineapple module PineAP dogma start
    sleep 2
    echo "Starting responder"
    #Start beacon responder
    pineapple module PineAP responder start
    sleep 2
    #Start collecting SSID
    pineapple module PineAP harvester start
    pineapple led blue on
    sleep 5
    
    #Start Karma, to allow client assosiation
    echo "Starting Karma"
    pineapple karma start
    pineapple led red on
    sleep 5
    
    #Turn LEDs off => for animation
    pineapple led red off
    pineapple led blue off
    pineapple led yellow off
    
    #While client is connected, LED animation is running => visual feedback
    while [ ! -z "$client" ];
    do
            pineapple led yellow on
    	sleep 1
            pineapple led yellow off
            pineapple led blue on
    	sleep 1
            pineapple led blue off
            pineapple led red on
    	sleep 1
            pineapple led red off
            pineapple led blue on
    	sleep 1
            pineapple led blue off
    	#Check if client is still connected
    	client=`iw dev wlan0-1 station dump | grep "$triggerMAC"`
    done
    
    #Stop Pineap
    pineapple notify "Client diconnected! Stopping PineAP and Karma!"
    pineapple karma stop
    sleep 5
    pineapple module PineAP stop
    sleep 5
    
    #Reset LEDs to work in default mode
    pineapple led reset
    echo "PineAP was shutdown"
    

     

    Hope you guys like it :)

     

    Cheers MrGadget

    • Upvote 2
  2. @Darren: I did not plan to release the source code as it's quick, dirty and uncommented. But if you'd like to check it out. no problem :-)

    @Barry: I made an eror during export of the stl. It's ment to be printed on the straight edge (so 90° flip). Like that the mount will not snap as fast.

  3. @Darren: I used wp5.sh as reference and created a simple GUI to make internet sharing easier and faster. Currently its pretty hacky but it lists all available interfaces and allows manual change :smile:

    Main View

    Ji7GgJh.png

    Interface selection (ethernet, wifi or in that case usb tethering)

    GYQHJDO.png

    After hitting "Save" a little confirmation pop-up:

    Nrrauod.png

    • Upvote 3
  4. @Havenbreaker

    @MrGadget I have 2 questions for you:

    1. What is that beautiful brand of case you are using?

    and

    2. What display are you using for your RPi?

    1. The case was a cheaper replica of a Pelican Case 1450. Same dimensions, but much cheaper.

    2. It's a 9'' LCD-Touch display that runs on 5[V] so there is no mix of different voltage levels. I made a simple GUI for internet sharing, so that it can be done via simple presses on the touchscreen :)

    Desktop overlay information is displayed using conky

  5. Finished the first version of the NANO mount. Will adjust all the dimensions, once I get my hands on my NANOs (hopefully tomorrow :grin: ).

    What do you guys think about it?

    Using double-sided adhesive tape mounted anywhere you want. Thread the NANOs USB-Plug through the hole and press it down, so that the RP-SMA antenna

    is latched in.

    WbXb7LR.png

    Cheers

    MrGadget

  6. @Mr-Protocol: thx for the link!

    @Darren: Would be great to have the CAD files for the final case (technical drawings would be good aswell) :-)

    Looking to make a functional mount that could be printed fast while still providing air circulation to ensure proper function of the NANO.

    If you don't have the files available, I just need to wait for the NANOs to arrive and the measure it by hand.

    Cheers

    MrGadget

  7. Hi guys,

    I ordered the NANO and while I'm waiting I figured, I'll design a nice wall-mount for it :D

    I was wondering, if it might be possible, to get the detailed dimensions of the NANO or even better, the CAD drawings.

    it would make it a lot easier to get it right with the correct dimensions :)

    Cheers

    MrGadget

  8. Hello Guys,

    Got a LAN turtle at defcon and love it so far :D

    Now i was curious if you might post a tutorial on how to cross compile c code (originally running on 32-bit systems), so one could port some

    self coded projects to the LAN turtle.

    Should be possible, right?

    Keep up the good work and looking forward to future developments.

    Cheers

    MrGadget

×
×
  • Create New...