Description of problem: I ran idstools-rulecat -o /etc/suricata/rules. Output: 2017-05-18 09:45:41,306 - <INFO> -- Found Suricata version 3.2.1 at /usr/sbin/suricata. 2017-05-18 09:45:41,306 - <INFO> -- Last download less than 15 minutes ago. Not downloading https://rules.emergingthreats.net/open/suricata-1.3-enhanced/emerging.rules.tar.gz. 2017-05-18 09:45:43,398 - <INFO> -- Loaded 24210 rules. 2017-05-18 09:45:43,406 - <INFO> -- Disabled 0 rules. 2017-05-18 09:45:43,406 - <INFO> -- Enabled 0 rules. 2017-05-18 09:45:43,406 - <INFO> -- Modified 0 rules. 2017-05-18 09:45:43,406 - <INFO> -- Dropped 0 rules. 2017-05-18 09:45:43,606 - <INFO> -- Enabled 111 rules for flowbit dependencies. 2017-05-18 09:45:43,607 - <INFO> -- Writing rule files to /etc/suricata/rules. Traceback (most recent call last): File "/usr/bin/idstools-rulecat", line 12, in <module> sys.exit(main()) File "/usr/lib/python3.5/site-packages/idstools/scripts/rulecat.py", line 804, in main write_to_directory(args.output, files, rulemap) File "/usr/lib/python3.5/site-packages/idstools/scripts/rulecat.py", line 369, in write_to_directory rule = idstools.rule.parse(line) File "/usr/lib/python3.5/site-packages/idstools/rule.py", line 208, in parse m = rule_pattern.match(buf) or decoder_rule_pattern.match(buf) TypeError: cannot use a string pattern on a bytes-like object Version-Release number of selected component: python3-idstools-0.6.0-1.fc25 Additional info: reporter: libreport-2.8.0 cmdline: /usr/bin/python3 -s /usr/bin/idstools-rulecat -o /etc/suricata/rules executable: /usr/bin/idstools-rulecat kernel: 4.10.15-200.fc25.x86_64 pkg_fingerprint: 4089 D8F2 FDB1 9C98 pkg_vendor: Fedora Project runlevel: N 5 type: Python3 uid: 0 Truncated backtrace: rule.py:208:parse:TypeError: cannot use a string pattern on a bytes-like object Traceback (most recent call last): File "/usr/bin/idstools-rulecat", line 12, in <module> sys.exit(main()) File "/usr/lib/python3.5/site-packages/idstools/scripts/rulecat.py", line 804, in main write_to_directory(args.output, files, rulemap) File "/usr/lib/python3.5/site-packages/idstools/scripts/rulecat.py", line 369, in write_to_directory rule = idstools.rule.parse(line) File "/usr/lib/python3.5/site-packages/idstools/rule.py", line 208, in parse m = rule_pattern.match(buf) or decoder_rule_pattern.match(buf) TypeError: cannot use a string pattern on a bytes-like object Local variables in innermost frame: buf: b'#\n' group: None
Created attachment 1279891 [details] File: backtrace
Created attachment 1279892 [details] File: environ
Reported at https://github.com/jasonish/py-idstools/issues/53 Use the workaround for now: sudo python2 `which idstools-rulecat` -o /etc/suricata/rules
python-idstools-0.6.1-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-1f3ec393b3
python-idstools-0.6.1-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-52970a3b1b
python-idstools-0.6.1-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-52970a3b1b
python-idstools-0.6.1-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-1f3ec393b3
python-idstools-0.6.1-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-da6d0d60f2
python-idstools-0.6.1-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-806b6d9940
python-idstools-0.6.1-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
python-idstools-0.6.1-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-806b6d9940
python-idstools-0.6.1-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-da6d0d60f2
python-idstools-0.6.1-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.
python-idstools-0.6.1-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.