Being in the offensive security domain, we might wonder why we need to parse Twitter tweets. This question is valid, as this use case is more suited to defensive security. It may help, however, to uncover a good amount of information if we are targeting a specific individual or a specific organization.
As mentioned earlier, Twitter-tweet-parsing can be used by cyber intelligence teams to see if any defamation or sensitive content has been posted under the organization's name. Let's take a look at the following example that explains Twitter tweet parsing. First, we need to install the Python module as follows:
pip3 install tweet_parser
Our example takes a Twitter feed as an input JSON file and parses all tweets to produce the output. Let's create a file called sample.py as shown:
Let's use a sample Twitter feed file called exp.json as...