Script to check when new host associates with wireless AP?

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
bitlocker
DD-WRT Novice


Joined: 27 Aug 2010
Posts: 7

PostPosted: Fri Aug 27, 2010 14:40    Post subject: Script to check when new host associates with wireless AP? Reply with quote
My end goal is to combine it with the mail sending function introduced here: http://www.dd-wrt.com/phpBB2/viewtopic.php?p=477959 ...

... but for now, I am mainly interested in a script that can tell when someone connects to the wireless AP. I should be able to handle combining the scripts on my own.


So here is my question:
Quote:
Is there any way for a script to know when a new host associates with the wireless? I would like to combine scripts so that when someone successfully authenticates with my wireless AP, an e-mail is generated.


It seems to me that this script would have to be CRONed to run every x number of minutes, and most likely do some kind of comparison of the log files- as I do not think it is possible to simply run code upon wireless association. Can anyone offer any insight?
Sponsor
bitlocker
DD-WRT Novice


Joined: 27 Aug 2010
Posts: 7

PostPosted: Sat Aug 28, 2010 0:53    Post subject: Reply with quote
bump

I'm trying to see if associations are logged in the syslog but I'm new to the Linux / UNIX commands (and I have the Micro firmware) so I'm really working with a handicap here. Any help is appreciated.
tc23emp
DD-WRT Novice


Joined: 23 Aug 2010
Posts: 33

PostPosted: Sat Aug 28, 2010 15:12    Post subject: Reply with quote
I added what you are are asking for to my scripts examples on my wiki page.

Are you sure you don't have sendmail (since it is supposed to be built-in to busybox {the shell suite})?

Try this command to see if it exists:
which sendmail
bitlocker
DD-WRT Novice


Joined: 27 Aug 2010
Posts: 7

PostPosted: Sat Aug 28, 2010 21:29    Post subject: Reply with quote
tc23emp wrote:
I added what you are are asking for to my scripts examples on my wiki page.

Are you sure you don't have sendmail (since it is supposed to be built-in to busybox {the shell suite})?

Try this command to see if it exists:
which sendmail

Wow awesome! Thank you so much. I'm going to give it a whirl and see if sendmail works.

edit:

which sendmail:
Code:

sh: eval: line 1: which: not found
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10143

PostPosted: Sun Aug 29, 2010 0:23    Post subject: Reply with quote
You ought to say what hardware and firmware you're using. If you have a micro build they you can pretty much forget about scripting anything.
_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
bitlocker
DD-WRT Novice


Joined: 27 Aug 2010
Posts: 7

PostPosted: Sun Aug 29, 2010 4:59    Post subject: Reply with quote
phuzi0n wrote:
You ought to say what hardware and firmware you're using. If you have a micro build they you can pretty much forget about scripting anything.


Here's the info:

Quote:
Router Model
Linksys WRT54G2 / GS2
Firmware Version
DD-WRT v24-sp2 (07/21/09) micro - build 12533


It seems that Micro is all this router will support. I will be purchasing a new router that can accommodate a different version. I'd like to purchase from Best Buy (have a gift card Very Happy ). What make / model would you advise that is best dollar for dollar?
bitlocker
DD-WRT Novice


Joined: 27 Aug 2010
Posts: 7

PostPosted: Tue Aug 31, 2010 17:35    Post subject: Reply with quote
Update!

I purchased a Cisco / Linksys E2000 and got everything loaded. I am in the process of testing the script with this combo of hardware / firmware. I will update when complete. Wish me luck!

Edit:

It seems to be working after I got the sendmail issues sorted out with my mail host. For some reason it is still not showing the sender's information (blank)- but at least it works.

All of my tests are showing as "Unknown at...". What does it take for them to not be "Unknown"?
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum