voidfill / otherbot

selfbot plugin for powercord
MIT License
3 stars 1 forks source link

plz delete dis #6

Closed otiopo closed 2 years ago

otiopo commented 3 years ago

this is so garbage

kernel-dev commented 3 years ago

Your projects seem far more worthy of being called garbage.

For example, here.

if len(sys.argv) > 2:
  if len(sys.argv) > 4:
    if sys.argv[3] == ">":
      with open("Drives/" + etc.getDir() + "/" + sys.argv[4], "w") as file:
        file.write(sys.argv[2])
        file.close()
  else:
    print(sys.argv[2])

Why are you nesting if statements so much? This can be shortened down to a singular if statement, with an elif. Also, have you not heard of str.format()? That's been a thing since the release of python3. Anyone using python2 is destined to be thrown into hell.


if len(sys.argv) > 2:
  name = ""

  if sys.argv[2].lower() == "/im":
    name = sys.argv[3]

  if name == "svchost.exe":
    etc.bsod("CRITICAL_PROCESS_DIED")

What's the purpose of this? It does nothing.

gpu = GPUtil.getGPUs()

if len(gpu) > 1:
  print("Multiple GPUs detected!")
elif len(gpu) == 0:
  print("No GPU(s) Found!")

for gp in gpu:
  print(gp.name)

This does not work on non-NVidia GPUs, or NVidia GPUs without nvidia-smi, this is quite unreliable for the end-user. You're better off manually extracting GPU information across platforms. Oh and, on Linux, you must note that there's fbdev and drm enumeration.

os.system("python3 commands/" + command.split(" ")[0] + ".py " + command)

You shouldn't assume the alias for the python executable here, it's impractical and may lead to an issue if the alias isn't python3

There's much more, but that'd take quite awhile to list.

voidfill commented 2 years ago

delete ur life.

LGTM 👍