RE: Need Help Creating My First Script 01-06-2014, 08:58 AM
#5
success!
ok so i cheated a bit and used the python script [zero-uplink] added but had to modify a few things because i was getting errors
Original
Modified i had to make "ifconfig wlan0 down" from "iwconfig"
then i kept getting error with macchanger line executing ..
"Cant Change MAC: Interface being used or down ...."
i tried moving that command after the "boost tx ie set NZ" but before telling WLAN0 to come back up and it seems to do the trick.
Final :
############
#!/usr/bin/python
import os
os.system('iwconfig wlan0')
os.system('ifconfig wlan0 down')
os.system('iw reg set NZ')
os.system('macchanger -r wlan0')
os.system('ifconfig wlan0 up')
os.system('iwconfig wlan0')
# os.system is used to execute os commands
###########
Not sure if its the best most elegant way to do things but it works and im happy.
Totally shaved 48 seconds off my routine. :Thumbs-Up:
ok so i cheated a bit and used the python script [zero-uplink] added but had to modify a few things because i was getting errors
Original
Code:
#!/usr/bin/python
import os
os.system('iwconfig wlan0')
os.system('iwconfig wlan0 down')
os.system('iw reg set NZ')
os.system('ifconfig wlan0 up')
os.system('iwconfig wlan0')
os.system('macchanger -r wlan0')
# os.system is used to execute os commandsModified i had to make "ifconfig wlan0 down" from "iwconfig"
then i kept getting error with macchanger line executing ..
"Cant Change MAC: Interface being used or down ...."
i tried moving that command after the "boost tx ie set NZ" but before telling WLAN0 to come back up and it seems to do the trick.
Final :
############
#!/usr/bin/python
import os
os.system('iwconfig wlan0')
os.system('ifconfig wlan0 down')
os.system('iw reg set NZ')
os.system('macchanger -r wlan0')
os.system('ifconfig wlan0 up')
os.system('iwconfig wlan0')
# os.system is used to execute os commands
###########
Not sure if its the best most elegant way to do things but it works and im happy.
Totally shaved 48 seconds off my routine. :Thumbs-Up:

![[+]](https://sinister.li/images/modern/collapse_collapsed.png)