Jump to content

Krontab Log Modification


Ucnt

Recommended Posts

I know that the Karma log is temporarily stored at tmp/karma-phy0.tmp, but wanted to see if anyone knew what file managed the log file (i.e. that creates its input) so I can see about modifying it to add the date/time that the probe was received. grep'ing the string "Probe Request from" didn't come up with anything.

My intent is: Have a couple of my Pineapples send their log files (with date/time stamp of each probe request) to a "sink" (i.e. data collection server) which will track a user by MAC address or, if the MAC address is being randomized, by its SSID set (e.g. "home-router123", "starbucks", "myoffice-router").

I can use the DTG of the log file transfer but I want to limit the number of times I transmit the log file and including it in the probe request log seems to be the easiest solution.

Link to comment
Share on other sites

I know that the Karma log is temporarily stored at tmp/karma-phy0.tmp, but wanted to see if anyone knew what file managed the log file (i.e. that creates its input) so I can see about modifying it to add the date/time that the probe was received. grep'ing the string "Probe Request from" didn't come up with anything.

It is most probably a binary, that is why you cannot find this.

I managed to add a timestamp with the following command (read the log file, in this example I filter only the connects, and redirect to a new file). You can also redirect to a remote server, the sink as you call it.

tail -f /tmp/karma-phy0.log | grep 'pass\|AP-STA-DISCONNECTED\|Successful' | awk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; }' >> /sd/karma.log
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...