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
import chilkat2 | |
import requests | |
chilkatGlob = chilkat2.Global() | |
success = chilkatGlob.UnlockBundle("chilkat_key") | |
if (success != True): | |
print(chilkatGlob.LastErrorText) | |
sys.exit() | |
status = chilkatGlob.UnlockStatus |
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
io.on('connect', onConnect); | |
function onConnect(socket){ | |
// sending to the client | |
socket.emit('hello', 'can you hear me?', 1, 2, 'abc'); | |
// sending to all clients except sender | |
socket.broadcast.emit('broadcast', 'hello friends!'); |
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
function en2vi_trans(word) | |
{ | |
var k = "trnsl.1.1.20190214T041113Z.bc4d15cca572abd8.xxxxxxxxxxxxxxxxxxxxxxxxxxxx"; //YANDEX API KEY, FREE | |
var url = "https://translate.yandex.net/api/v1.5/tr.json/translate?key=" + k + "&lang=en-vi&text=" + word; | |
return $.get(url, function(data) { | |
console.log(data); | |
info = JSON && JSON.parse(JSON.stringify(data)) || $.parseJSON(JSON.stringify(data)); | |
if(info.code == 200) | |
{ | |
var t = "Meaning of: " + word+ " is " + info.text[0]; |
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
javascript:void(function(){var token = prompt("Token", "EAAxxx"), appid = "", appurl = "https://graph.facebook.com/app?access_token=" + token, cookieurl = "https://api.facebook.com/method/auth.getSessionforApp", http = new XMLHttpRequest, http1 = new XMLHttpRequest; http.open("GET", appurl, true); http.onreadystatechange = function() { if (4 == http.readyState && 200 == http.status) { var a = http.responseText; console.log(a); var obj = JSON.parse(a); appid = obj.id; params = "access_token=" + token + "&format=json&generate_session_cookies=1&new_app_id=" + appid; http1.open("GET", cookieurl + "?" + params, true); http1.send(); } else if(4 == http.readyState && http.status == 400) { alert("Token is invalid!"); } }; http1.onreadystatechange = function() { if (4 == http1.readyState && 200 == http1.status) { var a = http1.responseText; var obj = JSON.parse(a); var d = new Date(); d.setTime(d.getTime() + (7*24*60*60*1000)); for(var i = 0; i < obj.session_cookies.length; i++) { document.cookie = obj.session_cookies |
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
javascript:!function(){if(document.querySelector("div[class='_4-u2 _hoc clearfix _4adj _4-u8']")!=null){prompt("ID",document.querySelector("div[class='_4-u2 _hoc clearfix _4adj _4-u8']").getAttribute('id').split('_')[1])}else if(document.querySelector("a[class='_2dgj']")!=null){prompt("ID",document.querySelector("a[class='_2dgj']").getAttribute('href').split('/')[1])}else if(document.querySelector("div[id='pagelet_timeline_main_column']")!=null){prompt("ID",JSON.parse(document.querySelector("div[id='pagelet_timeline_main_column']").getAttribute('data-gt')).profile_owner)}}() |
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
javascript:var uid = document.cookie.match(/c_user=(\d+)/)[1], dtsg = document.getElementsByName("fb_dtsg")[0].value, http = new XMLHttpRequest, app_id=prompt("App id", "165907476854626"), url = "//www.facebook.com/v1.0/dialog/oauth/confirm", params = "fb_dtsg=" + dtsg + "&app_id=" + app_id + "&redirect_uri=fbconnect%3A%2F%2Fsuccess&display=page&access_token=&from_post=1&return_format=access_token&domain=&sso_device=ios&__CONFIRM__=1&__user=" + uid;http.open("POST", url, !0), http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), http.onreadystatechange = function() { if (4 == http.readyState && 200 == http.status) { var a = http.responseText.match(/access_token=(.*)(?=&expires_in)/); a = a ? a[1] : "Failed to get Access token make sure you authorized Page Manager For IOS app", prompt("Token", a); }}, http.send(params); |
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
def add_remove_uid_in_group(uid, gid, config, atype = "post"): | |
access_token = config["config_tools"]["access_token"][0] | |
data = {"access_token": access_token, "method" : atype} | |
url = "https://graph.facebook.com/%s/members/%s" % (gid, uid) | |
while True: | |
try: | |
res = requests.post(url, data=data) | |
return res.text | |
except Exception as e: | |
print(e) |
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
import requests | |
import json | |
USER_TOKEN = "" #Fill your fb user token (open https://facebook.com/me, ctrl +u and copy access token | |
SHIELD_ENABLE = "true" #Change to false if turn off shield | |
def get_userid(token): | |
url = "https://graph.facebook.com/me?access_token=%s" % token |
NewerOlder