Results 1 to 7 of 7

Thread: Simple [Executable] Bash Scripting

Hybrid View

  1. #1

    Arrow Simple [Executable] Bash Scripting

    I wrote an extremely simple script to put my card into monitor mode, change my MAC, then run airodump-ng...

    Code:
    #!/bin/bash
    
    airmon-ng stop ath0
    
    ifconfig wifi0 down
    
    macchanger --mac 00:11:22:33:44:55 wifi0
    
    airmon-ng start wifi0
    
    airodump-ng ath0

    Then I do "chmod 777 myfile" to get the file executable.


    I can run it fine from the shell, but when I double-click it, airodump-ng won't run (though all the commands do work). So, my question is, is there something I can do to allow airodump-ng to pop up in the shell when I double-click?


    Am I doing something wrong?

  2. #2
    Just burned his ISO
    Join Date
    Jul 2008
    Posts
    3

    Default

    Why do you use ath0 and wifi0 ?
    Have you got 2 wireless card ?

    this should work (i did it with wifi0 )
    Code:
    airmon-ng stop wifi0
    
    ifconfig wifi0 down
    
    macchanger --mac 00:11:22:33:44:55 wifi0
    
    ifconfig wifi0 up
    
    airmon-ng start wifi0
    
    airodump-ng wifi0

  3. #3
    Senior Member ShadowKill's Avatar
    Join Date
    Dec 2007
    Posts
    908

    Default

    Quote Originally Posted by issx37 View Post
    Why do you use ath0 and wifi0 ?
    Have you got 2 wireless card ?

    this should work (i did it with wifi0 )
    Code:
    airmon-ng stop wifi0
     
    ifconfig wifi0 down
     
    macchanger --mac 00:11:22:33:44:55 wifi0
     
    ifconfig wifi0 up
     
    airmon-ng start wifi0
     
    airodump-ng wifi0
    It isn't necessary to bring the card down/up twice. ifconfig blah down and airmon-ng start blah are all you need.



    "The goal of every man should be to continue living even after he can no longer draw breath."

    ~ShadowKill

  4. #4

    Default

    Thank you for the responses...I don't need help with the commands, I would just like for airodump-ng to pop up. For example:

    Code:
    #!/bin/bash
    
    airodump-ng ath0
    chmod 777 myfile



    When I double-click it, airodump-ng won't pop up, but when I run "myfile" through shell, it does. How can I get it to pop up just by double-clicking?





    Sorry for the confusion.

  5. #5
    Senior Member ShadowKill's Avatar
    Join Date
    Dec 2007
    Posts
    908

    Default

    Quote Originally Posted by Munkey106 View Post
    Thank you for the responses...I don't need help with the commands, I would just like for airodump-ng to pop up. For example:

    Code:
    #!/bin/bash
     
    airodump-ng ath0
    chmod 777 myfile



    When I double-click it, airodump-ng won't pop up, but when I run "myfile" through shell, it does. How can I get it to pop up just by double-clicking?





    Sorry for the confusion.
    Does a shell come up at all?

    Perhaps try something like
    Code:
    #!/bin/bash
     
    ifconfig wifi0 down
     
    macchanger --mac 00:11:22:33:44:55 wifi0
     
    airmon-ng start wifi0
     
    xterm -e airodump-ng --bssid "YOUR_AP_HERE" -w capt wifi0



    "The goal of every man should be to continue living even after he can no longer draw breath."

    ~ShadowKill

  6. #6

    Default

    ShadowKill, you got me on the right track! Thanks!

    Here's what I did to make it work like I wanted...

    Code:
    #!/bin/bash
    
    konsole -e airodump-ng ath0
    chmod 777 myfile



    You got me on the right track with the "xterm" thing, so I searched a little more and figured out the "konsole" command. Now I can double-click and it pops up. By the way, "xterm" did work, but I wanted a legit window




    Anyway, thanks alot! I appreciate your help.

Posting Permissions

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