Skip to content

giosg/giosg_crypter

Repository files navigation

Build Status

Giosg Crypter

Giosg Crypter logo

Install

pip install git+https://github.com/giosg/giosg_crypter.git#egg=giosg-crypter==<version number>

Where <version number> is the release version that user wants to install.

Usage

Command line

File inputs

Provide paths to the files that contain chat_session and messages in file format. Flag the messages with -m or --messages.

decrypt path/to/private/key/file path/to/chatsession/json/file -m path/to/messages/json/file

Url inputs

By providing a url that starts with https, the chat session and the messages can be fetched online. The API Token needs to be given with -t or --token flag. In this case, url to the messages is not required.

decrypt path/to/private/key/file https://service.giosg.com/api/v5/path/to/chats/<chat_session_id> -t 6agf3a2b2f4440b6dfssb79ddb24ff2a5abbc9a2

Example of reading chat messages directly from API and printing to STDOUT: decrypt path/to/private/key/file -t 6agf3a2b2f4440b6dfssb79ddb24ff2a5abbc9a2 https://service.giosg.com/api/v5/users/9ff0de38-93bd-11e7-9200-60f81db14236/chats/c7ee1fda-1cd8-11ea-873f-f218983fece9/ -o stdout

Choosing output

By default, output is written in a file with default name decrypted_messages.json. The filename can be changed using -f or --filename flag:

decrypt path/to/private/key/file path/to/chatsession/json/file pat/to/messages/json/file -f new_filename.json

The output can also be changed to stdout with -o or --output flag:

decrypt path/to/private/key/file path/to/chatsession/json/file pat/to/messages/json/file -o stdout

Version

decrypt --version or decrypt -v

Help

decrypt --help or decrypt -h

As library

from giosg.crypter import AESKey, asymmetric_decrypt, symmetric_decrypt

aes_key = asymmetric_decrypt(private_key, encrypted_key_from_chat_session)
key = AESKey.from_json(aes_key)
symmetric_decrypt(key, message_field_to_be_decrypted])

About

Python library for decrypting Giosg Live Chat conversations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages