Created
January 27, 2019 19:45
-
-
Save chtzvt/89e1cc42e42de8f229d8ff51348ae753 to your computer and use it in GitHub Desktop.
l m a o
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import requests | |
import os, time | |
def get_token(): | |
url = 'https://app2.sli.do/api/v0.5/events/5a4dcc05-4c5c-41be-9ce1-0dd1c4dc77c4/auth' | |
headers = { | |
'origin': 'https://app2.sli.do', | |
'accept-encoding': 'gzip, deflate, br', | |
'accept-language': 'en-US,en;q=0.9', | |
'cookie': 'Slido.Privacy={"categories":["Nonessential","Essential"]};', | |
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3565.0 Safari/537.36', | |
'content-type': 'application/json;charset=UTF-8', | |
'accept': 'application/json, text/plain, */*', | |
'x-slidoapp-version': 'SlidoParticipantApp/3.40.0 (web)', | |
'cache-control': 'no-cache, no-store', | |
'authority': 'app2.sli.do', | |
'referer': 'https://app2.sli.do/event/7upmb5pa' | |
} | |
socks=dict(http='socks5://127.0.0.1:9050', https='socks5://127.0.0.1:9050') | |
return requests.post(url, headers=headers, proxies=socks, data="{}").json()["access_token"] | |
def send_like(id, token): | |
url = 'https://app2.sli.do/api/v0.5/events/803513/questions/' + id + '/like' | |
headers = { | |
'Content-Type': 'application/json;charset=UTF-8', | |
'Connection': 'keep-alive', | |
'Accept': 'application/json, text/plain, */*', | |
'Authorization': 'Bearer ' + token, | |
'Host': 'app2.sli.do', | |
'Accept-Language': 'en-us', | |
'Cache-Control': 'no-cache, no-store', | |
'Origin': 'https://app2.sli.do', | |
'Content-Length': '11', | |
'Accept-Encoding': 'br, gzip, deflate', | |
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.3 Safari/605.1.15', | |
'Referer': 'https://app2.sli.do/event/7upmb5pa/questions', | |
'DNT': '1', | |
'Cookie': 'Slido.Privacy={"categories":["Essential"]}; Slido.EventAuthTokens="5a4dcc05-4c5c-41be-9ce1-0dd1c4dc77c4,' + token + '"', | |
'X-Slidoapp-Version': 'SlidoParticipantApp/3.40.0 (web)', | |
} | |
payload = '{"score":1}' | |
socks=dict(http='socks5://127.0.0.1:9050', https='socks5://127.0.0.1:9050') | |
return requests.post(url, headers=headers, proxies=socks, data="{}").json() | |
""" | |
echo deb http://deb.torproject.org/torproject.org xenial main > /etc/apt/sources.list.d/tor.list | |
echo deb-src http://deb.torproject.org/torproject.org xenial main >> /etc/apt/sources.list.d/tor.list | |
gpg --keyserver keys.gnupg.net --recv 886DDD89 | |
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add - | |
apt update | |
apt install tor deb.torproject.org-keyring | |
*/2 * * * * killall -HUP tor | |
""" | |
while True: | |
print(repr(send_like('7665463', get_token()))) | |
time.sleep(2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment