Rating: 2.0
Summary:
* Given twitter account
Visit twitter account to see a bunch of tweets in the form "Tweet #xxx yyy" where xxx and yyy are different numbers.
Manually scrolling through, seems that the tweets will need to be parsed and sorted in order of Tweet #xxx.
Used [getoldtweets3](https://pypi.org/project/GetOldTweets3/) to scrape twitter (no API/auth token needed, no twitter account needed).
```
GetOldTweets3 --username "BigBird01558595" --maxtweets 1000
Downloading tweets...
Saved 402
Done. Output file generated "output_got.csv".
```
Format fetched tweets to only containt "Tweet #xxx yyy" (and not any of the other data getoldtweets3 fetches)
```
cat output_got.csv | sed 's/,/\t/g' | awk -F$'\t' '{print $7}' | sed 's/"//g'
Tweet #168 12
Tweet #274 72
Tweet #23 111
Tweet #376 63
...
```
Sorted (in python):
```
with open('big_bird_tweets.txt', 'r') as infile:
tweets = infile.readlines()
tweets.sort(key = lambda x: int(x.split()[1][1:]))
```
Gives:
```
Tweet #0 137
Tweet #1 80
Tweet #2 78
Tweet #3 71
Tweet #4 13
Tweet #5 10
Tweet #6 26
Tweet #7 10
Tweet #8 0
Tweet #9 0
Tweet #10 0
...
```
You'll notice that those decimal values [line up with the initial magic bytes of a PNG file](https://en.wikipedia.org/wiki/List_of_file_signatures).
Once sorted in order of tweet number, store the yyy value of each tweet in order as a left-padded hexadecimal number to length two.
Store the resultant hex string as binary in a `.png` file and open to see it;s a QR code.
Scan QR code using an [online reader](https://online-barcode-reader.inliteresearch.com/) for the flag.
[See full writeup for more details](https://bigpick.github.io/TodayILearned/articles/2020-06/nahamConCTF-writeups#big-bird)