Ingram icon indicating copy to clipboard operation
Ingram copied to clipboard

cant cancel paused job

Open surfer663 opened this issue 3 years ago • 28 comments

i ran Ingram but decided to stop the job with Ctrl C it then went into paused.... now i cant start another job how do i cancel the paused session and start a new session... am a newbie please forgive

surfer663 avatar Aug 13 '22 00:08 surfer663

Hi, if you want to run a new job, you must specific a new OUTPUT dir, since the programm will read the output dir and the previous output files will be loaded again.

jorhelp avatar Aug 13 '22 01:08 jorhelp

hi sir thank you for the help i appreciate it

surfer663 avatar Aug 13 '22 01:08 surfer663

helo sir can the old OUT_DIR be deleted cos when i try the option to delete or move to trash is not available

surfer663 avatar Aug 13 '22 16:08 surfer663

helo sir can the old OUT_DIR be deleted cos when i try the option to delete or move to trash is not available

Maybe you had ran masscan? masscan need root privilege, and the OUT_DIR cannot be deleted by normal user, sudo rm -rf OUT_DIR can work.

jorhelp avatar Aug 13 '22 16:08 jorhelp

thank u sir for always helping i used this ... ./run_ingram.py --in TARGET --out OUT_DIR --hik_weak --cve_2017_7921 --cve_2021_36260 --th_num 80

surfer663 avatar Aug 13 '22 16:08 surfer663

That's strange. I didn't expect where is the problem for the time being.😬😬

jorhelp avatar Aug 13 '22 17:08 jorhelp

when i use Ctrl c to cancel or stop then it is paused and can only resume cant start another project the paused.txt cannot be deleted so i created another folder renamed original OUT_DIR1 and created a new OUT_DIR cos cannot delete as long as paused.txt is there

surfer663 avatar Aug 13 '22 17:08 surfer663

could you pls paste the output of ls -l OUT_DIR

jorhelp avatar Aug 13 '22 17:08 jorhelp

$ ls -l OUT_DIR total 36 -rw-r--r-- 1 root root 5222 Aug 13 13:15 not_vulnerable.csv -rw-r--r-- 1 root root 4509 Aug 13 13:11 paused -rw-r--r-- 1 root root 580 Aug 13 08:31 results_all.csv -rw-r--r-- 1 root root 348 Aug 13 08:31 results_simple.csv drwxr-xr-x 2 root root 12288 Aug 13 08:31 snapshots

surfer663 avatar Aug 13 '22 17:08 surfer663

it seems the job can only be paused and can resume but cannot be stopped to start a new job

surfer663 avatar Aug 13 '22 17:08 surfer663

i noticed the output files are belong to root,maybe you ran the program by root or sudo,you should delete it by sudo rm -rf OUT_DIR if you are not root user

jorhelp avatar Aug 13 '22 17:08 jorhelp

this is how i ran it sudo python3 run_ingram.py --in statics/iplist/data/country/US.txt --out OUT_DIR --hik_weak --cve_2017_7921 --cve_2021_36260 --th_num 80 [sudo] password for kali:

surfer663 avatar Aug 13 '22 17:08 surfer663

better not ran it by root,since it not security.

jorhelp avatar Aug 13 '22 17:08 jorhelp

😀so the 'sudo' can be delete

jorhelp avatar Aug 13 '22 17:08 jorhelp

i did it now $ python3 run_ingram.py --in statics/iplist/data/country/US.txt --out OUT_DIR --hik_weak --cve_2017_7921 --cve_2021_36260 --th_num 80

this the error

Traceback (most recent call last): File "/home/kali/Desktop/Ingram/run_ingram.py", line 68, in run(args) File "/home/kali/Desktop/Ingram/run_ingram.py", line 59, in run else: scn = scanner.CameraScanner(args) File "/home/kali/Desktop/Ingram/scan/scanner.py", line 59, in init self._preprocess() File "/home/kali/Desktop/Ingram/scan/scanner.py", line 76, in _preprocess self.paused = open(os.path.join(self.args.out_path, PAUSE), 'r+') PermissionError: [Errno 13] Permission denied: 'OUT_DIR/paused' Exception ignored in: <function CameraScanner.del at 0x7f3c4a379ea0> Traceback (most recent call last): File "/home/kali/Desktop/Ingram/scan/scanner.py", line 91, in del if os.path.exists(os.path.join(self.args.out_path, PAUSE)): self.paused.close() AttributeError: 'CameraScanner' object has no attribute 'paused'

surfer663 avatar Aug 13 '22 17:08 surfer663

the privous OUT_DIR can be delete bysudo rm -rf, after that, when you runa new job, just run ./run_Ingram ...etc... and not add 'sudo', so the OUT_DIR can be direcly removed

jorhelp avatar Aug 13 '22 17:08 jorhelp

ok thank you sir i will try that

surfer663 avatar Aug 13 '22 17:08 surfer663

maybe you can specifc different out dir by your job, for example, if you scan Japan, you can let --out be japan, if you scan china, you can let --out be china.

jorhelp avatar Aug 13 '22 17:08 jorhelp

that a good idea sir i will try that as well...please can you tell me me how i can add my own ip and country list to the HIK_WEAK to scan and also to use the masscan option thank you

surfer663 avatar Aug 13 '22 17:08 surfer663

its 2:00 here, i will reply tomorrow, see you later😴😴

jorhelp avatar Aug 13 '22 17:08 jorhelp

no problem thank you sir

surfer663 avatar Aug 13 '22 17:08 surfer663

  • if you want to use masscan, you should install it by your self first, after that, run:
./run_ingram.py --in TARGET --out OUT_DIR --masscan --port 80,8000-8008 --rate 5000
./run_ingram.py --in OUT_DIR/masscan_res --out OUT_DIR --all --th_num 80
  • if you want to scan some ips, you should add it to the TARGET file, one ip one line; and the statics/iplist/data/country/ dir contain many country's ip, you can take any one of them as the TARGET, such as:
./run_ingram.py --in statics/iplist/data/country/JP.txt --out japan --all --th_num 80

jorhelp avatar Aug 14 '22 02:08 jorhelp

thank you sir i really appreciate the help i tried it and it works perfect.... mayb next ya can do something for the NVR and DVR for truvision and Alibi just a thought lol many thanks

surfer663 avatar Aug 14 '22 17:08 surfer663

hi sir i got usernames and passwords but when i use IE to login i cant view the cameras why is that or what to do to view

surfer663 avatar Aug 14 '22 18:08 surfer663

hi sir i got usernames and passwords but when i use IE to login i cant view the cameras why is that or what to do to view

dont worry sir i updated the camera plugin and it works now

surfer663 avatar Aug 14 '22 19:08 surfer663

hi sir can you tell me why im getting this error

[-] FAIL: could not determine default interface [hint] try "--interface ethX" Traceback (most recent call last): File "/home/kali/Desktop/Ingram/run_ingram.py", line 68, in run(args) File "/home/kali/Desktop/Ingram/run_ingram.py", line 60, in run scn() File "/home/kali/Desktop/Ingram/scan/scanner.py", line 45, in call self.parse(self.tmp) File "/home/kali/Desktop/Ingram/scan/scanner.py", line 32, in parse with open(tmp, 'r') as tf: FileNotFoundError: [Errno 2] No such file or directory: 'OUT_DIR/masscan_tmp'

surfer663 avatar Aug 16 '22 09:08 surfer663

i get every time PermissionError: [WinError 32]

WarRaZzer avatar Aug 16 '22 12:08 WarRaZzer

We will be releasing the latest version soon, which is less problematic

jorhelp avatar Aug 17 '22 02:08 jorhelp