XombieOnline / xombie

GNU Affero General Public License v3.0
57 stars 9 forks source link

PostgreSQL: Database "xombie" does not exist #2

Closed dontdeadopeninside closed 2 years ago

dontdeadopeninside commented 2 years ago

db_1 | 2022-08-19 20:41:23.635 UTC [77] FATAL: database "xombie" does not exist faux_dns_1 | "host=db port=5432 user=postgres password=postgres dbname=xombie" faux_dns_1 | thread 'main' panicked at 'called Result::unwrap() on an Err value: Error { kind: Db, cause: Some(DbError { severity: "FATAL", parsedseverity: Some(Fatal), code: SqlState(E3D000), message: "database \"xombie\" does not exist", detail: None, hint: None, position: None, where: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("postinit.c"), line: Some(885), routine: Some("InitPostgres") }) }', /opt/xombie-build/libs/xombie/src/db.rs:18:10 faux_dns_1 | note: run with RUST_BACKTRACE=1 environment variable to display a backtrace kdc_1 | "host=db port=5432 user=postgres password=postgres dbname=xombie" kdc_1 | thread 'main' panicked at 'called Result::unwrap() on an Err value: Error { kind: Db, cause: Some(DbError { severity: "FATAL", parsedseverity: Some(Fatal), code: SqlState(E3D000), message: "database \"xombie\" does not exist", detail: None, hint: None, position: None, where: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("postinit.c"), line: Some(885), routine: Some("InitPostgres") }) }', /opt/xombie-build/libs/xombie/src/db.rs:18:10 kdc_1 | note: run with RUST_BACKTRACE=1 environment variable to display a backtrace xombie_faux_dns_1 exited with code 101

dontdeadopeninside commented 2 years ago

Created database "xombie" manually table: kdc_nodes COLUMN external_ip cidr table: sg_nodes COLUMN external_ip cidr

Now getting faux_dns_1 | thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', services/faux-dns/src/main.rs:129:60 faux_dns_1 | note: run with RUST_BACKTRACE=1 environment variable to display a backtrace faux_dns_1 | Recevied 35 byte packet from 192.168.12.180:1256 xombie_faux_dns_1 exited with code 101

dontdeadopeninside commented 2 years ago

I did it. After all the tables and columns and data added, I finally get to something. sg_1 | Recevied control init packet from 192.168.12.180:3074 sg_1 | ~TODO~: Validate ticket is valid So it looks like the rest is up to mr xombie to finish it.

GXTX commented 2 years ago

You should reopen this as it is an issue. Tables should be distributed.

Here's one I have right now. https://pastebin.com/5hKFBM2y

And here's some accounts for passers by, has machine account and 2 live accounts. https://gist.github.com/GXTX/0ba2d5a69afde3a859e45f2252e78f01 backup.zip

dontdeadopeninside commented 2 years ago

Hmm I've imported your database script into a clean database, now I get a different issue. db_1 | 2022-08-20 17:29:36.066 UTC [40] LOG: execute s51: SELECT xuid FROM clients WHERE gamertag = $1 LIMIT 1 db_1 | 2022-08-20 17:29:36.066 UTC [40] DETAIL: parameters: $1 = 'SN.405158522602' db_1 | 2022-08-20 17:29:36.068 UTC [40] LOG: execute s52: SELECT kvno, key FROM client_keys WHERE xuid = $1 AND key_type = $2 ORDER BY kvno DESC LIMIT 1 db_1 | 2022-08-20 17:29:36.068 UTC [40] DETAIL: parameters: $1 = '0000405158522602', $2 = 'tgs_client_session_key' db_1 | 2022-08-20 17:29:36.069 UTC [40] LOG: execute s53: SELECT kvno, key FROM client_keys WHERE xuid = $1 AND key_type = $2 ORDER BY kvno DESC LIMIT 1 db_1 | 2022-08-20 17:29:36.069 UTC [40] DETAIL: parameters: $1 = '0000405158522602', $2 = 'client_master_key' kdc_1 | thread 'tokio-runtime-worker' panicked at 'calledResult::unwrap()on anErrvalue: Decrypting(InvalidHmac)', services/kdc/src/auth.rs:168:7 kdc_1 | xuid: Xuid(70718118307330) kdc_1 | keys: Keys { tgs_client_session_key: SymmetricKey([12, 34, 56, 78, 90, 12, 34, 56, 78, 90, 12, 34, 56, 78, 90, 12]), compound_key: SymmetricKey([12, 34, 56, 78, 90, 12, 34, 56, 78, 90, 12, 34, 56, 78, 90, 12]), tgs_master_key: SymmetricKey([8b, 27, f6, 58, 1f, 26, 95, da, 75, 5f, 8f, 8f, fe, a5, 71, f1]) } Thing is, I don't know how to extract these keys from eeprom or obtain them. I suspect the client master and session keys are from the console at least. I just put in junk data "1234etc" to clear any errors about it being blank.

GXTX commented 2 years ago

The project has tools avail in the tools folder but you can also just use external stuff like https://github.com/Ernegien/XboxEepromEditor

I'm not 100% on the client_master_key yet or the role of the session keys, but online and HDD can be obtained from the eeprom.

dontdeadopeninside commented 2 years ago

Yea thats what I was using for hdd and online, guess we'll have to wait for more info on the other keys.