Twitter Intelligence OSINT Project – Twitter Intelligence

Last Release: 06/21/2018     Last Commit: 11/10/2020

Twitter Intelligence OSINT Project – Twitter Intelligence

Twitter Intelligence: Twitter Intelligence OSINT Project

Twitter Intelligence is a OSINT project written in Python which performs tracking and analysis of the Twitter without using Twitter API.

Twitter Intelligence OSINT Project

Open Source Intelligence (OSINT) is a collection and analysis of information that is collected from public, or open, sources. OSINT is primarily used in national security, law enforcement, and business intelligence functions and is of value to analysts who use non-sensitive intelligence in answering classified, unclassified, or proprietary intelligence requirements across the previous intelligence disciplines.

Prerequisites:

  • Python 3.x 
  • The package dependencies (requirements.txt):
    • lxml 4.2.1, pyquery 1.4.0, Flask 0.12.3, pandas 0.22.0, termcolor 1.1.0, geopy 1.11.0, requests 2.19.1, numpy 1.14.1, matplotlib 2.2.2, PyQt5 5.11.2

To install dependencies, just run:

pip3 install -r requirements.txt

Twitter Intelligence DB:

  • Database: SQLite.
  • The database is created automically.
  • Tweet data are stored in the following tables: Tweet, User, Location, Hashtag, HashtagTweet.

Clone it from the github repo:

$ git clone https://github.com/batuhaniskr/twitter-intelligence.git

Usage

To see available options and get help, just type:

$ python3 tracking.py -h

Get tweets by username:

$ python3 tracking.py --username "TwitterUsername"

Get tweets by query:

$ python3 tracking.py --query "unknown"

To get tweets at a specific date range:

$ python3 tracking.py --username "TwitterUsername" --since 2018-10-25 --until 2018-10-27 --maxtweets 10

You can also add --location "True" param but the application will be slower due to new response times:

$ python3 tracking.py --query "unknown" --location "True"

Analysis

Analysis processing is performed by analysis.py. Analyzed:

  • User, hashtag and location.

Run the following to get help:

$ python3 analysis.py -h

To perform location analysis, run:

$ python3 analysis py --location

Location analysis runs through the following address: http://localhost:5000/locations.

Note: To display google map, you must add Google Map Api Key in setting.py:
GOOGLE_MAP_API_KEY='YOUR_GOOGLE_MAP_API_KEY'
PORT=5000

To start hashtag analysis, run the following:

$ python3 analysis.py --hashtag

You can also run user analysis:

$ python3 analysis.py --user

Graphical User Interface/GUI application:

$ python3 socialgui.py
Documentation Box