Fix newlines in MAC Address field output (#178)
* fix newlines in all MAC Address field * remove newline * only cleanse if col exists
This commit is contained in:
@ -445,9 +445,10 @@ class vulnWhispererNessus(vulnWhispererBase):
|
|||||||
pd.read_csv(io.StringIO(file_req.decode('utf-8')))
|
pd.read_csv(io.StringIO(file_req.decode('utf-8')))
|
||||||
if len(clean_csv) > 2:
|
if len(clean_csv) > 2:
|
||||||
self.logger.info('Processing {}/{} for scan: {}'.format(scan_count, len(scan_list), scan_name.encode('utf8')))
|
self.logger.info('Processing {}/{} for scan: {}'.format(scan_count, len(scan_list), scan_name.encode('utf8')))
|
||||||
columns_to_cleanse = ['CVSS','CVE','Description','Synopsis','Solution','See Also','Plugin Output']
|
columns_to_cleanse = ['CVSS','CVE','Description','Synopsis','Solution','See Also','Plugin Output', 'MAC Address']
|
||||||
|
|
||||||
for col in columns_to_cleanse:
|
for col in columns_to_cleanse:
|
||||||
|
if col in clean_csv:
|
||||||
clean_csv[col] = clean_csv[col].astype(str).apply(self.cleanser)
|
clean_csv[col] = clean_csv[col].astype(str).apply(self.cleanser)
|
||||||
|
|
||||||
clean_csv.to_csv(relative_path_name, index=False)
|
clean_csv.to_csv(relative_path_name, index=False)
|
||||||
|
Reference in New Issue
Block a user