From 6af5b55fef943b904b1d853d0c26db2be9f4c906 Mon Sep 17 00:00:00 2001 From: Rahul Date: Tue, 11 Oct 2022 11:44:34 +0530 Subject: [PATCH 1/3] Added Wifi Passwords Checker --- scripts/wifi_password_checker/README.md | 9 +++++ scripts/wifi_password_checker/script.py | 49 +++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 scripts/wifi_password_checker/README.md create mode 100644 scripts/wifi_password_checker/script.py diff --git a/scripts/wifi_password_checker/README.md b/scripts/wifi_password_checker/README.md new file mode 100644 index 0000000..aed5dd0 --- /dev/null +++ b/scripts/wifi_password_checker/README.md @@ -0,0 +1,9 @@ +# Wifi Passwords +This is a simple script that fetch all the saved passwords. + +## Improvements +Generating a QR code to easily connect mobile devices. + +## Usage +1. Clone the repo +2. Run python script.py \ No newline at end of file diff --git a/scripts/wifi_password_checker/script.py b/scripts/wifi_password_checker/script.py new file mode 100644 index 0000000..c02028f --- /dev/null +++ b/scripts/wifi_password_checker/script.py @@ -0,0 +1,49 @@ +import subprocess +import os +import platform + +pswd_txt = open(f"{os.getlogin()}-{platform.node()}", "w") + +data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8', errors="backslashreplace").split( + '\n') +profiles = [i.split(":")[1][1:-1] for i in data if "All User Profile" in i] + +pswd_txt.write(f'{"{:<30}| {:<}".format("WIFI", "Password")} \n') +pswd_txt.write(f'{"-" * 50} \n') + +print("{:<30}| {:<}".format('WIFI', 'Password')) +print("-" * 50) + +for i in profiles: + try: + + results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-8', + errors="backslashreplace").split( + '\n') + results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b] + + try: + + pswd_txt.write(f'{"{:<30}| {:<}".format(i, results[0])} \n') + pswd_txt.write(f'{"-" * 50} \n') + + print("{:<30}| {:<}".format(i, results[0])) + print("-" * 50) + + + except IndexError: + + pswd_txt.write(f'{"{:<30}| {:<}".format(i, "")} \n') + pswd_txt.write(f'{"-" * 50} \n') + print("{:<30}| {:<}".format(i, "")) + print("-" * 50) + + + except subprocess.CalledProcessError: + + pswd_txt.write(f'{"{:<30}| {:<}".format(i, "ENCODING ERROR")} \n') + pswd_txt.write(f'{"-" * 50} \n') + print("{:<30}| {:<}".format(i, "ENCODING ERROR")) + print("-" * 50) + +pswd_txt.close() \ No newline at end of file From cbacc1935cde0f520547bf3f14004c7e7a782a4d Mon Sep 17 00:00:00 2001 From: Rahul Date: Tue, 11 Oct 2022 11:46:05 +0530 Subject: [PATCH 2/3] Update README.md --- scripts/wifi_password_checker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wifi_password_checker/README.md b/scripts/wifi_password_checker/README.md index aed5dd0..cc5c706 100644 --- a/scripts/wifi_password_checker/README.md +++ b/scripts/wifi_password_checker/README.md @@ -1,5 +1,5 @@ # Wifi Passwords -This is a simple script that fetch all the saved passwords. +This is a simple script that fetches all the saved passwords. ## Improvements Generating a QR code to easily connect mobile devices. From e495af51c6d509be07ba1a26fb636ad274f055b0 Mon Sep 17 00:00:00 2001 From: Rahul Date: Tue, 11 Oct 2022 21:20:58 +0530 Subject: [PATCH 3/3] Add Fetching system information script --- scripts/fetching_system_information/README.md | 6 ++++++ scripts/fetching_system_information/script.py | 11 +++++++++++ 2 files changed, 17 insertions(+) create mode 100644 scripts/fetching_system_information/README.md create mode 100644 scripts/fetching_system_information/script.py diff --git a/scripts/fetching_system_information/README.md b/scripts/fetching_system_information/README.md new file mode 100644 index 0000000..094b4f0 --- /dev/null +++ b/scripts/fetching_system_information/README.md @@ -0,0 +1,6 @@ +# Fetching System Information +This is a simple script that fetches system information for your system.(Windows) + +## Usage +1. Clone the repo +2. Run python script.py \ No newline at end of file diff --git a/scripts/fetching_system_information/script.py b/scripts/fetching_system_information/script.py new file mode 100644 index 0000000..35cae6e --- /dev/null +++ b/scripts/fetching_system_information/script.py @@ -0,0 +1,11 @@ +import wmi + +c = wmi.WMI() +my_system = c.Win32_ComputerSystem()[0] + +print(f"Manufacturer: {my_system.Manufacturer}") +print(f"Model: {my_system. Model}") +print(f"Name: {my_system.Name}") +print(f"NumberOfProcessors: {my_system.NumberOfProcessors}") +print(f"SystemType: {my_system.SystemType}") +print(f"SystemFamily: {my_system.SystemFamily}")