Skip to content

Commit

Permalink
Added to the readme to explain binary encoding/decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
gracelombardi committed Oct 19, 2022
1 parent ce01813 commit 5f79d92
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 20 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CSEC 791 MS Project - Grace Lombardi

This project is my Computing Security Master Degree Project at Rochester Institute of Technology. The paper that corresponds with this code can
be found here: <Insert Link Here>

## Twitter

### Authentication
Expand All @@ -17,9 +20,15 @@ client_secret = "Example Client Secret"

### Binary Covert Channel
#### Encode
This script collects all the tweets of a given user, prompts for a message input, and converts that message into binary.
The script then unlikes a tweet to signify a 0 and likes a tweet to signify a 1 to send the message.
#### Decode
This script collects all the tweets of a given user then checks each tweet for if a certain user liked it. If the user
liked it the script adds a 1 to the binary string and if the user has not liked it the script adds a 0. It then converts
the binary string to ASCII and returns the hidden message.
### Plaintext Covert Channel
#### Encode

#### Decode

## Facebook
Expand Down Expand Up @@ -50,9 +59,20 @@ redirect_uri = "http://localhost:8080"
refresh_token = "Example Refresh Token"
```

#### Refresh Token
Run this script to create a refresh token. This script prompts the user for a client id and the client secret. It then
creates a link that needs to be clicked to retrieve the refresh token.

### Binary Covert Channel
#### Encode
This script prompts for a specific post id, prompts for a message input, and converts that message into binary.
The script then comments "I disagree!" to signify a 0, "I agree!" to signify a 1, and "Boom!" to signify the end of a
message.
#### Decode
This script collects all the comments on a specific post then checks each comment for its value. If the comment is "I
disagree!" the script will add a 0 to the binary string, if it is "I agree!" the script will add a 1 to the binary
string, and if it is "Boom!" the script will add a 9 to the binary string to signify the end of the message.
The script then converts the binary string to ASCII and returns the hidden message.
### Plaintext Covert Channel
#### Encode
#### Decode
Expand All @@ -68,7 +88,14 @@ token = "Example Token"

### Binary Covert Channel
#### Encode
This script collects the most recent 500 messages in the general channel, prompts for a message input, and converts that
message into binary. The script then adds a thumbs down reaction to signify a 0 and adds a thumbs up emoji to signify a
1 to send the message.
#### Decode
This script collects the most recent 500 messages in the general channel then checks each message for if a certain user
added a thumbs up or thumbs down reaction. If the user added a thumbs up reaction the script adds a 1 to the binary
string and if the user added a thumbs down reaction the script adds a 0. It then converts the binary string to ASCII and
returns the hidden message.
### Plaintext Covert Channel
#### Encode
#### Decode
20 changes: 0 additions & 20 deletions reddit_encode_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,6 @@ def convert_to_binary(chars):
return binary


def upvote_comment(reddit, comment_id):
"""
This function upvotes a specific comment based on the comment id.
"""
comment = reddit.comment(comment_id)
print("Score before upvoting : " + str(comment.score))
comment.upvote()
print("Score after upvoting : " + str(comment.score))


def downvote_comment(reddit, comment_id):
"""
This function downvotes a specific comment based on the comment id.
"""
comment = reddit.comment(comment_id)
print("Score before downvoting : " + str(comment.score))
comment.downvote()
print("Score after downvoting : " + str(comment.score))


def main():
"""
This is the main encoding function.
Expand Down

0 comments on commit 5f79d92

Please sign in to comment.