diff --git a/docs.py b/docs.py index ac5e584..88be5df 100644 --- a/docs.py +++ b/docs.py @@ -1,32 +1,73 @@ from flask import Flask, send_from_directory, render_template from livereload import Server +import xml_lexer + +import re import os + app = Flask(__name__) +app.jinja_options.setdefault('extensions', []).append('jinja2_highlight.HighlightExtension') + + +TEMPLATES = "templates" +PAGES_BASE = "pages" +STATIC = ["images"] + +ROOT = os.environ.get("EA_ROOT", "") + + + +def generate_xrpc_list(): + output = "
"
+ output += prefix + i.replace(".html", delim + "%s")
+ output += "
"
+ output += prefix + i.replace(".html", delim + j)
+ output += "
import binascii
+ {% highlight 'python' %}
+import binascii
from Crypto.Cipher import DES3
-KEY = b"" # Check the DES section for this
+KEY = b"" # Check the DES section for this
_KEY = bytes(i * 2 for i in KEY) # Preprocess the key
ALPHABET = "0123456789ABCDEFGHJKLMNPRSTUWXYZ"
def enc_des(uid):
-cipher = DES3.new(_KEY, DES3.MODE_CBC, iv=b'\0' * 8)
-return cipher.encrypt(uid)
+ cipher = DES3.new(_KEY, DES3.MODE_CBC, iv=b'\0' * 8)
+ return cipher.encrypt(uid)
def dec_des(uid):
-cipher = DES3.new(_KEY, DES3.MODE_CBC, iv=b'\0' * 8)
-return cipher.decrypt(uid)
+ cipher = DES3.new(_KEY, DES3.MODE_CBC, iv=b'\0' * 8)
+ return cipher.decrypt(uid)
def checksum(data):
@@ -38,79 +39,79 @@ return chk
def pack_5(data):
-data = "".join(f"{i:05b}" for i in data)
-if len(data) % 8 != 0:
- data += "0" * (8 - (len(data) % 8))
-return bytes(int(data[i:i+8], 2) for i in range(0, len(data), 8))
+ data = "".join(f"{i:05b}" for i in data)
+ if len(data) % 8 != 0:
+ data += "0" * (8 - (len(data) % 8))
+ return bytes(int(data[i:i+8], 2) for i in range(0, len(data), 8))
def unpack_5(data):
-data = "".join(f"{i:08b}" for i in data)
-if len(data) % 5 != 0:
- data += "0" * (5 - (len(data) % 5))
-return bytes(int(data[i:i+5], 2) for i in range(0, len(data), 5))
+ data = "".join(f"{i:08b}" for i in data)
+ if len(data) % 5 != 0:
+ data += "0" * (5 - (len(data) % 5))
+ return bytes(int(data[i:i+5], 2) for i in range(0, len(data), 5))
def to_konami_id(uid):
-assert len(uid) == 16, "UID must be 16 bytes"
+ assert len(uid) == 16, "UID must be 16 bytes"
-if uid.upper().startswith("E004"):
- card_type = 1
-elif uid.upper().startswith("0"):
- card_type = 2
-else:
- raise ValueError("Invalid UID prefix")
+ if uid.upper().startswith("E004"):
+ card_type = 1
+ elif uid.upper().startswith("0"):
+ card_type = 2
+ else:
+ raise ValueError("Invalid UID prefix")
-kid = binascii.unhexlify(uid)
-assert len(kid) == 8, "ID must be 8 bytes"
+ kid = binascii.unhexlify(uid)
+ assert len(kid) == 8, "ID must be 8 bytes"
-out = bytearray(unpack_5(enc_des(kid[::-1]))[:13]) + b'\0\0\0'
+ out = bytearray(unpack_5(enc_des(kid[::-1]))[:13]) + b'\0\0\0'
-out[0] ^= card_type
-out[13] = 1
-for i in range(1, 14):
- out[i] ^= out[i - 1]
-out[14] = card_type
-out[15] = checksum(out)
+ out[0] ^= card_type
+ out[13] = 1
+ for i in range(1, 14):
+ out[i] ^= out[i - 1]
+ out[14] = card_type
+ out[15] = checksum(out)
-return "".join(ALPHABET[i] for i in out)
+ return "".join(ALPHABET[i] for i in out)
def to_uid(konami_id):
-if konami_id[14] == "1":
- card_type = 1
-elif konami_id[14] == "2":
- card_type = 2
-else:
- raise ValueError("Invalid ID")
+ if konami_id[14] == "1":
+ card_type = 1
+ elif konami_id[14] == "2":
+ card_type = 2
+ else:
+ raise ValueError("Invalid ID")
-assert len(konami_id) == 16, f"ID must be 16 characters"
-assert all(i in ALPHABET for i in konami_id), "ID contains invalid characters"
-card = [ALPHABET.index(i) for i in konami_id]
-assert card[11] % 2 == card[12] % 2, "Parity check failed"
-assert card[13] == card[12] ^ 1, "Card invalid"
-assert card[15] == checksum(card), "Checksum failed"
+ assert len(konami_id) == 16, f"ID must be 16 characters"
+ assert all(i in ALPHABET for i in konami_id), "ID contains invalid characters"
+ card = [ALPHABET.index(i) for i in konami_id]
+ assert card[11] % 2 == card[12] % 2, "Parity check failed"
+ assert card[13] == card[12] ^ 1, "Card invalid"
+ assert card[15] == checksum(card), "Checksum failed"
-for i in range(13, 0, -1):
- card[i] ^= card[i - 1]
+ for i in range(13, 0, -1):
+ card[i] ^= card[i - 1]
-card[0] ^= card_type
+ card[0] ^= card_type
-card_id = dec_des(pack_5(card[:13])[:8])[::-1]
-card_id = binascii.hexlify(card_id).decode().upper()
+ card_id = dec_des(pack_5(card[:13])[:8])[::-1]
+ card_id = binascii.hexlify(card_id).decode().upper()
-if card_type == 1:
- assert card_id[:4] == "E004", "Invalid card type"
-elif card_type == 2:
- assert card_id[0] == "0", "Invalid card type"
-return card_id
+ if card_type == 1:
+ assert card_id[:4] == "E004", "Invalid card type"
+ elif card_type == 2:
+ assert card_id[0] == "0", "Invalid card type"
+ return card_id
if __name__ == "__main__":
-assert to_konami_id("0000000000000000") == "007TUT8XJNSSPN2P", "To KID failed"
-assert to_uid("007TUT8XJNSSPN2P") == "0000000000000000", "From KID failed"
-assert to_uid(to_konami_id("000000100200F000")) == "000000100200F000", "Roundtrip failed"
-
+ assert to_konami_id("0000000000000000") == "007TUT8XJNSSPN2P", "To KID failed"
+ assert to_uid("007TUT8XJNSSPN2P") == "0000000000000000", "From KID failed"
+ assert to_uid(to_konami_id("000000100200F000")) == "000000100200F000", "Roundtrip failed"
+{% endhighlight %}
e-Amusement cards use 16 digit IDs. KONAMI IDs are also 16 digits. Are they related? Yes! In fact, KONAMI IDs are derived from the ID stored on the e-Amusement card.
@@ -195,7 +196,7 @@ card[0] ^= card_typeHaha well you see we can actually cheat and use string manipulation. Wasteful? Incredibly. Efficient? Not at all. Quick and easy? Yup!
-def pack_5(data):
+ {% highlight "python" %}def pack_5(data):
data = "".join(f"{i:05b}" for i in data)
if len(data) % 8 != 0:
data += "0" * (8 - (len(data) % 8))
@@ -205,7 +206,7 @@ def unpack_5(data):
data = "".join(f"{i:08b}" for i in data)
if len(data) % 5 != 0:
data += "0" * (5 - (len(data) % 5))
- return bytes(int(data[i:i+5], 2) for i in range(0, len(data), 5))
+ return bytes(int(data[i:i+5], 2) for i in range(0, len(data), 5)){% endhighlight %}
If your language of choice allows this, and you don't care for efficiency, this can be a great time-saver towards get something working. Truth be told my local implementation originally used the Bemani method (it was a line-for-line port, after all), switched to the second method, then I opted for this hacky @@ -272,7 +273,7 @@ card[15] = checksum(card) Either way, my python port didn't do any cleaning up, because we can just use a DES library.
DES_KEYMAP = [
+ {% highlight "python" %}DES_KEYMAP = [
[0x02080008, 0x02082000, 0x00002008, 0x00000000, 0x02002000, 0x00080008, 0x02080000, 0x02082008, 0x00000008, 0x02000000, 0x00082000, 0x00002008, 0x00082008, 0x02002008, 0x02000008, 0x02080000, 0x00002000, 0x00082008, 0x00080008, 0x02002000, 0x02082008, 0x02000008, 0x00000000, 0x00082000, 0x02000000, 0x00080000, 0x02002008, 0x02080008, 0x00080000, 0x00002000, 0x02082000, 0x00000008, 0x00080000, 0x00002000, 0x02000008, 0x02082008, 0x00002008, 0x02000000, 0x00000000, 0x00082000, 0x02080008, 0x02002008, 0x02002000, 0x00080008, 0x02082000, 0x00000008, 0x00080008, 0x02002000, 0x02082008, 0x00080000, 0x02080000, 0x02000008, 0x00082000, 0x00002008, 0x02002008, 0x02080000, 0x00000008, 0x02082000, 0x00082008, 0x00000000, 0x02000000, 0x02080008, 0x00002000, 0x00082008],
[0x08000004, 0x00020004, 0x00000000, 0x08020200, 0x00020004, 0x00000200, 0x08000204, 0x00020000, 0x00000204, 0x08020204, 0x00020200, 0x08000000, 0x08000200, 0x08000004, 0x08020000, 0x00020204, 0x00020000, 0x08000204, 0x08020004, 0x00000000, 0x00000200, 0x00000004, 0x08020200, 0x08020004, 0x08020204, 0x08020000, 0x08000000, 0x00000204, 0x00000004, 0x00020200, 0x00020204, 0x08000200, 0x00000204, 0x08000000, 0x08000200, 0x00020204, 0x08020200, 0x00020004, 0x00000000, 0x08000200, 0x08000000, 0x00000200, 0x08020004, 0x00020000, 0x00020004, 0x08020204, 0x00020200, 0x00000004, 0x08020204, 0x00020200, 0x00020000, 0x08000204, 0x08000004, 0x08020000, 0x00020204, 0x00000000, 0x00000200, 0x08000004, 0x08000204, 0x08020200, 0x08020000, 0x00000204, 0x00000004, 0x08020004],
[0x80040100, 0x01000100, 0x80000000, 0x81040100, 0x00000000, 0x01040000, 0x81000100, 0x80040000, 0x01040100, 0x81000000, 0x01000000, 0x80000100, 0x81000000, 0x80040100, 0x00040000, 0x01000000, 0x81040000, 0x00040100, 0x00000100, 0x80000000, 0x00040100, 0x81000100, 0x01040000, 0x00000100, 0x80000100, 0x00000000, 0x80040000, 0x01040100, 0x01000100, 0x81040000, 0x81040100, 0x00040000, 0x81040000, 0x80000100, 0x00040000, 0x81000000, 0x00040100, 0x01000100, 0x80000000, 0x01040000, 0x81000100, 0x00000000, 0x00000100, 0x80040000, 0x00000000, 0x81040000, 0x01040100, 0x00000100, 0x01000000, 0x81040100, 0x80040100, 0x00040000, 0x81040100, 0x80000000, 0x01000100, 0x80040100, 0x80040000, 0x00040100, 0x01040000, 0x81000100, 0x80000100, 0x01000000, 0x81000000, 0x01040100],
@@ -461,7 +462,7 @@ def load_key(key):
key_data = bytearray(24)
for i in range(24):
key_data[i] = 2 * key[i % len(key)]
- des3_setkey(KEY_DATA, key_data)
+ des3_setkey(KEY_DATA, key_data){% endhighlight %}
This site intentionally looks not-great. I don't feel like changing that, and honestly quite like the - aesthetic.
{% endblock %} \ No newline at end of file diff --git a/templates/pages/packet.html b/templates/pages/packet.html index 051cbc9..bc77e27 100644 --- a/templates/pages/packet.html +++ b/templates/pages/packet.html @@ -2,8 +2,8 @@ {% block body %}eAmuse uses XML for its application layer payloads*. This XML is either verbatim, or in a custom packed binary
- format.
*Newer games use JSON, but this page is about XML.
e-Amusement uses XML for its application layer payloads. This XML is either verbatim, or in a custom packed binary + format.
__count
attribute indicating how many items are in the array. Binary blobs additionally have
a __size
attribute indicating their length (this is notably not present on strings, however).
It is perhaps simpler to illustrate with an example, so:
-<?xml version='1.0' encoding='UTF-8'?>
-<call model="KFC:J:A:A:2019020600" srcid="1000" tag="b0312077">
- <eventlog method="write">
- <retrycnt __type="u32" />
- <data>
- <eventid __type="str">G_CARDED</eventid>
- <eventorder __type="s32">5</eventorder>
- <pcbtime __type="u64">1639669516779</pcbtime>
- <gamesession __type="s64">1</gamesession>
- <strdata1 __type="str" />
- <strdata2 __type="str" />
- <numdata1 __type="s64">1</numdata1>
- <numdata2 __type="s64" />
- <locationid __type="str">ea</locationid>
- </data>
- </eventlog>
-</call>
+{% highlight 'xml' %} + ++ +{% endhighlight %}+ ++ + G_CARDED +5 +1639669516779 +1 ++ + 1 ++ ea + +
Arrays are encoded by concatenating every value together, with spaces between them. Data types that have multiple values, are serialized similarly.
Therefore, an element storing an array of 3u8
([(1, 2, 3), (4, 5, 6)]
) would look like
this
<demo __type="3u8" __count="2">1 2 3 4 5 6</demo>
+{% highlight 'xml' %} +1 2 3 4 5 6 +{% endhighlight %}
Besides this, this is otherwise a rather standard XML.
This is indexed using the following function, which maps the above encoding IDs to 1, 2, 3, 4 and 5 respectively.
-char* xml_get_encoding_name(uint encoding_id) {
+ {% highlight "c" %}char* xml_get_encoding_name(uint encoding_id) {
return ENCODING_NAME_TABLE[((encoding_id & 0xe0) >> 5) * 4];
-}
+}{% endhighlight %}
While validating ~E
isn't technically required, it acts as a useful assertion that the packet being
parsed is valid.
While the intuitive way to understand the packing algorithm is via chunks and buckets, a far more efficient implementation can be made that uses three pointers. Rather than try to explain in words, hopefully this python implementation should suffice as explanation: -
class Packer:
+ {% highlight "python" %}class Packer:
def __init__(self, offset=0):
self._word_cursor = offset
self._short_cursor = offset
@@ -873,7 +877,7 @@
def notify_skipped(self, no_bytes):
for _ in range(math.ceil(no_bytes / 4)):
- self.request_allocation(4)
+ self.request_allocation(4){% endhighlight %}
diff --git a/templates/pages/proto/apsmanager.html b/templates/pages/proto/apsmanager.html
index b753aba..f0f08f0 100644
--- a/templates/pages/proto/apsmanager.html
+++ b/templates/pages/proto/apsmanager.html
@@ -3,11 +3,11 @@
apsmanager
apsmanager.getstat
<call ...>
- <apsmanager method="getstat" model*="" />
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+
<response>
- <apsmanager status="status" />
-</response>
+{% highlight "cxml" %}{% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/cardmng.html b/templates/pages/proto/cardmng.html index ea7af74..59a336b 100644 --- a/templates/pages/proto/cardmng.html +++ b/templates/pages/proto/cardmng.html @@ -46,9 +46,9 @@+ {% endhighlight %}+
Request information about a card that has been inserted or touched against a reader.
<call ...>
- <cardmng method="inquire" cardid="" cardtype="" update="" model*="" />
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+
update |
@@ -56,9 +56,9 @@
<response>
- <cardmng status="status" refid="" dataid="" pcode="" newflag="" binded="" expired=" ecflag="" useridflag="" extidflag="" lastupdate="" />
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+
To handle this request, we first must lookup if this cardid
has ever been seen by our servers
before. If not, we abort with a 112
status. Otherwise, we proceeed to check if this card has been
seen for this specific game. If we have never seen this card used on this game, it is possible this card was
@@ -92,9 +92,9 @@
cardmng.getrefid
Register a new card to this server.
<call ...>
- <cardmng method="getrefid" cardtype="" cardid=" newflag="" passwd="" model*="" />
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+
newflag |
@@ -107,9 +107,9 @@
<response>
- <cardmng status="status" refid="" dataid="" pcode="" />
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+
refid |
@@ -128,32 +128,32 @@
refid |
@@ -166,47 +166,47 @@
<response>
- <cardmng status="status" />
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+
If the pin is valid, status should be 0
. Otherwise, 116
.
cardmng.getkeepspan
<call ...>
- <cardmng method="getkeepspan" model*="" />
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+
<response>
- <cardmng status="status" keepspan="" />
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+
cardmng.getkeepremain
<call ...>
- <cardmng method="getkeepremain" refid="" model*="" />
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+
<response>
- <cardmng status="status" keepremain="" />
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+
cardmng.getdatalist
<call ...>
- <cardmng method="getdatalist" refid="" model*="" />
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+
<response>
- <cardmng status="status">
- <item[]>
- <mcode __type="str" />
- <dataid __type="str" />
- <regtime __type="str" />
- <lasttime __type="str" />
- <exptime __type="str" />
- <expflag __type="u8" />
- </item[]>
- </cardmng>
-</response>
+{% highlight "cxml" %}{% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/dlstatus.html b/templates/pages/proto/dlstatus.html index 9ea8144..806d383 100644 --- a/templates/pages/proto/dlstatus.html +++ b/templates/pages/proto/dlstatus.html @@ -3,32 +3,32 @@+ {% endhighlight %}+ +- +
++ + + + + +
dlstatus
dlstatus.done
<call ...>
- <dlstatus method="done">
- <url>
- <param __type="str" />
- </url>
- <name __type="str" />
- <size __type="s32" />
- </dlstatus>
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++ + ++ +
<response>
- <dlstatus status="status">
- <progress __type="s32" />
- </dlstatus>
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+ + +
dlstatus.progress
<call ...>
- <dlstatus method="progress" />
- <progress __type="s32" />
- </dlstatus>
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+ + +
<response>
- <dlstatus status="status" />
-</response>
+{% highlight "cxml" %}{% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/eacoin.html b/templates/pages/proto/eacoin.html index ac90e1d..d978c02 100644 --- a/templates/pages/proto/eacoin.html +++ b/templates/pages/proto/eacoin.html @@ -3,178 +3,178 @@+ {% endhighlight %}+
eacoin
eacoin.checkin
<call ...>
- <eacoin method="checkin">
- <cardtype __type="str" />
- <cardid __type="str" />
- <passwd __type="str" />
- <ectype __type="str" />
- </eacoin>
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++ + + +
<response>
- <eacoin status="status">
- <sequence __type="s16" />
- <acstatus __type="u8" />
- <acid __type="str" />
- <acname __type="str" />
- <balance __type="s32" />
- <sessid __type="str" />
- </eacoin>
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++ + + + + +
eacoin.checkout
<call ...>
- <eacoin method="checkout">
- <sessid __type="str" />
- </eacoin>
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++
<response>
- <eacoin status="status" />
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+
eacoin.consume
<call ...>
- <eacoin method="consume" esid="">
- <sessid __type="str" />
- <sequence __type="s16" />
- <payment __type="s32" />
- <service __type="s16" />
- <itemtype __type="str" />
- <detail __type="str" />
- </eacoin>
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++ + + + + +
<response>
- <eacoin status="status">
- <acstatus __type="u8" />
- <autocharge __type="u8" />
- <balance __type="s32" />
- </eacoin>
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++ + +
eacoin.getbalance
<call ...>
- <eacoin method="getbalance">
- <sessid __type="str" />
- </eacoin>
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++
<response>
- <eacoin status="status">
- <acstatus __type="u8" />
- <balance __type="s32" />
- </eacoin>
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++ +
eacoin.getecstatus
<call ...>
- <eacoin method="getecstatus" />
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+
<response>
- <eacoin status="status">
- <ectype __type="str" />
- <ecstatus __type="u8" />
- </eacoin>
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++ +
eacoin.touch
<call ...>
- <eacoin method="touch">
- <sessid __type="str" />
- </eacoin>
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++
<response>
- <eacoin status="status" />
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+
eacoin.opchpass
<call ...>
- <eacoin method="opchpass">
- <passwd __type="str" />
- <newpasswd __type="str" />
- </eacoin>
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++ +
<response>
- <eacoin status="status" />
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+
eacoin.opcheckin
<call ...>
- <eacoin method="opcheckin">
- <passwd __type="str" />
- </eacoin>
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++
<response>
- <eacoin status="status">
- <sessid __type="str" />
- </eacoin>
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++
eacoin.opcheckout
<call ...>
- <eacoin method="opcheckout">
- <sessid __type="str" />
- </eacoin>
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++
<response>
- <eacoin status="status" />
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+
eacoin.getlog
<call ...>
- <eacoin method="getlog">
- <sessid __type="str" />
- <logtype __type="str" />
- <ectype __type="str" />
- <target __type="str" />
- <perpage __type="s16" />
- <page __type="s16" />
- <sesstype __type="str" />
- </eacoin>
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++ + + + + + +
<response>
- <eacoin status="status">
- <processing __type="u8" />
- <topic>
- <sumdate __type="str" />
- <sumfrom __type="str" />
- <sumto __type="str" />
+{% highlight "cxml" %}
+
+
+
+
+
+
- <today __type="s32" />
- <average __type="s32" />
- <total __type="s32" />
- </topic>
- <summary>
- <items __type="s32" />
- </summary>
- <history>
- <item[]>
- <date __type="str" />
- <consume __type="s32" />
- <service __type="s32" />
- <cardtype __type="str" />
- <cardno __type="str" />
- <title __type="str" />
- <systemid __type="str" />
- </item[]>
- </history>
- </eacoin>
-</response>
+ esign
esign.request
<call ...>
- <esign method="request">
+{% highlight "cxml" %}
+
placeholder
- </esign>
-</call>
+
+{% endhighlight %}
<response>
- <esign status="status">
+{% highlight "cxml" %}
+
placeholder
- </esign>
-</response>
+
+{% endhighlight %}
{% endblock %}
\ No newline at end of file
diff --git a/templates/pages/proto/esoc.html b/templates/pages/proto/esoc.html
index e38cc9c..9887f91 100644
--- a/templates/pages/proto/esoc.html
+++ b/templates/pages/proto/esoc.html
@@ -3,28 +3,28 @@
esoc
esoc.read
<call ...>
- <esoc method="read">
- <senddata />
- </esoc>
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++
<response>
- <esoc status="status">
- <recvdata />
- </esoc>
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++
Go figure.
esoc.write
<call ...>
- <esoc method="write">
- <senddata />
- </esoc>
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++
<response>
- <esoc status="status" />
-</response>
+{% highlight "cxml" %}{% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/eventlog.html b/templates/pages/proto/eventlog.html index 2c67e21..bba7daa 100644 --- a/templates/pages/proto/eventlog.html +++ b/templates/pages/proto/eventlog.html @@ -3,22 +3,22 @@+ {% endhighlight %}+
eventlog
eventlog.write
<call ...>
- <eventlog method="write">
- <retrycnt __type="u32" />
- <data>
- <eventid __type="str" />
- <eventorder __type="s32" />
- <pcbtime __type="u64" />
- <gamesession __type="s64" />
- <strdata1 __type="str" />
- <strdata2 __type="str" />
- <numdata1 __type="s64" />
- <numdata2 __type="s64" />
- <locationid __type="str" />
- </data>
- </eventlog>
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++ + + + + + + + + + + +
Event ID list:
G_GAMED
T_OTDEMO
<response>
- <eventlog status="status">
- <gamesession __type="s64" />
- <logsendflg __type="s32" />
- <logerrlevel __type="s32" />
- <evtidnosendflg __type="s32" />
- </eventlog>
-</response>
+{% highlight "cxml" %}{% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/facility.html b/templates/pages/proto/facility.html index 6536380..36b674b 100644 --- a/templates/pages/proto/facility.html +++ b/templates/pages/proto/facility.html @@ -3,66 +3,66 @@+ {% endhighlight %}+ ++ + + +
facility
facility.get
<call ...>
- <facility method="get" privateip*="" encoding*="" />
-</call>
+{% highlight "cxml" %}+ {% endhighlight %}+
<response>
- <facility expire=""\ status="status">
- <calendar*>
- <year __type="s16" />
- <holiday __type="s16" />
- </calendar>
- <location>
- <id __type="str" />
- <country __type="str" />
- <region __type="str" />
- <name __type="str" />
- <type __type="u8" />
- <countryname __type="str" />
- <countryjname __type="str" />
- <regionname __type="str" />
- <regionjname __type="str" />
- <customercode __type="str" />
- <companycode __type="str" />
- <latitude __type="s32" />
- <longitude __type="s32" />
- <accuracy __type="u8" />
- </location>
- <line>
- <id __type="str" />
- <class __type="u8" />
- </line>
- <portfw>
- <globalip __type="ip4" />
- <globalport __type="s16" />
- <privateport __type="s16" />
- </portfw>
- <public>
- <flag __type="u8" />1</ flag>
- <name __type="str" />
- <latitude __type="str">0<latitude>
- <longitude __type="str">0<longitude>
- </public>
- <share>
- <eapass*>
- <valid __type="?" />
- </eapass>
- <eacoin>
- <notchamount __type="s32" />
- <notchcount __type="s32" />
- <supplylimit __type="s32">100000<supplylimit>
- </eacoin>
- <url>
- <eapass __type="str">www.ea-pass.konami.net<eapass>
- <arcadefan __type="str">www.konami.jp/am<arcadefan>
- <konaminetdx __type="str">http://am.573.jp<konaminetdx>
- <konamiid __type="str">http://id.konami.jp<konamiid>
- <eagate __type="str">http://eagate.573.jp<eagate>
- </url>
- </share>
- </facility>
-</response>
+{% highlight "cxml" %}+ {% endhighlight %}+ ++ ++ + + ++ + + + + + + + + + + + + + + ++ + + ++ + + + +1 flag> + + 0 + 0 + + ++ ++ + ++ + 100000 + + +www.ea-pass.konami.net + www.konami.jp/am + http://am.573.jp + http://id.konami.jp + http://eagate.573.jp +
I'm not totally sure what type share/eapass/valid
is meant to be, but it's optional, so I'd
suggest just not bothering and leaving it out :).