Login Register






Need Help Creating My First Script filter_list
Author
Message
RE: Need Help Creating My First Script #11
(01-08-2014, 10:45 AM)Geoff Wrote: Well, a shell script would have been fewer lines of code to accomplish the same thing. While both call an interpreter of sorts, Python needs additional modules/libraries and while im not expert on python... I am pretty sure that the os.system() call simply executes a shell command.

So what youve done is written a python script that calls the python interpeter that references an external library that simply pipes the command to the shell interpreter.

a shell script would simply pipe the command to the shell interpreter.

Do you see how this might be considered inefficient? unnecessarily complex? note i said unnecessarily complex, i dont mean that its a complex script lol. Youre right that in reality the size of the script makes this a moot point... i doubt very much you would ever notice a performance issue. But for simple things like this where all you are doing is automating a list of commands, its in my opinion (not that its right), that a simple shell script would be best practice.

Thanks [Geoff] Makes total sense. Thanks for explaining that so clearly.
My programing vision at this point is very cloudy but each problem i run into/learn about helps clear things up.
Cheers

Reply

RE: Need Help Creating My First Script #12
(12-29-2013, 05:52 AM)wnrwnrchxdnr Wrote: Hi all.

Im trying to learn the very basics of coding. Ive decided moving forward to learn python as my base then go from there.
I want to create a simple script for my Kali install that will boost the Tx for the alpha radio and also change the macaddress randomly..

currently i have to type each command 1 at a time..
iwconfig wlan0
ifconfig wlan0 down
iw reg set NZ
ifconfig wlan0 up
iwconfig wlan0

macchanger -r wlan0

how would i combine this into a small executable python script?
not looking for someone to do it for me..just some tips and advice or maybe another script that i can disassemble /reverse and change to make work.

you should use bash insead of python
double free()

Bitcoin Donations:
1FseigF4RPRwfDoa6XGFQmhGxmDc7Pya4r

Reply

RE: Need Help Creating My First Script #13
(01-13-2014, 12:19 AM)upsurt Wrote:
(12-29-2013, 05:52 AM)wnrwnrchxdnr Wrote: Hi all.

Im trying to learn the very basics of coding. Ive decided moving forward to learn python as my base then go from there.
I want to create a simple script for my Kali install that will boost the Tx for the alpha radio and also change the macaddress randomly..

currently i have to type each command 1 at a time..
iwconfig wlan0
ifconfig wlan0 down
iw reg set NZ
ifconfig wlan0 up
iwconfig wlan0

macchanger -r wlan0

how would i combine this into a small executable python script?
not looking for someone to do it for me..just some tips and advice or maybe another script that i can disassemble /reverse and change to make work.

you should use bash insead of python

Agreed bash would be the best option for this and can be achieved easily have a look here for a starting reference, which should be enough to achieve this.
If you need help feel free to PM me
[Image: klfpJD]
Probitcoin
Freebitcoin
BTC clicks
bitcoin wallet:
1FBPAanbs3rJU9BUpobpDJc9hHUaCaC25N

Reply

RE: Need Help Creating My First Script #14
@upsurt & @chmod - This has already been clearly established within this thread that bash would have been a better option. You guys are more or less beating a dead horse lol.

Reply