Results 1 to 1 of 1

Thread: Airpwn-Python

  1. #1
    Senior Member Shatter's Avatar
    Join Date
    Jan 2010
    Posts
    192

    Default Airpwn-Python

    Please modify the airpwn-ng package in the repos to include Python support like airpwn v1.4 does.

    Commands:
    root@bt:~/airpwn# airpwn -c conf/pyexample -d mac80211 -i mon0 -v -v -v
    Parsing configuration file..
    Unknown command at line 4
    Error parsing configuration file.
    root@bt:~/airpwn#
    Configuration file:
    begin pyexample
    match ^(GET|POST)
    ignore ^GET [^ ?]+\.(jpg|jpeg|gif|png|tif|tiff)
    pymodule pyscripts/pyexample
    Thank you.

    Okay, peeps! I managed to get the python support working again. Airpwn v1.4 comes with integrated python scripting support, which can be really handy on some occasions. The original Airpwn v1.4 uses Python2.4, but Backtrack 4 Final has Python2.5, so we have some patching to do before we can compile it. Here's the whole process:

    • Download Airpwn v1.4 from Sourceforge
      First you will need to download a clean source code of Airpwn v1.4 from Sourceforge.

    • Extract the archive
      Cd to the folder where you downloaded the file and extract it. Notice: This creates a new folder called airpwn-1.4.
      Code:
      tar -xvf airpwn-1.4.tgz
    • Optional: Apply a QoS patch
      I found an interesting QoS patch on the net while googling. Copy the code into a file and save it into the airpwn-1.4 folder. Name it "QoS.diff". Go to the folder in terminal and type "patch < QoS.diff" without the quotes. This should apply the patch.

    • Apply a Python 2.4 to Python 2.5 patch
      Copy the lower code into a file and save it as pypwn.sh into the airpwn-1.4 folder. Then cd to it, "chmod +x pypwn.sh" the file and finally run it.

      Code:
      #!/bin/bash
      
      # Fix airpwn files so we can use it with a Python version other than 2.4.
      PYTHON_VERSION1=$(python -c 'import sys; print sys.version[:3]')
      PYTHON_VERSION2=$(echo $PYTHON_VERSION1 | tr . _)
      
      for FILE in configure.ac conf.h config.h.in; do
      sed -i "s|python2.4|python${PYTHON_VERSION1}|g" $FILE
      done
      sed -i "s|Python2.4|Python${PYTHON_VERSION1}|g" configure.ac
      sed -i "s|PYTHON2_4|PYTHON${PYTHON_VERSION2}|g" config.h.in
    • Install some dependencies
      You will probably have to install some extra files before you can compile this.
      Code:
      apt-get install libpcre3-dev autoconf
    • Compile and install
      The final step is to "./configure", "make" and "make install". Make sure you run the install command with r00t privileges.

    • Add an environment variable
      I noticed that Airpwn fails to find your python modules, should an environment variable not be set. You can run this in your terminal each time, but you'll probably want to add it to a permanent place.
      Code:
      export PYTHONPATH=.


    That's it. Time to have some Python fun!

    Regards,
    Shatter


    pureh@te: Your turn to update the repos
    Last edited by Archangel-Amael; 02-19-2010 at 08:22 PM.
    I have the card in me head, but you have the memory problems?

Similar Threads

  1. Airpwn
    By MassAppeal in forum Beginners Forum
    Replies: 13
    Last Post: 02-13-2011, 02:46 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •