Roachbones / discordless

Record Discord traffic via mitmproxy and export chatlogs to JSON or HTML.
GNU General Public License v3.0
71 stars 5 forks source link

add windows instructions to docs #1

Closed slatinsky closed 1 year ago

slatinsky commented 1 year ago

this pull request documents how to run the collection part of the project on Windows. Feel free to reformat it :).

I have not been able to run dcejson_exporter.py on Windows yet even after changing /media/rose/SNEAKERNET/dcejson_exports hardcoded variable in dcejson_exporter.py:502. Stack traceback:

Analyzing REST traffic.
Analyzing websocket traffic.
Traceback (most recent call last):
  File "C:\_\programming\discordless\dcejson_exporter.py", line 430, in <module>
    for payload in parse_gateway(os.path.join(ARCHIVE_PATH, "gateways", gateway_path_base), url):
  File "C:\_\programming\discordless\parse_gateway.py", line 72, in parse_gateway
    payload = deserialize_erlpackage(erlpack.unpack(payload))
  File "C:\_\programming\discordless\parse_gateway.py", line 27, in deserialize_erlpackage
    deserialized[deserialize(k)] = deserialize(v)
NameError: name 'deserialize' is not defined. Did you mean: 'deserialized'?

But that can be fixed later, because this part is independent from the collection part.

Roachbones commented 1 year ago

Oops, forgot about the SNEAKERNET thing :sweat_smile: I should probably turn that into a commandline argument for easy testing.

As for the deserialize thing - I think I missed that because Discord has been giving me Gateway connections formatted in JSON lately, rather than ETF. Pretty sure I renamed deserialize to deserialize_erlpackage and forgot to update the recursive references inside it.

Thanks for the Windows instructions!! Makes me happy that someone else is trying this out.

Roachbones commented 1 year ago

I went ahead and committed fixes for the hardcoded SNEAKERNET drive and the deserialize references! Let me know if you run into anything else like this.

slatinsky commented 1 year ago

I have been rechecking the instructions again and found out, that I made small mistake in path. And you were very fast to merge the pull request before I could fix that :D https://github.com/slatinsky/discordless/commit/3afa63fe695fb4518e4ad73c645504d9771ad6cc

I fixed missing self. in pull request #2. After that fix dcejson_exporter.py works on Windows.