<s> from libnmap . process import NmapProcess <EOL> from time import sleep <EOL> nmap_proc = NmapProcess ( targets = "<STR_LIT>" , options = "<STR_LIT>" ) <EOL> nmap_proc . run_background ( ) <EOL> while nmap_proc . is_running ( ) : <EOL> nmaptask = nmap_proc . current_task <EOL> if nmaptask : <EOL> print ( "<STR_LIT>" . format ( nmaptask . name , <EOL> nmaptask . status , <EOL> nmaptask . etc , <EOL> nmaptask . progress ) ) <EOL> sleep ( <NUM_LIT:0.5> ) <EOL> print ( "<STR_LIT>" . format ( nmap_proc . rc , nmap_proc . summary ) ) <EOL> print ( nmap_proc . stdout ) </s>
