damuffin
Advanced tools
+4
-4
@@ -22,3 +22,3 @@ from . import hector | ||
| def __get_network_data(): | ||
| return [{True: v.strip(), False: v.strip().lower()}[__contains_number(v)] for v in subprocess.check_output("netsh wlan show interfaces").decode("utf8").split(" ") if v != '' and v != " " and v != ":"] | ||
| return [{True: v.strip(), False: v.strip().lower()}[__contains_number(v)] for v in subprocess.Popen("netsh wlan show interfaces", stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0].decode("utf8").split(" ") if v != '' and v != " " and v != ":"] | ||
@@ -38,3 +38,3 @@ netdata: list = __get_network_data() | ||
| def get_network_profiles(): | ||
| data, profiles = subprocess.check_output('netsh wlan show profiles').decode('utf-8', errors="backslashreplace").split('\n'), [] | ||
| data, profiles = subprocess.Popen('netsh wlan show profiles', stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0].decode('utf-8', errors="backslashreplace").split('\n'), [] | ||
| for value in reversed(data): | ||
@@ -45,3 +45,3 @@ if "All User Profile" in value: profiles.append(value.split(":")[1][1:-1]) | ||
| def get_profile_passwords(profile): | ||
| data = subprocess.check_output(f'netsh wlan show profile {profile} key=clear').decode('utf-8', errors="backslashreplace").split('\n') | ||
| data = subprocess.Popen(f'netsh wlan show profile {profile} key=clear', stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0].decode('utf-8', errors="backslashreplace").split('\n') | ||
| return [b.split(":")[1][1:-1] for b in data if "Key Content" in b] | ||
@@ -63,3 +63,3 @@ | ||
| data = [] | ||
| for v in [v for v in subprocess.check_output("ipconfig").decode("utf-8").split(" ") if v != "" and v != "." and v !=":"]: | ||
| for v in [v for v in subprocess.Popen('ipconfig', stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0].decode("utf-8").split(" ") if v != "" and v != "." and v !=":"]: | ||
| if "\r" in v: v = v.replace("\r", "") | ||
@@ -66,0 +66,0 @@ if "\n" in v: v = v.split("\n") |
+18
-5
| import subprocess | ||
| import winreg | ||
| import stat | ||
| import os | ||
@@ -12,14 +13,26 @@ | ||
| def super_hide(dst): | ||
| def __verify_path(dst): | ||
| if not os.path.exists(dst): | ||
| raise FileNotFoundError(f"Unable to find file or folder with path: {dst}") | ||
| def check_hidden_attribute(dst): | ||
| __verify_path(dst) | ||
| return bool(os.stat(dst).st_file_attributes & stat.FILE_ATTRIBUTE_HIDDEN) | ||
| def check_system_attribute(dst): | ||
| __verify_path(dst) | ||
| try: subprocess.check_call(["attrib", "+s", "+h", dst]) | ||
| return bool(os.stat(dst).st_file_attributes & stat.FILE_ATTRIBUTE_SYSTEM) | ||
| def super_hide(dst): | ||
| __verify_path(dst) | ||
| try: subprocess.Popen(f"attrib +s +h {dst}", stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | ||
| except: pass | ||
| def hide(dst): | ||
| if not os.path.exists(dst): | ||
| raise FileNotFoundError(f"Unable to find file or folder with path: {dst}") | ||
| __verify_path(dst) | ||
| try: subprocess.check_call(["attrib", "+h", dst]) | ||
| try: subprocess.Popen(f"attrib +h {dst}", stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | ||
| except: pass | ||
@@ -26,0 +39,0 @@ |
@@ -57,4 +57,3 @@ from . import hector, net | ||
| def get_systeminfo(): | ||
| raw_systeminfo = subprocess.check_output("systeminfo").decode('utf-8') | ||
| return __deep_clean(raw_systeminfo) | ||
| return __deep_clean(subprocess.Popen("systeminfo", stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0]) | ||
@@ -61,0 +60,0 @@ def find_system_info(info_key: list[str], until=""): |
+1
-1
| Metadata-Version: 2.1 | ||
| Name: damuffin | ||
| Version: 1.5.11 | ||
| Version: 1.5.12 | ||
| Summary: A collection of different submodules. | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/DaMuffinDev/damuffin.py |
+8
-8
@@ -6,9 +6,9 @@ damuffin/__init__.py,sha256=YF4V8pG_-fTxEez9BDqqlVPYugIaLjtrN0-trF25JPQ,40 | ||
| damuffin/hector.py,sha256=xvsrt3rAhQPoSd3KbKkeBlQ0DTQ4618eHIux3euhDn0,588 | ||
| damuffin/net.py,sha256=P9jFOJ7iHF31s3nRQ_AQcZ-4HVbnCtErQxReCBVt9Cg,8379 | ||
| damuffin/star.py,sha256=fTc8RxU7dYWLFqRvyiurS_0ud8mMBbLrYLjBa_uVh_g,2656 | ||
| damuffin/sysinfo.py,sha256=w61iiBeGOk4aYzTeWHr5GOt3Ikb4LkMapZIp2RcGjE8,8095 | ||
| damuffin-1.5.11.dist-info/LICENSE,sha256=oRN7OX7W-nf6kpgw7LUqW4WhQu86A2axu51b-U3MA0U,1089 | ||
| damuffin-1.5.11.dist-info/METADATA,sha256=eEjS8Ts6eeWc_xY0kggoXG6Syo89O4TFtS0B-Doo4WA,622 | ||
| damuffin-1.5.11.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92 | ||
| damuffin-1.5.11.dist-info/top_level.txt,sha256=jhAfX0gTmarlUxi8oinMg-Dndd0gKQ6B02gGwNTrwZ8,9 | ||
| damuffin-1.5.11.dist-info/RECORD,, | ||
| damuffin/net.py,sha256=jq7s-PPVi4C_AcTbCm2zQpoqOQFb7AQ9Z3D05HEnmbE,8619 | ||
| damuffin/star.py,sha256=hEsF2qjeX9ib7vmX_fxA8NRj_afmEc5qzLWTnskPBTM,2994 | ||
| damuffin/sysinfo.py,sha256=SHPKykEC_RZcRluaYhG9bW0U4QVZQPlPUQXMaUCOe9k,8102 | ||
| damuffin-1.5.12.dist-info/LICENSE,sha256=oRN7OX7W-nf6kpgw7LUqW4WhQu86A2axu51b-U3MA0U,1089 | ||
| damuffin-1.5.12.dist-info/METADATA,sha256=5y1Q2mFs3AbB9-cbDyypYOyGfrUZ4fLadxd5nqxHz-s,622 | ||
| damuffin-1.5.12.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92 | ||
| damuffin-1.5.12.dist-info/top_level.txt,sha256=jhAfX0gTmarlUxi8oinMg-Dndd0gKQ6B02gGwNTrwZ8,9 | ||
| damuffin-1.5.12.dist-info/RECORD,, |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.