Results 1 to 7 of 7

Thread: WDrive 2.0 - Android GPS tethering to BT

  1. #1
    Just burned his ISO
    Join Date
    Feb 2012

    Default [Script] WDrive 2.1 - Android GPS tethering to BT

    This is my new version of WDrive 2.1

    WDrive 2.1 is a script for Backtrack 5 R2 that will enable you to
    "tether GPS data" from your Android Device to Backtrack 5 using a USB Cable,
    this will then later be used to assign all this data to AP's discovered while "wardriving"
    and later loaded in either Google Maps or Google Earth which
    will show you where the AP's were located and which encryption they use + information about
    clients connected etc.
    This is VERY useful for those who need GPS Data but do not own a gps device.
    BlueNMEA is required running on your Aandroid device, you'll find this for free on the official Android Market (or Google Play)

    Download and install + run:
    chmod +x
    cp /usr/bin/wdrive
    Now you can run wdrive from terminal simply by typing "wdrive"

    Alternative download:

    Wdrive 2.0.0-2 - Thu Jun 14 14:43:01 CEST 2012
      -Added ASCII art and menu
      -Added check for installation
      -Added option to make a kml file out of old Kismet log files
      -New coloring and other text related changes
      -Hardcoded some commands
    WDrive 2.0.3 - Wed Jun 20 16:52:01 CEST 2012
      -Added Installation
      -Added changelog
      -Added trapped Ctrl + c with cleaning up
      -Cleaned up code more
      -Added "check gps" on main menu
      -Before telling you Kismet, gpsd and socat is running it will check for it
       if failed it will tell you to resetup
      -New way of finding IP
      -No more network restarting
      -Shortened down some sleep times, still testing and altering those
      -Some other small changes
      -Remember created mon(x) and remove it once script is done
    WDrive 2.0.4 - Wed Jun 20 18:32:05 CEST 2012
      -Fixed some kml making bugs and I'm 99% positive it works now
      -Installation script remade into easier way
      -Added text ontop (header)
      -Removed DHCPCD client, seems like I don't even need that anymore
    Wdrive 2.0.5 - Fri Jun 22 03:23:21 CEST 2012
      -Improved kml making, it will now move all files from /tmp/
      -Reveresed the order of changelog updates
      -Added online check for update with download link
    Wdrive 2.0.6 - Fri Jun 22 05:29:30 CEST 2012
      -Added onliecheck + online update
      -improved offline update check
    Wdrive 2.1 - Fri Jun 22 14:16:02 CEST 2012
      -Wdrive 2.1 Final release, no longer beta release
      -Improved some minor installation checks
      -Please report any bugs to
    PS! Wdrive 2012 copyright zatixiz should only be used for educational purposes and I am not responsible for whatever this script is used for
    Immagini allegate Immagini allegate
    Last edited by zatixiz; 06-23-2012 at 11:04 AM. Reason: Subscribing to my email

  2. #2
    Just burned his ISO
    Join Date
    Feb 2012

    Default Re: WDrive 2.0 - Android GPS tethering to BT

    Just a little update!
    I'm 99% positive that this doesn't even require a rooted android (My mistake)
    So basically this if for any gps built in android device!

  3. #3
    Good friend of the forums comaX's Avatar
    Join Date
    Feb 2010
    Paris, France

    Default Re: WDrive 2.0 - Android GPS tethering to BT

    All right, testing again.

    Comments coming as I'm testing it.

    1) Network restart
    - So you're asking for allowance, that's good. But we still don't know why. In a modified version of mine, not restarting it gave the exact same result ( yeah, fail. But in the same way)
    - you might want to tell him to shut up, it's pretty verbose.

    2) Ui. Much better.
    - A glitch there : "Alright! Which USBport is your phone connected to? (useally "usb0") " --> usually (yeah, I'm a douche )

    3) IP
    [CODE]I found the ip: "

    That's the found IP. I think your method isn't the best, you should find a way to have only the IP. I'll get to that in the code review. (IP alone is the good one though)

    4) BlueNMEA port
    First time it was already running when I was bitching about not finding it... So my fault. Now it seems clear what the port is, and -for my device- it seems to always be 4352. If this is a pattern, you might want to hardcode it.

    5) Socat
    It launches in an Xterm, hurra ! There's nothing in the window though.

    6) Xterm
    Kismet and GPSd still not launching. Heading for fail ?

    Things are supposed to be good. I type in clean.

    7) Restarting my network again. Dude you like that don't you ?

    8) Failure.
    Now let's finally make the .kml
     What's the name of your .netxml file below?
    android-sdk-linux          Desktop                         test_gps_Folder
    android-sdk_r18-linux.tgz  google-chrome-stable_current_amd64.deb  readme.txt         usr    
     Press "Enter" to use  
    As you can see, no netxml file in the working folder. Nothing surprising though, since kismet never launched.
    So, yeah failure

    Now let's review the code.

    1) Boot cleaning.
    Still need some explanations. And why asking for permission to restart the network if it's not mandatory ? By the way, when you're wardriving, you're I think rarely connected whatsoever.

    /etc/init.d/networking restart >/dev/null ### Not Outputing as I hoped in VMware but works perfectly otherwise on normal laptop...
    Nice try, but you might want to use something stronger :
    /etc/init.d/networking restart &> /dev/null
    3) Formatting.
    When you do indent your code, make sure to align if,else, fi, so that in a glance we see it on the same level. You did it most of the time but missed one in the boot()

    4) Checking
    echo -e "${c} Checking for required packages..."
    		if dpkg -l | grep dhcpcd 1>/dev/null && dpkg -l | grep socat 1>/dev/null;
    Yes ! That's what I'm talking about.

    5) Installing()
    Careful with all those nested ifs. Why sleep 5 at the end ?! That's one hell of a wait.

    6) Some code
    echo -e "${b} Alright, let's set up some stuff and get this thing running!\n"
    	echo -e "${b} Session name? Files created later will be named after that"
    		echo -en "$b Name it: "
    			read session
    	sleep 5
    Sleep 5, again. I already lost 10 seconds.

    7) Airmon
    airmon-ng start $interface >/dev/null
    		mon=`airmon-ng | grep mon* | sort -rn | awk 'NR==1{print $1}'`
    So you did shut him up, that's good. And checking for the actual name after the monitor interface is created is the good move. Still don't need wildcards though.

    sleep 2 ### Why the **** did I put all those here?!? Stupid..
    	sleep 2
    	sleep 3
    	sleep 2
    See your comment

    9) ifconfig.
    This time it showed usb0 without the -a parameter. Go figure...

    10) Xterm ifconfig.
    I don't think you need to have an xterm, just to show ifconfig. You asked to take all usb out before and all, so there should be just one. And it's only a network interface in usb, and we don't use much of them.

    11) IP.
    As I said in the first part, your method doen't seem to be the best. I'd use something like
    ip route show | awk '(NR == 1) { print $3}'
    12) # Setup GPSD, SOCAT+Kismet
    echo -e "${b} [+] Starting GPSD and Socat+Kismet using the ip=$ip and port=$port... ${ce} \n"
    			xterm -geom 80x5-0+0 -e socat TCP:$ip:$port PTY,link=/tmp/gps &
    			sleep 2
    			pkill gpsd
    			xterm -geom 80x5-0+85 -e gpsd -N -n -D 3 /tmp/gps &
    			sleep 2
    			xterm -geom 80x30-0+170 -e kismet -c $mon &
    - first xterm launches. Nothing in it though, so you might just background it.
    - other xterm don't launch. For once you might want to use a longer sleep. I'm still not persuaded those xterms are needed though.
    - Why kill gpsd when it's not yet launched, and you already did that in the cleaning part.

    				echo -e "${c} Please type in the port of the BlueNMEA client running!$ce"
    				echo -en "${c} Port: ${ce}"
    				read port
    				sleep 3
    				echo -e "${b} [+] Starting GPSD and Socat+Kismet using the ip=$ip2 and port=$port... ${ce} \n"
    				xterm -geometry 60x15-0-0 -e socat TCP:$ip2:$port PTY,link=/tmp/gps &
    If the logical test fails and we end up on the "else" part of the code, only socat is launched... Haven't you forgotten something ?

    13) kmlmake()
    still moves files around, but doesn't make the kml.

    echo -e "${r} Please wait while the temporary files are renamed etc...${ce}\n"
    	sleep 15
    You can't be serious. 15 seconds, when nothing happens meanwhile ?

    That seems to be all for now ! Test realised on 2.0.2.
    Running both KDE and GNOME BT5 flawlessly. Thank you !

  4. #4
    Just burned his ISO
    Join Date
    Feb 2012

    Default Re: WDrive 2.0 - Android GPS tethering to BT

    Thank you ComaX !
    I've added some new features and fixed some parts that you helped me out with + some other stuff that I found
    Relesed version 2.0.3 on, check it out!

    Thanks, zatixiz

  5. #5
    Good friend of the forums comaX's Avatar
    Join Date
    Feb 2010
    Paris, France

    Default Re: WDrive 2.0 - Android GPS tethering to BT

    I checked the 2.0.4 version out, but couldn't test it yet. I'll report as soon as I do!
    Running both KDE and GNOME BT5 flawlessly. Thank you !

  6. #6
    Just burned his ISO
    Join Date
    Feb 2012

    Default Re: WDrive 2.0 - Android GPS tethering to BT

    I'm sorry ComaX, but it seems like I messed up the 2.0.4 version... I've released 2.1 now which will, as usual, be on my!

    You can now get it using the below method aswell!
    Thank you for reviewing it!

    chmod +x
    cp /usr/bin/wdrive
    Now you can run wdrive from terminal simply by typing "wdrive"

  7. #7
    Just burned his ISO
    Join Date
    Feb 2012

    Default Re: WDrive 2.0 - Android GPS tethering to BT

    Did you check out 2.1 ComaX?

Similar Threads

  1. iPhone Tethering on BT5
    By mrYoda in forum BackTrack 5 Beginners Section
    Replies: 10
    Last Post: 10-12-2012, 10:23 AM
  2. Android GPS Tethering + Kismet Script
    By zatixiz in forum BackTrack 5 General Topics
    Replies: 6
    Last Post: 06-16-2012, 07:21 PM
  3. Tethering APs
    By freemyggle in forum Beginners Forum
    Replies: 3
    Last Post: 04-24-2011, 02:43 PM
  4. Wireless Tethering
    By sttlnb53 in forum Beginners Forum
    Replies: 0
    Last Post: 03-08-2011, 05:19 AM
  5. Fix: BT4 r2 iPhone 4 Native USB Tethering
    By spyd3rweb in forum BackTrack Fixes
    Replies: 5
    Last Post: 11-29-2010, 05:58 PM

Posting Permissions

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