Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to write a bash shell script to execute a command for one minute then stop that command (ctrl c) pause for 10 seconds then run another command for one minute then stop that command pause for 10 seconds then go back to the begining of the script and loop indefinetly.
First I want to run this command for one minute;
reaver -i mon0 -c 6 -b "mac address" -a -vv
stop previous command and pause for 10 seconds
Then run this command for one minute;
airodump-ng -i mon0
stop previous command and pause for 10 seconds
Then recall reaver command and continue to loop through until reaver spits out result.
I imagine I will need to create a function for each command, an if statement and an ifelse statement and I will need the break and sleep commands. but I am not sure about the syntax, PLEASE HELP THIS NOOB!
As you are new to LQ it will be good if you have a look at LQ rules here
We are happy to assist you but you have to let us know what you have done so far. You already have requirements for your script in place let us know what you have prepared for that? Share the script which you have prepared and let us know where you are stuck.
This NOOB is seeking advice on automating the use of cracking tools (reaver and airodump-ng). Without a legitimate use case, I would consider any further advice as being complicit in cracking and so against LQ rules.
That's a pretty hefty assumption. How do we know the OP doesn't want to test this on his LAN? Is that really the attitude we want to portray to the community? That hacking/reverse engineering is to be admonished?
That's a pretty hefty assumption. How do we know the OP doesn't want to test this on his LAN? Is that really the attitude we want to portray to the community? That hacking/reverse engineering is to be admonished?
No one here is denying any assistance but allend raised a valid point. We need to know what exactly he is trying to achieve / do? And no one is admonishing hacking / reverse engineering, it is person's personal choice. It is just that at LQ we do not encourage discussions on those topics. More information on that rule LQ mods can give.
No less hefty than the assumption that the OP does not have malicious motives.
If the OP has pure motives, then disabling WPS and WEP on the AP would seem an easier course.
No less hefty than the assumption that the OP does not have malicious motives.
If the OP has pure motives, then disabling WPS and WEP on the AP would seem an easier course.
It might be possible that he is trying to test those tools obviously my assumption is that he is doing it for learning purpose. We cannot say for sure unless OP clarifies himself.
Another thing is that he is not asking us information on those tools instead he is asking on script.
I accept that the intent of the post was advice on scripting, and the answers addressed that. I just have a reservation about a self-confessed noob having trouble writing a script also wanting to conduct pen-testing.
QUOTE: "If the OP has pure motives, then disabling WPS and WEP on the AP would seem an easier course."
Unless he was trying to hack his own network. I just don't see how this kind of attitude can propagate anything but negative bias. Of COURSE I don't condone nefarious behavior, but one can only learn better security by learning how to defend one's self. What better way to do this than to learn what someone might do to your network?
QUOTE: "If the OP has pure motives, then disabling WPS and WEP on the AP would seem an easier course."
Unless he was trying to hack his own network. I just don't see how this kind of attitude can propagate anything but negative bias. Of COURSE I don't condone nefarious behavior, but one can only learn better security by learning how to defend one's self. What better way to do this than to learn what someone might do to your network?
That's very true, and I absolutely agree with you...BUT...
There is no way for us to KNOW the OP's motives; we can only address what we see, and acknowledge the position it will put LQ in, if those motives aren't correct. Knowledge should be free and open..and thankfully there is no shortage of advice on how to use either of those programs, nor is there shortage of advice on how to construct bash shell scripts to automate tasks. The OP has free, unfettered access to those resources. Putting the two together is up to them.
In this case, it's not about censorship, but about accountability to this site.
I do agree that OP should have clarified on what exactly he is trying to do / achieve but without giving him a chance to clarify we cannot simply roll the case against him.
Quote:
In this case, it's not about censorship, but about accountability to this site.
I am not sure how it will make the site accountable? We are not teaching other person to use those tools as this site is not for hacking / cracking related stuff. However, this site is do here for assisting the members on anything related to linux and bash is definitely part of it. As per LQ rule:
Quote:
Posts containing information about cracking, piracy, warez, fraud or any topic that could be damaging to either LinuxQuestions.org or any third party will be immediately removed.
I don't see anything relate to cracking here but just the name of two tools which can be used for cracking. I don't think so mentioning just the names violates any rule. As long anyone as anyone put anything directly related to hacking / cracking I don't think LQ rules are getting violated. Here OP is asking about scripting and not anything about those tools whatsoever.
When looking at such posts I guess we should be neutral unless there is something happens which points to something fishy.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.