Quote:
Originally Posted by JoeBloggs1759
[I]n a particular application when a user ticks a check box (that they shouldn't) the data with the user session information changes enough to break the system:
Bad data: 0x0030 2d33 3238 372d 3100 5450 474c 4f30 3131 -3287-1.TPGLO011
Good data:0x0030 2d33 3238 372d 3101 5450 474c 4f30 3131 -3287-1.TPGLO012
This is from a tcpdump running all the time on a server with lots of disk space using these options:
tcpdump -n -i eth2 -s 0 -w /data/trace7
I then use:
tcpdump -n -r trace6 -s 0 -X -tttt | grep -n -B4 TPGLO | grep -B4 3100
..to find the offending user, in the case above it was TPGLO011 and get them to remove the check box.
[...]
How can I automate a script to send an email with that bit of data to the helpdesk....?
|
If all the info you need is output from the second tcpdump command then the quickest way would be to pipe the output to mail. Something like thisa -
Code:
tcpdump <stuff> | mail -s "Dumb User" helpdesk@<yoursite>
If you want a more detailed message you can have a text file with instructions for the helpdesk prepared and then append the tcpdump output to it and mail that file. A quick example -
message.template.txt
--------------------
"Dear Helpdesk,
This user is an idiot!
"
script
------
Code:
cp message.template.txt message.txt
tcpdump <stuff> >> message.txt
cat message.txt | mail -s "Dumb User" helpdesk@<yoursite>
That should hopefully get you started.
Joe