<commit_before>
try:
	import datetime
	from lib.core.config_parser import ConfigParser
	from lib.active.corescanner import CoreScanner
except ImportError, err:
	from lib.core.core import Core
	Core.print_error(err)


class ScriptScan(CoreScanner):

    	def __init__(self, config_file, output_dir, ip_file_to_scan, nmap_optimize, scan_type):

		self._ip_file_to_scan = ip_file_to_scan
		self._scan_options = ConfigParser.get_scripts_options(config_file)

		output_file = "{0}{1}-{2}".format(output_dir, scan_type, datetime.datetime.now().strftime("%Y%m%d%H%M"))

		CoreScanner.__init__(self, self._ip_file_to_scan.name, output_file, nmap_optimize, scan_type)
<commit_msg>Update scriptscan.py<commit_after>
try:
	import datetime
	from lib.active.corescanner import CoreScanner
	from lib.core.config_parser import ConfigParser
	from lib.core.exceptions import FlashLightExceptions	
except ImportError, err:
	from lib.core.core import Core
	Core.print_error(err)


class ScriptScan(CoreScanner):

    	def __init__(self, config_file, output_dir, ip_file_to_scan, nmap_optimize, scan_type):

		self._ip_file_to_scan = ip_file_to_scan
		try:
			self._scan_options = ConfigParser.get_scripts_options(config_file)
		except Exception, err:
			raise FlashLightExceptions(err)		

		output_file = "{0}{1}-{2}".format(output_dir, scan_type, datetime.datetime.now().strftime("%Y%m%d%H%M"))

		CoreScanner.__init__(self, self._ip_file_to_scan.name, output_file, nmap_optimize, scan_type)

{'fraction_non_alphanumeric': 0.10176390773405698, 'fraction_numerical': 0.004070556309362279, 'mean_word_length': 6.338308457711443, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3066758', 'n_tokens_mistral': 538, 'n_tokens_neox': 511, 'n_words': 95}