diff compal/osmovoodoo.c @ 106:a39a38bbec4d

analysis of what osmocon's voodoo payloads disassemble to in ARM/Thumb
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 31 Mar 2014 06:33:14 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compal/osmovoodoo.c	Mon Mar 31 06:33:14 2014 +0000
@@ -0,0 +1,31 @@
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+u_char data_hdr_c123[]    = { 0xee, 0x4c, 0x9f, 0x63 };
+
+u_char data_hdr_c155[]    = { 0x78, 0x47, 0xc0, 0x46 };
+
+u_char chainloader[] = {
+	0x0a, 0x18, 0xa0, 0xe3, 0x01, 0x10, 0x51, 0xe2, 0xfd, 0xff, 0xff,
+	0x1a, 0x08, 0x10, 0x9f, 0xe5, 0x01, 0x2c, 0xa0, 0xe3, 0xb0, 0x20,
+	0xc1, 0xe1, 0x00, 0xf0, 0xa0, 0xe3, 0x10, 0xfb, 0xff, 0xff,
+};
+
+char outfile[] = "osmovoodoo.bin";
+
+main()
+{
+	FILE *f;
+
+	f = fopen(outfile, "w");
+	if (!f) {
+		perror(outfile);
+		exit(1);
+	}
+	fwrite(data_hdr_c123, 1, sizeof data_hdr_c123, f);
+	fwrite(data_hdr_c155, 1, sizeof data_hdr_c155, f);
+	fwrite(chainloader, 1, sizeof chainloader, f);
+	fclose(f);
+	exit(0);
+}