Skip to content

Commit 0cf2751

Browse files
committed
Bump to v0.7.1
1 parent 05b97cd commit 0cf2751

File tree

3 files changed

+51
-10
lines changed

3 files changed

+51
-10
lines changed

Pipfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[dev-packages]
7+
8+
[packages]
9+
chardet = "*"
10+
pprp = "*"
11+
12+
[requires]
13+
python_version = "3.6"

README.md

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
# EAC Logchecker
22

3-
This is a transparent implementation of the Exact Audio Copy log checksum algorithm in Python 3.4+.
3+
![Travis-CI Status](https://img.shields.io/travis/com/OPSnet/eac_logchecker.py/master.svg)
4+
![PyPI](https://img.shields.io/pypi/v/eac_logchecker.svg)
5+
6+
This is a transparent implementation of the Exact Audio Copy log checksum algorithm in Python 3.5+.
47

58
This is a fork of https://github.com/puddly/eac_logsigner, with modifications to have it
6-
better match the output of the actual EAC Logchecker to be used in downstream applications.
9+
better match the output of the actual EAC Logchecker to be used in downstream applications. All
10+
credit goes to puddly for reverse-engineering the closed source EAC to develop the base.
711

812
# Requirements
913

1014
* Python 3.5+
15+
* [pprp](http://pypi.org/project/pprp)
1116

1217
# Installation
1318

@@ -23,18 +28,41 @@ From source:
2328

2429
# Usage
2530

26-
usage: eac_logchecker [-h] [--json] files [files ...]
31+
usage: eac_logchecker.py [-h] [--json] file
2732

2833
Verifies and resigns EAC logs
2934

3035
positional arguments:
31-
files input log file(s)
36+
file input log file
3237

3338
optional arguments:
3439
-h, --help show this help message and exit
3540
--json Output as JSON
3641

37-
38-
# Overview
39-
40-
The algorithm internally uses UTF-16 strings and XORs a refilling 32-byte buffer of characters with the internal state of what looks to be part of AES-256. The code is pretty short, go read it for more info. Open a pull request if you can figure out a way to simplify it.
42+
# Example
43+
44+
$ eac_logchecker logs/01.log
45+
Log Integrity Checker (C) 2010 by Andre Wiethoff
46+
47+
1. Log entry is fine!
48+
$ eac_logchecker logs/01.log
49+
$ eac_logchecker logs/05.log
50+
Log Integrity Checker (C) 2010 by Andre Wiethoff
51+
52+
1. Log entry is fine!
53+
2. Log entry is fine!
54+
$ eac_logchecker --json logs/05.log
55+
[{"message": "Log entry is fine!", "status": "OK"}, {"message": "Log entry is fine!", "status": "OK"}]
56+
57+
# Algorithm
58+
59+
1. Strip the log file of newlines and BOMs.
60+
2. Cut off the existing signature block and (re-)encode the log text back into little-endian UTF-16
61+
3. Encrypt the log file with Rijndael-256:
62+
- in CBC mode
63+
- with a 256-bit block size (most AES implementations hard-code a 128-bit block size)
64+
- all-zeroes IV
65+
- zero-padding
66+
- the hex key `9378716cf13e4265ae55338e940b376184da389e50647726b35f6f341ee3efd9`
67+
4. XOR together all of the resulting 256-bit ciphertext blocks. You can do it byte-by-byte, it doesn't matter in the end.
68+
5. Output the little-endian representation of the above number, in uppercase hex.

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
1919
AUTHOR = 'OPS'
2020
REQUIRES_PYTHON = '>=3.5.0'
21-
VERSION = '0.7.0'
21+
VERSION = '0.7.1'
2222

2323
here = os.path.abspath(os.path.dirname(__file__))
2424

@@ -84,7 +84,7 @@ def run(self):
8484
install_requires=['pprp'],
8585
license='MIT',
8686
classifiers=[
87-
'Development Status :: 4 - Beta'
87+
'Development Status :: 4 - Beta',
8888
'License :: OSI Approved :: MIT License',
8989
'Programming Language :: Python',
9090
'Programming Language :: Python :: 3',

0 commit comments

Comments
 (0)