2 месяца назад
File Upload Attacks - Hackthebox
Прохождение модуля File Upload Attacks - Academy HackTheBox 1 - Try to upload a PHP script that executes the (hostname) command on the back-end server, and submit the first word of it as the answer. (Попробуйте загрузить PHP-скрипт, который выполняет команду (имя хоста) на внутреннем сервере, и отправьте его первое слово в качестве ответа.) После загрузки цели, переходим на pwnbox, запускаем терминал и создаем файл с php скриптом, который будет выполнять команду 'hostname' [★]$ echo '<?php system(hostname);?>' > test...
Python requests upload file
Import requests Def upload_file(url, filepath, filename=None, headers=None, data=None): """ Uploads a file to a specified URL using the requests library. Args: url (str): The URL to which the file should be uploaded. filepath (str): The path to the file to be uploaded. filename (str, optional): The filename to use when uploading (overrides the actual filename). If None, the actual filename from `filepath` will be used. Defaults to None. headers (dict, optional): A dictionary of HTTP headers to include in the request. Defaults to None. data (dict, optional): Additional form data to send along with the file...