#!/bin/bash
P=$(pgrep -f 'masscan -p9191' | head -1)
if [ -z "$P" ]; then echo "masscan not found"; exit 1; fi
echo "pid=$P"
kill -STOP "$P"
sleep 1
ps -o pid,stat,etime,cmd -p "$P" | tail -1
echo "$P" > /root/recon/masscan.pid
