Skip to content

Commit

Permalink
Merge pull request #1 from kefaslungu/production
Browse files Browse the repository at this point in the history
completely changed the ui of the program, no longer just giving info on the system, a lot can now be done.
  • Loading branch information
kefaslungu authored Apr 21, 2023
2 parents 307a77d + 6eed338 commit b6988cb
Show file tree
Hide file tree
Showing 24 changed files with 649 additions and 84 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
exe_compiler/
*.txt
Windows Shortcuts/
5 changes: 4 additions & 1 deletion pc_info/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
bios,
cpu,
disks,
graphics,
memory_converter,
motherboard ,
network_info,
ram,
sound,
startup
startup,
tools
)
Binary file added pc_info/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file added pc_info/__pycache__/basic_info.cpython-310.pyc
Binary file not shown.
Binary file added pc_info/__pycache__/battery.cpython-310.pyc
Binary file not shown.
Binary file added pc_info/__pycache__/bios.cpython-310.pyc
Binary file not shown.
Binary file added pc_info/__pycache__/cpu.cpython-310.pyc
Binary file not shown.
Binary file added pc_info/__pycache__/disks.cpython-310.pyc
Binary file not shown.
Binary file added pc_info/__pycache__/graphics.cpython-310.pyc
Binary file not shown.
Binary file added pc_info/__pycache__/memory_converter.cpython-310.pyc
Binary file not shown.
Binary file added pc_info/__pycache__/motherboard.cpython-310.pyc
Binary file not shown.
Binary file added pc_info/__pycache__/network_info.cpython-310.pyc
Binary file not shown.
Binary file added pc_info/__pycache__/ram.cpython-310.pyc
Binary file not shown.
Binary file added pc_info/__pycache__/sound.cpython-310.pyc
Binary file not shown.
Binary file added pc_info/__pycache__/startup.cpython-310.pyc
Binary file not shown.
Binary file added pc_info/__pycache__/tools.cpython-310.pyc
Binary file not shown.
38 changes: 19 additions & 19 deletions pc_info/basic_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
import wmi

def basicInfo():
"""Provides all the necessary basic information about your operating system, and your hard ware."""
"""Provides all the necessary basic information about your operating system, and your hardware."""
c = wmi.WMI()
for win in c.Win32_OperatingSystem():
os_info = (f"OS name: {win.Caption}.\n"
f"OS Manufacturer: {win.Manufacturer}.\n"
f"Version: {win.Version}.\n"
f"Build number: {win.BuildNumber}.\n"
f"Windows Serial number: {win.SerialNumber}.\n")

for computer in c.Win32_ComputerSystem():
pc_info = (f"Computer name: {computer.Name}.\n"
f"PC manufacturer: {computer.Manufacturer}.\n"
f"System model: {computer.Model}.\n"
f"System type: {computer.SystemType}.\n"
f"System family: {computer.SystemFamily}.\n"
f"System SKU: {computer.SystemSKUNumber}.\n"
f"Owner: {computer.PrimaryOwnerName}.\n"
f"DNSHostName: {computer.DNSHostName}.\n"
f"A Hypervisor is present: {computer.HypervisorPresent}.\n")
about_windows =f"{os_info}{pc_info}"
return about_windows
os_info = ["OS name: {}\n"
"OS Manufacturer: {}\n"
"Version: {}\n"
"Build number: {}\n"
"Windows Serial number: {}\n".format(win.Caption, win.Manufacturer, win.Version, win.BuildNumber, win.SerialNumber) for win in c.Win32_OperatingSystem()]

pc_info = ["Computer name: {}\n"
"PC manufacturer: {}\n"
"System model: {}\n"
"System type: {}\n"
"System family: {}\n"
"System SKU: {}\n"
"Owner: {}\n"
"DNSHostName: {}\n"
"A Hypervisor is present: {}\n".format(computer.Name, computer.Manufacturer, computer.Model, computer.SystemType, computer.SystemFamily, computer.SystemSKUNumber, computer.PrimaryOwnerName, computer.DNSHostName, computer.HypervisorPresent) for computer in c.Win32_ComputerSystem()]

