Closed njmulsqb closed 3 years ago
Did you run crontab -e as 'root'? Sn1per requires root to run properly, so executing as a normal user won't work.
Did you run crontab -e as 'root'? Sn1per requires root to run properly, so executing as a normal user won't work.
Yes it's run as root with sudo.
I tested this earlier on the latest Kali Linux 2020.4 image, and everything is working as expected for me. Can you send the output of your /usr/share/sniper/loot/workspace/
cat /usr/share/sniper/loot/workspace/<your_workspace_here>/scans/scheduled/*.sh
I tested this earlier on the latest Kali Linux 2020.4 image, and everything is working as expected for me. Can you send the output of your /usr/share/sniper/loot/workspace/
/scans/scheduled/*.sh ? cat /usr/share/sniper/loot/workspace/<your_workspace_here>/scans/scheduled/*.sh
Sure, the output to the above command is: sudo sniper -t af.mil -w af.mil -re >> cron.log
Thanks. That should work. Does cron.log show any output at all after?
Also, can you try running the following manually to make sure this works as 'root'? This assumes you're running a daily scheduled scan.
find /usr/share/sniper/loot/workspace/ -type f -name "daily.sh" -exec bash {} \;
Thanks. That should work. Does cron.log show any output at all after? Also, can you try running the following manually to make sure this works as 'root'? This assumes you're running a daily scheduled scan.
find /usr/share/sniper/loot/workspace/ -type f -name "daily.sh" -exec bash {} \;
When run manually it works alright and creates a cron.log file but there is no cron.log file otherwise which is proof that cronjob is not running on its own, that's what I mentioned here in my very first post as well
Just to simplify and confirm some things, I ran crontab -e as 'root' (sudo su
) and added the following:
*/1 * * * * sudo sniper -t 127.0.0.1 -m fullportonly -w 127.0.0.1 >> cron.log
After a minute, cat /root/cron.log
to view output. This worked on a fresh Kali 2020.4 image. Can you try on your end?
Closing out for now, but let me know if you still need help with this.
Hello,
I have scheduled a daily task for cronjob in sniper, using the guide for scheduling mentioned on this repository but I dont know why the cronjob is not executing.
The OS I am using is Kali, I have manually executed the command that is supposed to be running in cronjob, manually it runs alright and gives notification on slack as well but it is not being executed by cron.