}
}
- # Check if the enabled_sids array contains any sid's.
- if (@enabled_sids) {
- # Open enabled sid's file for writing.
- open(FILE, ">$enabled_sids_file") or die "Could not write to $enabled_sids_file. $!\n";
+ # Open enabled sid's file for writing.
+ open(FILE, ">$enabled_sids_file") or die "Could not write to $enabled_sids_file. $!\n";
- # Write header to file.
- print FILE "#Autogenerated file. Any custom changes will be overwritten!\n";
+ # Write header to file.
+ print FILE "#Autogenerated file. Any custom changes will be overwritten!\n";
+ # Check if the enabled_sids array contains any sid's.
+ if (@enabled_sids) {
# Loop through the array of enabled sids and write them to the file.
foreach my $sid (@enabled_sids) {
- print FILE "enable_sid $sid\n";
+ print FILE "enablesid $sid\n";
}
-
- # Close file after writing.
- close(FILE);
}
- # Check if the enabled_sids array contains any sid's.
- if (@disabled_sids) {
- # Open disabled sid's file for writing.
- open(FILE, ">$disabled_sids_file") or die "Could not write to $disabled_sids_file. $!\n";
+ # Close file after writing.
+ close(FILE);
- # Write header to file.
- print FILE "#Autogenerated file. Any custom changes will be overwritten!\n";
+ # Open disabled sid's file for writing.
+ open(FILE, ">$disabled_sids_file") or die "Could not write to $disabled_sids_file. $!\n";
- # Loop through the array of disabled sids and write them to the file.
- foreach my $sid (@disabled_sids) {
- print FILE "disable_sid $sid\n";
- }
+ # Write header to file.
+ print FILE "#Autogenerated file. Any custom changes will be overwritten!\n";
- # Close file after writing.
- close(FILE);
- }
+ # Check if the enabled_sids array contains any sid's.
+ if (@disabled_sids) {
+ # Loop through the array of disabled sids and write them to the file.
+ foreach my $sid (@disabled_sids) {
+ print FILE "disablesid $sid\n";
+ }
+ }
+
+ # Close file after writing.
+ close(FILE);
# Open file for used rulefiles.
- open (FILE, ">$snortusedrulefilesfile") or die "Could not wirte to $snortusedrulefilesfile. $!\n";
+ open (FILE, ">$snortusedrulefilesfile") or die "Could not write to $snortusedrulefilesfile. $!\n";
# Write header to file.
print FILE "#Autogenerated file. Any custom changes will be overwritten!\n";