about_windows = "\n".join(os_info) + "\n" + "\n".join(pc_info)

return about_windows
49 changes: 34 additions & 15 deletions pc_info/bios.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,43 @@
# This file is covered by the GNU General Public License.
# Copyright (C) 2023 kefaslungu

import io
import subprocess
import wmi

def bios():
"""Provides information about your bios."""
bios_mode = subprocess.getoutput(["powershell","$env:firmware_type"])
"""Provides information about your BIOS."""
bios_mode = subprocess.getoutput(["powershell", "$env:firmware_type"])
bios_info_list = [
"Bios information:",
"Manufacturer: {}",
"Bios Mode: {}".format(bios_mode),
"SMBIOS Version: {}",
"Version: {}",
"Embedded Controller Major Version: {}",
"Embedded Controller Minor Version: {}",
"Current language: {}",
"Installable Languages: {}",
"List of Languages: {}",
"Serial Number: {}",
"Status: Bios is {}"
]
bios_info_str_io = io.StringIO()
c = wmi.WMI()
for bios in c.Win32_BIOS():
bios_info = (f"Bios information:\n"
f"Manufacturer: {bios.Manufacturer}\n"
f"Bios Mode: {bios_mode}\n"
f"SMBIOS Version: {bios.SMBIOSBIOSVersion}\n"
f"Version: {bios.Version}\n"
f"Embedded Controller Major Version: {bios.EmbeddedControllerMajorVersion}\n"
f"Embedded Controller Minor Version: {bios.EmbeddedControllerMinorVersion}\n"
f"Current language: {bios.CurrentLanguage}\n"
f"Installable Languages: {bios.InstallableLanguages}\n"
f"List of Languages: {bios.ListOfLanguages}\n"
f"Serial Number: {bios.SerialNumber}\n"
f"Status: Bios is {bios.Status}\n")
return bios_info
bios_info_str_io.write('\n'.join(bios_info_list).format(
bios.Manufacturer,
bios.SMBIOSBIOSVersion,
bios.Version,
bios.EmbeddedControllerMajorVersion,
bios.EmbeddedControllerMinorVersion,
bios.CurrentLanguage,
bios.InstallableLanguages,
bios.ListOfLanguages,
bios.SerialNumber,
bios.Status
))
bios_info_str_io.write('\n')
bios_info_str = bios_info_str_io.getvalue()
bios_info_str_io.close()
return bios_info_str
42 changes: 42 additions & 0 deletions pc_info/graphics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# graphics.py
# A part of System inspect
# This file is covered by the GNU General Public License.
# Copyright (C) 2023 kefaslungu
import wmi

def graphicsInfo():
properties_list = []
for controller in wmi.WMI().Win32_VideoController():
properties = (
"Caption: {}".format(controller.Caption),
"Driver version: {}".format(controller.DriverVersion),
"Driver date: {}".format(controller.DriverDate),
"AdapterCompatibility: {}".format(controller.AdapterCompatibility),
"AdapterDACType: {}".format(controller.AdapterDACType),
"AdapterRAM: {}".format(controller.AdapterRAM),
"Availability: {}".format(controller.Availability),
"CurrentBitsPerPixel: {}".format(controller.CurrentBitsPerPixel),
"CurrentHorizontalResolution: {}".format(controller.CurrentHorizontalResolution),
"CurrentNumberOfColors: {}".format(controller.CurrentNumberOfColors),
"CurrentNumberOfColumns: {}".format(controller.CurrentNumberOfColumns),
"CurrentNumberOfRows: {}".format(controller.CurrentNumberOfRows),
"CurrentRefreshRate: {}".format(controller.CurrentRefreshRate),
"CurrentScanMode: {}".format(controller.CurrentScanMode),
"CurrentVerticalResolution: {}".format(controller.CurrentVerticalResolution),
"DitherType: {}".format(controller.DitherType),
"MaxRefreshRate: {}".format(controller.MaxRefreshRate),
"MinRefreshRate: {}".format(controller.MinRefreshRate),
"Monochrome: {}".format(controller.Monochrome),
"Name: {}".format(controller.Name),
"PNPDeviceID: {}".format(controller.PNPDeviceID),
"SystemName: {}".format(controller.SystemName),
"VideoArchitecture: {}".format(controller.VideoArchitecture),
"VideoMemoryType: {}".format(controller.VideoMemoryType),
"VideoModeDescription: {}".format(controller.VideoModeDescription),
"VideoProcessor: {}".format(controller.VideoProcessor),
"Status: {}".format(controller.Status),
)
properties_list.extend(properties)
return '\n'.join(properties_list)

