@@ -1174,8 +1174,15 @@ def cmd_nessus_db_import(*args)
1174
1174
file_id = export [ "file" ]
1175
1175
print_good ( "The export file ID for scan ID #{ scan_id } is #{ file_id } " )
1176
1176
print_status ( "Checking export status..." )
1177
- status = @n . scan_export_status ( scan_id , file_id )
1178
- if status == "ready"
1177
+ begin
1178
+ status = @n . scan_export_status ( scan_id , file_id )
1179
+ print_status ( "Export status: " + status [ "status" ] )
1180
+ if status [ "status" ] =="ready"
1181
+ break
1182
+ end
1183
+ sleep ( 1 )
1184
+ end while ( status [ "status" ] =="loading" )
1185
+ if status [ "status" ] == "ready"
1179
1186
print_status ( "The status of scan ID #{ scan_id } export is ready" )
1180
1187
select ( nil , nil , nil , 5 )
1181
1188
report = @n . report_download ( scan_id , file_id )
@@ -1449,9 +1456,16 @@ def cmd_nessus_scan_export(*args)
1449
1456
if export [ "file" ]
1450
1457
file_id = export [ "file" ]
1451
1458
print_good ( "The export file ID for scan ID #{ scan_id } is #{ file_id } " )
1452
- print_status ( "Checking export status..." )
1453
- status = @n . scan_export_status ( scan_id , file_id )
1454
- if status == "ready"
1459
+ print_status ( "Checking export status..." )
1460
+ begin
1461
+ status = @n . scan_export_status ( scan_id , file_id )
1462
+ print_status ( "Export status: " + status [ "status" ] )
1463
+ if status [ "status" ] =="ready"
1464
+ break
1465
+ end
1466
+ sleep ( 1 )
1467
+ end while ( status [ "status" ] =="loading" )
1468
+ if status [ "status" ] == "ready"
1455
1469
print_good ( "The status of scan ID #{ scan_id } export is ready" )
1456
1470
else
1457
1471
print_error ( "There was some problem in exporting the scan. The error message is #{ status } " )
@@ -1477,8 +1491,15 @@ def cmd_nessus_scan_export_status(*args)
1477
1491
when 2
1478
1492
scan_id = args [ 0 ]
1479
1493
file_id = args [ 1 ]
1480
- status = @n . scan_export_status ( scan_id , file_id )
1481
- if status == "ready"
1494
+ begin
1495
+ status = @n . scan_export_status ( scan_id , file_id )
1496
+ print_status ( "Export status: " + status [ "status" ] )
1497
+ if status [ "status" ] =="ready"
1498
+ break
1499
+ end
1500
+ sleep ( 1 )
1501
+ end while ( status [ "status" ] =="loading" )
1502
+ if status [ "status" ] == "ready"
1482
1503
print_status ( "The status of scan ID #{ scan_id } export is ready" )
1483
1504
else
1484
1505
print_error ( "There was some problem in exporting the scan. The error message is #{ status } " )
0 commit comments