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
#!/usr/bin/env python | |
# please ensure python means python3 on your system | |
# the file can be any binary file that contains a JPG image | |
# note that it's hungry and doesn't chunk the read so careful with large files | |
# usage: extract-jpg file_name | |
import sys |
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
#define _CRT_SECURE_NO_WARNINGS | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
#include <stdio.h> | |
int main(int argc, char *argv[]) | |
{ | |
HANDLE handle = CreateFile( | |
"\\\\.\\PhysicalDrive0", | |
GENERIC_READ, |