Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kerbal Space Program but for Trust and Saftey #4

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

Jimmy-Jimmy-Jimmy
Copy link

Kerbal Space Program but for testing Trust and Safety

!
Screenshot 2023-02-10 224002
Screenshot 2023-02-10 224110
Screenshot 2023-02-10 224110bu
Screenshot 2023-02-09 212206

python GUI buttons
# # # CODE * * *
import paramiko

def transfer_file(filename, host, username, password):
    ssh = paramiko.SSHClient()
    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    ssh.connect(hostname=host, username=username, password=password)

    sftp = ssh.open_sftp()
    sftp.put(filename, '/home/msfadmin/payload.py')
    sftp.close()
    ssh.close()

filename = '/home/kali/Attackem/payload.py'
host = '10.0.0.79'
username = 'msfadmin'
password = 'msfadmin'

transfer_file(filename, host, username, password)
Mind of a Hacker

Loophole 
Loop Hole
fan1_input: No such file
Just like how a ship in the days of sail could be blown off course by unpredictable weather conditions, a student's final project for a computer class could be delayed or impacted by factors such as power outages, software crashes, or other unexpected events.

I also wanted to discuss the Originalist's case for mystery in computer hardware, which can contribute to the unpredictability of technology and make it difficult for students to complete their projects on time.
@Jimmy-Jimmy-Jimmy
Copy link
Author

Screenshot 2023-02-09 211500

import os
import subprocess

# The path to the pwmconfig utility
PWM_CONFIG = '/usr/sbin/pwmconfig'

# Set the fan speed to a given percentage
def set_fan_speed(percentage):
    # Convert the percentage to a value between 0 and 255
    value = int(255 * (percentage / 100))
    # Use the pwmconfig utility to set the fan speed
    result = subprocess.run([PWM_CONFIG, '--set', str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    # Check the result of the pwmconfig command
    if result.returncode != 0:
        print("Error: Failed to set fan speed")
        print("Stdout:", result.stdout.decode())
        print("Stderr:", result.stderr.decode())
    else:
        print("Success: Set fan speed to", percentage, "%")

# Example usage: set the fan speed to 50%
set_fan_speed(50)
(kali㉿kali)-[~/Desktop]
└─$ python tinkerEM.py
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/kali/Desktop/tinkerEM.py", line 8, in on_scale_change
    set_fan_speed(value)
  File "/home/kali/Desktop/tinkerEM.py", line 5, in set_fan_speed
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/pwmconfig'
import tkinter as tk
import subprocess

def set_fan_speed(value):
    result = subprocess.run(["/usr/sbin/pwmconfig", "--set", str(value)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)

def on_scale_change(value):
    set_fan_speed(value)

root = tk.Tk()
scale = tk.Scale(root, from_=0, to=100, orient=tk.HORIZONTAL, command=on_scale_change)
scale.pack()

root.mainloop()
GAME OVER
This is my final project for lawfareblog/hacking-cybersecurity class.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant