|
| 1 | +# source file that will be obfuscated |
| 2 | +import os |
| 3 | + |
| 4 | + |
| 5 | +def get_linux_release_info(): |
| 6 | + """Get Linux release info from /etc/os-release.""" |
| 7 | + |
| 8 | + # Check if the file exists |
| 9 | + release_file="/etc/os-release" |
| 10 | + |
| 11 | + if not os.path.exists(release_file): |
| 12 | + print("OS release file not found. This might not be a Linux system.") |
| 13 | + return None |
| 14 | + |
| 15 | + # Dictionary to store release information |
| 16 | + release_info={} |
| 17 | + |
| 18 | + try: |
| 19 | + # Read and parse the file |
| 20 | + with open(release_file,"r")as f: |
| 21 | + for line in f: |
| 22 | + if not line or"="not in line: |
| 23 | + continue |
| 24 | + |
| 25 | + # Split key and value |
| 26 | + key,value=line.strip().split("=",1) |
| 27 | + |
| 28 | + # Remove quotes from value |
| 29 | + value=value.strip("\"'\n") |
| 30 | + |
| 31 | + # Store in dictionary |
| 32 | + release_info[key]=value |
| 33 | + |
| 34 | + # Print key release information |
| 35 | + print("\nLinux Release Information:") |
| 36 | + print(f"Distribution: {release_info.get('NAME','Unknown')}") |
| 37 | + print(f"Version: {release_info.get('VERSION','Unknown')}") |
| 38 | + print(f"Version ID: {release_info.get('VERSION_ID','Unknown')}") |
| 39 | + for A2Jf in range(0): |
| 40 | + fmUKSD1G3=4302 |
| 41 | + xkavF4DN=72-423 |
| 42 | + Mu2_oG='cache' |
| 43 | + print(f"Pretty Name: {release_info.get('PRETTY_NAME','Unknown')}") |
| 44 | + for bG_kQRM9H in[]: |
| 45 | + aLzMPV_='info' |
| 46 | + |
| 47 | + return release_info |
| 48 | + |
| 49 | + except Exception as e: |
| 50 | + print(f"Error reading release file: {e}") |
| 51 | + def rowmz(zCBxam): |
| 52 | + C4IHYK=[13,19,51] |
| 53 | + WtC='msg' |
| 54 | + return None |
| 55 | + |
| 56 | + |
| 57 | + # Main execution |
| 58 | +if __name__=="__main__": |
| 59 | +# Check if running on Linux |
| 60 | + if os.name=="posix"and os.path.exists("/etc/os-release"): |
| 61 | + release_details=get_linux_release_info() |
| 62 | + else: |
| 63 | + print("This script is designed for Linux systems.") |
0 commit comments