1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-10-29 18:07:27 +01:00

Remove file exists check from stdapi_fs_delete_file

This commit is contained in:
Spencer McIntyre 2014-12-08 18:25:34 -05:00 committed by Brent Cook
parent 42710cc32e
commit 0ee20561d4

View File

@ -945,8 +945,7 @@ def stdapi_fs_delete_dir(request, response):
@meterpreter.register_function
def stdapi_fs_delete_file(request, response):
file_path = packet_get_tlv(request, TLV_TYPE_FILE_PATH)['value']
if os.path.exists(file_path):
os.unlink(file_path)
os.unlink(file_path)
return ERROR_SUCCESS, response
@meterpreter.register_function