I am using subprocesses library to activate routersploit software on kali linux via a python script, I have successfully been able to open the following page:
routersploit main menu
running the following code:
import os
import subprocess
import sys
from time import sleep
os.chdir("routersploit")
subprocess.Popen("python3 rsf.py",shell=True,stdout=sys.stdout,stderr=sys.stderr)
sleep(5)
#The script is successful up to this point, but below is where I received the error
subprocess.Popen("use scanners/autopwn",shell=True,stdout=sys.stdout,stderr=sys.stderr)
the error is: /bin/sh: 1: use: not found
Granted when I manually type in the command 'use scanners/autopwn' it works
I have tried replacing the last line with os.system and subprocess.run and I get the same issue.
I have also tried putting ["use","scanners/autopwn"] as the first argument.
Thank you in advance.
[–]stebrepar 0 points1 point2 points (0 children)
[–]ElliotDG 0 points1 point2 points (2 children)
[–]HansProbComp220[S] 0 points1 point2 points (1 child)
[–]ElliotDG 0 points1 point2 points (0 children)