Need expert in C++
Budget: $10 – $30 USD
Hi there,
I have script sending request " payload " to ip. i need the script to send the payload for 3 second then stop then restart sending for another 3 second.
" sleep , usleep " will not help
I have a friend create a python script to stop sending payload after 3 second and send it again and he used below,
def kill(proc_pid):
process = psutil.Process(proc_pid)
for proc in process.children(recursive=True):
proc.kill()
process.kill()
def payload():
try:
proc = subprocess.Popen(cmd, start_new_session=False)
proc.wait(timeout=3)
except subprocess.TimeoutExpired:
kill(proc.pid)
proc.communicate()
except KeyboardInterrupt:
proc.send_signal(signal.SIGINT)
runTime = 0
for y in range(10):
runTime += 3
for x in range(Thread):
futures = []
x = Process(target = payload)
x.start()
futures.append(x)
for i in futures:
i.join()
I have script sending request " payload " to ip. i need the script to send the payload for 3 second then stop then restart sending for another 3 second.
" sleep , usleep " will not help
I have a friend create a python script to stop sending payload after 3 second and send it again and he used below,
def kill(proc_pid):
process = psutil.Process(proc_pid)
for proc in process.children(recursive=True):
proc.kill()
process.kill()
def payload():
try:
proc = subprocess.Popen(cmd, start_new_session=False)
proc.wait(timeout=3)
except subprocess.TimeoutExpired:
kill(proc.pid)
proc.communicate()
except KeyboardInterrupt:
proc.send_signal(signal.SIGINT)
runTime = 0
for y in range(10):
runTime += 3
for x in range(Thread):
futures = []
x = Process(target = payload)
x.start()
futures.append(x)
for i in futures:
i.join()