/instagram_unfollow_check

An app to check on instagram, who unfollowed you, your followers, your followings, who is not following back.

Primary LanguagePython

Instagram Unfollowers

Find when someone unfollows you on instagram. Make only meaningful connections instead of fake followers.

An app to check on instagram, who unfollowed you, your followers, your followings, who is not following back.

Install

  • Clone this repo.
  • Execute pip install -r requirements.txt in root directory of cloned repo to install dependencies.
  • You will need to have installed Microsoft Visual C++ Build Tools ^14.x on Windows for pycryptodome to install.

Run

Manually

python app.py

Via Docker

....

Client Server Communication

  • All requests from client should be sent in POST method.
  • At the first instance of client, the client should send relevant variables of Diffie-Hellman Method and a unique id (e.g. uuid) to domain.name/establishencryption. The server will create DH key and store it with the reference of unique id received from client. It will then send the relevant variable of DH method to client so that client can create and store the key as well. See establishencryption function in app.py and generate_exchange_DH_key function in client/js/custom.js to get the idea.
  • The client should send its unique id created in first instance to domain.name/confirmkeyexchange to confirm that server has stored the key.
  • In future requests, the client will encrypt the password to be sent with the secret key generated via DH Method and will send its unique id with every request. The server will decrypt the password with stored secret key referenced via unique client id. See decrypt_data function in app.py and encrypt_data function in client/js/custom.js to get the idea.
  • All other endpoints will receive username, password(encrypted with DH key), _ID(unique id of client) and with the addition of other_user_id(id of the user to follow/unfollow) for follow and unfollow endpoints.
  • A web based client example is in client directory. See client/js/custom.js to get the idea.

Endpoints

domain.name/establishencryption

exchange secret key via Diffie-Hellman Method.

receives _N, _G, _X and _ID(client specific id generated by client) variables in formdata. See establishencryption function in app.py and generate_exchange_DH_key function in client/js/custom.js to get the idea.

domain.name/confirmkeyexchange

confirms whether the key has been exchanged or not.

receives _ID(client specific id) variables in formdata.

domain.name/login

logs the user in and saves the cookie file if does not exist before.

receives username, password and _ID(client specific id) variables in formdata.

domain.name/getcurrentuser

get currently logged in user's data.

receives username, password and _ID(client specific id) variables in formdata.

domain.name/followers

get followers list

receives username, password and _ID(client specific id) variables in formdata.

domain.name/following

get following list

receives username, password and _ID(client specific id) variables in formdata.

domain.name/unfollowers

get unfollowers list

receives username, password and _ID(client specific id) variables in formdata.

domain.name/follow

follow a user

receives username, password, other_user_id(id of the user to follow) and _ID(client specific id) variables in formdata.

domain.name/unfollow

unfollow a user

receives username, password, other_user_id(id of the user to unfollow) and _ID(client specific id) variables in formdata.

domain.name/reset

reset unfollowers list

receives username, password, and _ID(client specific id) variables in formdata.

domain.name/logout

logout from current device

receives username, password, and _ID(client specific id) variables in formdata.

domain.name/completelogout

logout and delete holding user data from server

receives username, password, and _ID(client specific id) variables in formdata.


References/Credits

instagram private api link

https://github.com/ping/instagram_private_api