Coder Social home page Coder Social logo

instegogram's Introduction

Instegogram

Overview

Using Instagram and steganography as a way to transmit images encoded with text by hiding it in prevelant social media traffic.


### Basic Use Upload image with encoded text: ```python import instegogram instegogram.insta_upload(filepath='examples/piercing.jpg', uname='username', pword='password', message='examples/message.txt') ``` Download latest image and decode text: ```python instegogram.insta_download_latest(uname='username') ```

Do both to check that it works:

instegogram.insta_roundtrip(filepath='examples/piercing.jpg', uname='username', pword='password', message='examples/message.txt')

### Image Prep Image prep converts an image to square (not perserving aspect ratio) with a maximum size of 1080x1080, which is Instagram's max upload size. It also re-quantizes the image with Instagram's quantization table. This requires [ImageMagic](http://www.imagemagick.org/script/index.php). ```python from img_prep import img_prep img_prep.prep_img(filepath='examples/piercing.jpg') ```
### Stego The example stego technique in C is implemented and called via Python. If you have another method for encoding/decoding you can replace the `subprocess` calls in stego.py with your own.

To encode a text file into an image:

from stego import stego
stego.encode(filepath='examples/piercing.jpg', message='examples/message.txt')

To decode text from an image:

stego.deocde(filepath='download.jpg')

Note: Different images will have different capacities for encoding text. Try to select an image with high average texture in the luminance channel for the 8px by 8px blocks of the image. Or just trial and error until you find a good one (think lots of contrast and not computer generated)


### Instagram API Instagram is accessed via their API and scraping their website.

To upload an image:

from api_access import insta_access
insta_access.upload(filepath='examples/piercing.jpg', uname='username', pword='password')

To download the latest image:

insta_access.download(uname='username')

or a specific image (found via page source or other means):

insta_access.download(img_url='https://scontent-sjc2-1.cdninstagram.com/t51.2885-15/s1080x1080/e15/fr/12960199_1704537009805057_827148056_n.jpg')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.