Skip to content

Commit

Permalink
corpus: add 6502, from the Atredis challenge
Browse files Browse the repository at this point in the history
  • Loading branch information
LRGH committed Aug 22, 2018
1 parent 7181215 commit 4850abc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ This presentation is in French. Please raise an
if you want a translation in English.

# Known architectures in the default corpus
[`6502`](https://en.wikipedia.org/wiki/6502)
[`68HC08`](https://en.wikipedia.org/wiki/Freescale_68HC08)
[`68HC11`](https://en.wikipedia.org/wiki/Freescale_68HC11)
[`8051`](https://en.wikipedia.org/wiki/Intel_MCS-51)
Expand Down Expand Up @@ -208,3 +209,5 @@ where they are distributed under an unknown licence.
where it seems to be distributed under GPLv3 (or later).
- The binary for PIC24 comes from https://raw.githubusercontent.com/mikebdp2/Bus_Pirate/master/package_latest/BPv4/firmware/bpv4_fw7.0_opt0_18092016.hex
distributed under Creative Commons Zero.
- The binary for 6502 comes from https://raw.githubusercontent.com/RolfRolles/Atredis2018/master/MemoryDump/data-4000-efff.bin
and was distributed for the Atredis BlackHat 2018 challenge, under an unknown licence.
3 changes: 3 additions & 0 deletions cpu_rec.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,9 @@ def build_default_corpus(self, basedir):
self.add_training('#6502#cc65', file = basedir+'CROSS_COMPILED/tu-tea-cc65', repeat=5)
self.add_training('#6502#cc65', file = basedir+'CROSS_COMPILED/tu-path-cc65', repeat=5)
self.add_training('#6502#cc65', file = basedir+'CROSS_COMPILED/tu-arithmetic-cc65', repeat=5)
# Other 6502 binary, downloaded from https://raw.githubusercontent.com/RolfRolles/Atredis2018/master/MemoryDump/data-4000-efff.bin
# This is not a lot of data, but seems sufficient
self.add_training('6502', file = basedir+'6502/data-4000-efff.bin', section=slice(0x4000,0x4542), repeat=5)
# OCaml bytecode, having non-standard statistical properties.
self.add_training('OCaml', file = basedir+'OCaml/camlp4')
log.info("Training set of size %d is read; %s different CPUs known", len(self.archs), len(set([_ for _ in self.archs if not _.startswith('_')])))
Expand Down
Binary file added cpu_rec_corpus/6502.corpus.xz
Binary file not shown.

0 comments on commit 4850abc

Please sign in to comment.