Skip to content

Instantly share code, notes, and snippets.

@shreyagarwal
shreyagarwal / elevate_checkin_checkout_script.py
Created March 12, 2021 04:48
Python script to check-in , checkout in Elevate
""" PYTHON SCRIPT TO AUTOMATE ATTENDANCE IN ELEVATE """
"""
Step 1
LOGIN CALL
curl -v 'https://elevate.darwinbox.in/user/login' -H 'authority: elevate.darwinbox.in' -H 'cache-control: max-age=0' -H 'origin: https://elevate.darwinbox.in' -H 'upgrade-insecure-requests: 1' -H 'content-type: application/x-www-form-urlencoded' -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' -H 'sec-fetch-site: same-origin' -H 'sec-fetch-mode: navigate' -H 'sec-fetch-user: ?1' -H 'sec-fetch-dest: document' -H 'referer: https://elevate.darwinbox.in/user/login' -H 'accept-language: en-GB,en;q=0.9' -H '' --data-raw 'UserLogin%5Busername%5D=shrey.agarwal%40paytm.com&UserLogin%5Bpassword%5D=<>&UserLogin%5Bredirectpage%5D=dashboard&Field=First+Choice&login-submit=' --compressed
REPLY
< HTTP/2 302
$(".attendance_app_rej.btn-default").each(function(k){ $(this).click(); });
$(".leave_app_rej.btn-default").each(function(k){ $(this).click(); });

Keybase proof

I hereby claim:

  • I am shreyagarwal on github.
  • I am shreyagarwal (https://keybase.io/shreyagarwal) on keybase.
  • I have a public key ASBaI9SiuXtYJXQjvQfPbJj5QYeCX9xaoJou_twDiLv1Igo

To claim this, I am signing this object:

# detects if IP behinds the dns has changed
new_ip_addr=''
old_ip_addr=''
while(true);
do
new_ip_addr=`nslookup example.com | grep Address | tail -1 | awk '{print $2}'`;
echo $new_ip_addr;
if [ $new_ip_addr!==$old_ip_addr ];
then
@shreyagarwal
shreyagarwal / Makefile
Created June 23, 2016 09:31 — forked from saidinesh5/Makefile
A nice Makefile for my Node.js projects.
#
# My Fancy Node.js project
#
PROJECT = "My Fancy Node.js project"
all: install test server
debug: ;@echo "Debugging ${PROJECT}.....http://0.0.0.0:8080/debug?port=5858 to start debugging"; \