diego-treitos / linux-smart-enumeration

Linux enumeration tool for pentesting and CTFs with verbosity levels
GNU General Public License v3.0
3.45k stars 573 forks source link

Fixed RHEL distro detection #77

Closed exploide closed 1 year ago

exploide commented 1 year ago

There was a problem in lse_get_distro_codename. When /etc/os-release exists on a RHEL system, the ID=rhel was extracted out of that file and the /etc/redhat-release file was never checked in order to set grep -qi "red hat" /etc/redhat-release && distro=redhat.

That means, depending on whether /etc/os-release exists or not, RHEL was either detected as rhel or redhat. This PR fixes this by explicitly setting redhat when rhel was extracted.

I'm wondering whether it would be cleaner to do it the other way around and just use rhel as an identifier for RHEL systems within lse. But that would have required touching more portions of the code and especially all CVE checks. However, I could do that if you prefer that approach.

diego-treitos commented 1 year ago

Thank you for the improvement @exploide