Script for periodic packet sniffer and ftp of the file to re

I work at a dedicated server provider and we wish to keep track of the domains that are hosted on our servers. I wrote a program that will scan packet capture files and save the domains found in http requests to a database. What would be amazing would be if I could have the router periodically run a packet sniff ( once or twice a day on incoming to port 80.. just a small sniff that stops after a file size is reached or for a set time interval) and then ftp the resulting capture file to a remote server where my program will perform the scans. Does this sound possible with the microtik scripting?

sure. you can’t push the ftp file outbound (except with 3.0 maybe) but you can sure grab it using ftp / ssh and then process it.

/tool sniffer start
:delay 300
/tool sniffer stop

that’s a quick example, but you could spice it up and do it right by adding more code. You probably want to set the parameters to sniffer each time (in case you run one manually and change values).