From 629fc11ba4f8d27937f47cd2eb8d4c0cff1e9dfe Mon Sep 17 00:00:00 2001 From: Bottersnike Date: Fri, 4 Feb 2022 01:08:54 +0000 Subject: [PATCH] Server code --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ all.cmd | 9 +++++++-- commit.cmd | 5 +++-- setup.cmd | 6 ++++++ 4 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..de139ab --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# EAAPI + +These scripts should be considered complementary to the documentation, not the +other way round. Experimental or unconfirmed this may be present here, however +the doc pages should for the most part only contain confirmed information. + +If you came here looking for a complete e-Amusement implementation, you +probably want https://github.com/DragonMinded/bemaniutils instead. + +# Requirements +Rather than rolling my own ARC4 and Triple-DES implementations (why does everyone seem to do that?) +I instead opted to just use `pycryptodome`. `lxml` is required for the parsing of string packets, +but is not a hard dependency. + +# Keys +In order to run this code, some encryption keys need loaded in. I have opted to not include them in +this repo because I didn't really feel like doing that. May or may not change that stance later. + +For now, copy `eaapi/keys.template.py` to `eaapi/keys.py`, and fill in the blanks. If you're +following along with docs, you already have the values you need. Otherwise, I trust you can figure +out somewhere to find them. `CARDCONV_KEY` is only required if you plan to make use of `cardconv`. + +## `eaapi/` +The actual implementation of stuff. + +## `tests/` +An incredibly incomplete test suite. Run with `test` if you're on windows and lazy. + +## `server-dummy/` +A super barebones e-Amusement server that's able to start a surprising number of games. +Largely exists as a proof of concept, and as a testing ground for specific endpoints without having +the overhead of an entire EA server running. + +## `server/` +A less barebones server, used for experiementing with more complex behaviours. This probably won't +get pushed until it's had a significant tidy. + +## `proxy/` +An e-Amusement server designed to proxy requests to a different upstream server, while allowing the +observation of requests as they're made. As above, probably won't push this for a bit. diff --git a/all.cmd b/all.cmd index 52ea494..03a3af1 100644 --- a/all.cmd +++ b/all.cmd @@ -1,10 +1,15 @@ @echo off -for /D %%G in (%CD%\*) do if exist %%G\.git ( +set BASE=%CD% +for /D /R %%G in (*) do if exist %%G\.git ( cd %%G echo ================================================================ echo %%G echo ================================================================ git %* - cd .. + cd %BASE% ) +echo ================================================================ +echo %CD% +echo ================================================================ +git %* diff --git a/commit.cmd b/commit.cmd index 1f16603..f0cf6f1 100644 --- a/commit.cmd +++ b/commit.cmd @@ -1,6 +1,7 @@ @echo off -for /D %%G in (%CD%\*) do if exist %%G\.git ( +set BASE=%CD% +for /R /D %%G in (*) do if exist %%G\.git ( cd %%G set RESULT= for /f %%i in ('git status -s') do (set RESULT=%%i) @@ -9,7 +10,7 @@ for /D %%G in (%CD%\*) do if exist %%G\.git ( git commit %* set ANY=1 ) - cd .. + cd %BASE% ) if defined ANY ( diff --git a/setup.cmd b/setup.cmd index 7eba2f7..3ce216a 100644 --- a/setup.cmd +++ b/setup.cmd @@ -5,6 +5,12 @@ for /D %%G in (%CD%\*) do ( git submodule update --init %%~nG ) +rem Special case for eaapi.server, unfortunately +set base=%CD% +cd eaapi\eaapi +git submodule update --init server +cd %base% + for /D %%G in (%CD%\*) do if exist %%G\requirements.txt ( py -m pip install -r %%G\requirements.txt )