Exploit databaseDownload repository ZIP
GH-b39836d162640d12c390bf8bbfaa8776
fullmetal5/flashhax
Sources for CVE-2016-0974
2 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files24
fullmetal5/flashhaxRevision c6b53bd456ff
- ↑..Parent directory
- .gitignore
- .version
- Makefile
- console.c
- crt0.s
- elf.c
- exception.c
- exception_2200.s
- fat.c
- font.png
- font.ppm
- font2c.pl
- ios.c
- loader.h
- loader.lds
- main.c
- payload.c
- payload.o
- sd.c
- string.c
- sync.c
- time.c
- usbgecko.c
- video.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
payload/loader/font2c.pl
Perl · 943 bytes#!/usr/bin/perl
# Read PPM file.
$sig = <>; chomp $sig;
$sizes = <>; chomp $sizes;
$cols = <>; chomp $cols;
{
local $/;
$data = <>;
}
# Sanity check.
$sig ne "P6" and die;
$sizes ne "90 256" and die;
$cols ne "255" and die;
(length $data) != 3 * 90 * 256 and die;
# Output header.
print "// GENERATED FILE DO NOT EDIT\n";
print "\n";
print "#include \"loader.h\"\n";
print "\n";
print "const u8 console_font_10x16x4[96*80] = {\n";
# Output data.
for my $ch (2..7) {
for my $cl (0..15) {
printf "\n\t// %x%x\n", $ch, $cl;
for my $py (0..15) {
print "\t";
for my $px (0..9) {
my $hor = $px + 10*($ch - 2);
my $ver = $py + 16*$cl;
my $wot = $hor + 90*$ver;
my $bytes = substr($data, 3*$wot, 3);
my $nyb = int ((ord $bytes) / 16);
if (($px & 1) == 0) {
printf "0x%x", $nyb;
} else {
printf "%x,", $nyb;
}
}
print "\n";
}
}
}
# Output footer.
print "\n";
print "};\n";