#graphicsInfo()
22 changes: 22 additions & 0 deletions pc_info/network_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# network_info.py
# A part of System inspect
# This file is covered by the GNU General Public License.
# Copyright (C) 2023 kefaslungu

import io
import wmi

def networkCards():
"""Provides information about network adapters and their IP configurations."""
c = wmi.WMI()
nic_info = io.StringIO()
for nic in c.Win32_NetworkAdapterConfiguration(IPEnabled=True):
nic_info.write(f"Name: {nic.Description}\n")
if nic.MACAddress:
nic_info.write(f"MAC Address: {nic.MACAddress}\n")
nic_info.write(f"IP Address(es): {', '.join(nic.IPAddress.split() if isinstance(nic.IPAddress, str) else list(nic.IPAddress))}\n")
nic_info.write(f"Subnet Mask(s): {', '.join(nic.IPSubnet.split() if isinstance(nic.IPSubnet, str) else list(nic.IPSubnet))}\n")
nic_info.write(f"Default Gateway(s): {', '.join(nic.DefaultIPGateway.split() if isinstance(nic.DefaultIPGateway, str) else list(nic.DefaultIPGateway))}\n")
nic_info.write(f"DNS server(s): {', '.join(list(nic.DNSServerSearchOrder))}\n")
nic_info.write("\n")
return nic_info.getvalue()
66 changes: 66 additions & 0 deletions pc_info/tools.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
from subprocess import run
from threading import Thread as t

def driverVerifier(event):
t1 = t(target=run, args=("verifier",))
t1.start()

def taskManager(event):
t1 = t(target=run, args=("taskmgr",))
t1.start()

def resourceMonitor(event):
t1 = t(target=run, args=("resmon",))
t1.start()

def eventViewer(event):
t1 = t(target=run, args=("eventvwr.msc",))
t1.start()

def systemConfiguration(event):
t1 = t(target=run, args=("msconfig",))
t1.start()

def diskCleanup(event):
t1 = t(target=run, args=("cleanmgr",))
t1.start()

def diskDefragmenter(event):
t1 = t(target=run, args=("v",))
t1.start()

def windowsMemoryDiagnostic(event):
t1 = t(target=run, args=("mdsched",))
t1.start()

def system_scan(event):
t1 = t(target=run, args=("sfc /scannow",))
t1.start()

def directXDiagnosticTool(event):
t1 = t(target=run, args=("dxdiag",))
t1.start()

def uninstaller(event):
t1 = t(target=run, args=("arpwiz.cpl"))
t1.start()

def maliciousRemoval(event):
t1 = t(target=run, args=("mrt",))#Microsoft Windows Malicious Software Removal Tool
t1.start()

def advanceFireWall(event):
t1 = t(target=run, args=("wf.msc",))
t1.start()

def sysReset(event):
t1 = t(target=run, args=("systemreset",))
t1.start()

def fireWall(event):
t1 = t(target=run, args=("firewall.cpl",))
t1.start()

