Welcome to OpenGlass’s documentation!¶
OpenGlass is a tool to query various social network and search for different types of information.
At this moment it is in it’s alpha version and supports limited search functionalities for Twitter and Telegram.
OpenGlass was designed as an OSINT tool to identify and discover disinformation campaigns.
Getting Started¶
OpenGlass can be installed via pypi by running:
$ pip install openglass
Then you can run it with:
$ openglass --help
Setup the configuration file¶
OpenGlass uses a config file in JSON format. A config example file is provided in the code repository.
{
"twitter_apis": [
{
"CONSUMER_KEY": "CONSUMER_KEY",
"CONSUMER_SECRET": "CONSUMER_SECRET",
"ACCESS_KEY": "ACCESS_KEY",
"ACCESS_SECRET": "ACCESS_SECRET"
}
],
"telegram": {
"phone": "PHONE_NUMBER",
"username": "USERNAME",
"app_id": "APP_ID",
"api_hash": "API_HASH",
"servers": {
"test": "149.154.167.40:443",
"production": "149.154.167.50:443"
}
}
}
To obtain API keys from Twitter and Telegram check their respective api docs:
Run queries¶
To query telegram you need to use the --telegram switch
--telegram
--channel-users CHANNEL ID
Query telegram channels and return its users in json
--channel-messages CHANNEL ID
Query telegram channels and return its messages in json
--domains Parse links
--channel-links Parse links to telegram channels
To do a query in Telegram run:
$ openglass --config config.json --telegram --channel-users "ChannelID"
The switch ` –csv ` prints result to a file called {query}-{timestamp}.csv
More specific queries are possible. Specifically the --domains switch returns
a list of high level domains (or FQDN).
The --channel-links switch returns a list of shared telegram channels.
These two switch are important if you want to know which links are shared in a Telegram channel and which other channels are cross referenced.
Twitter support on openglass is still very experimental. In the next few versions we hope to provide more analysis capabilities and the possibilities to run queries using different APIs keys in order to avoid Twitter’s query limits.
To do a query on twitter use the –twitter switch:
--twitter
--search SEARCH QUERY
Specify the term to search
--timeline USERNAME OR ID
Specify the user to retrieve its timeline
--profile USERNAME OR ID
Specify the user to retrieve its profile
--followers USERNAME OR ID
Specify the user to retrieve its profile
Run a query with:
$ openglass --config config.json --twitter --search "@twitter"
Openglass is in its first versions still. Please expect bugs. If you want to contribute please do get in touch on Github.