def msinfo(self, event):
t1 = t(target=run, args=("msinfo32",))
t1.start()
55 changes: 51 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,53 @@
# SystemInspect
by [Kefas Lungu.](https://github.com/kefaslungu)

SystemInspect is a program written in python, and a bit of powershell that provides information about a computer system. The program utilizes several functions to retrieve information about the computer's BIOS, CPU, hard disks, motherboard, and RAM. This information is presented in a notebook interface with a tab for each category.
SystemInspect is a program that provides detailed information on several hardware and software on your system. It also gives you the ability to configure user and password settings, allows you to manage several builtin windows tools from the app.
This information is presented in a notebook interface with a tab for each category.

The goal of SystemInspect is to provide users with an easy way to view important information about their computer system. The program is designed to be user-friendly and accessible to users of all technical backgrounds.
## System information:
information about a computer system. The program utilizes several functions to retrieve information on the following:
* Basic information such as operating system information, and hardware manifacturer.
* Detailed information on systems battery.
* computer's BIOS
* CPU
* Graphics cards information.
* Hard disks and USB devices connected to the machine.
* motherboard
* Network cards.
* RAM.
* Sound cards.
* Startup items.

When a button for the respective item is clicked, a dialog box is displayed with the information, and an uption to copy it to the clipboard.

## User and password management.
This Tab allows you to manage several settings that has to do with user accounts.
* Create a new user: When this button is clicked, it opens a dialog box for you to type in the new user name, and an uptional password. There are 3 fields in total:
* User name: the name of the new user.
* Password: an optional password for the new user account to be created.
* Conferm password: Retype the password to make sure all is going well.
When all fields are inputed, click on the okay button and you should get a success or an error message telling you the state of your operation. Same goes for most settings in this catigory, I will only mension when it is not needed.
* Change or create password rules: The settings allow you to change the following:
* Input the maximum password age in days.
* Input the minimum length of a password.
* Input the minimum passwordd age in days.
* Input the number of unique password.
Note: all values must be integers. To learn more on password rules: checkout [This guide by ultimate windows security](https://www.ultimatewindowssecurity.com/wiki/page.aspx?spid=PasswordPolicy)
* Create password complexity: There are only 2 options here: you can only turn it on or off. [learn more](https://www.ultimatewindowssecurity.com/wiki/page.aspx?spid=PasswordComplexityRequirements)
* Enable your builtin administrator account: If you don't know what it is, [Read about it here](https://www.techtarget.com/searchwindowsserver/definition/built-in-administrator-account)
* Disabling the administrator account.
* Change the password for the current user: This settings allows you to create a new password, or change the password of the current login user.

## Builtin windows diagnostic tools:
This catigory is straight forword. It provides a quicker way to call some builtin tools that comes with windows. Most of these tools are there for you to fix an issue with windows, or security related tools. They are:
* Basic system scan: Uses the builtin sfc utility to check for issues.
* Disk cleanup: remove junks from your computer.
* Disk defragmenter: defrag your hard drive, not necessary for an SSD drive.
* DirectX: a set of components in Windows that allows software, primarily and especially games, to work directly with your video and audio hardware.
* Windows driver verifier: monitors Windows kernel-mode drivers and graphics drivers to detect illegal function calls.
* Others include: Event viewer, Resource monitor, windows system config, Task manager, Windows Memory Diagnostics, Uninstall a program, Windows malicious removal tool, Windows firewall, Windows advanced firewall, and an option to reset this PC

The goal of SystemInspect is to provide users with an easy way to view important information about their computer system, To change settings that are a bit difficult to change, and put repair tools in one place for easy access. The program is designed to be user-friendly and accessible to users of all technical backgrounds.

more functionality will be added in future releases.
## Requirements.
Expand All @@ -14,12 +58,15 @@ To run SystemInspect, you must have Python 3 and the following libraries install
* wxPython: the graphical user interface used in the whole of the program.
* wmi: this is used to access the windows management instrumentation.
* psutil: [process and system utilities]. This module is used in several places.
* pyperclip: Used for copying the system information.

You can install all these modules by using pip.
Subprocess, threading and the os modules are builtin with python, no need to install them from pip.

you can install all these modules by using pip.
## Usage:
To run SystemInspect after all these modules are installed, simply execute the `systeminspect.py` file.

The program will open a notebook interface with tabs for each category of information. Click on each tab to view the corresponding information.
The program will open a notebook interface with tabs for each category of settings. Click on each tab to view the corresponding options.

Please note that the information presented by SystemInspect may not be entirely accurate or up-to-date. Use this program at your own risk.
## Contributing:
Expand Down
45 changes: 0 additions & 45 deletions systeminspectV0.1.1.py

This file was deleted.

Loading

0 comments on commit b6988cb

Please sign in to comment.