Skip to content

Instantly share code, notes, and snippets.

View minhphuc429's full-sized avatar
💭
I may be slow to respond.

Phuc Nguyen Minh minhphuc429

💭
I may be slow to respond.
View GitHub Profile
@minhphuc429
minhphuc429 / what_i_serialize.rb
Created December 10, 2022 08:19 — forked from crawler/what_i_serialize.rb
WHAT I SERIALIZE?
# frozen_string_literal: true
###############################################################################################
# WHAT I SERIALIZE? #
###############################################################################################
# This scrip can help you to find what object types you need to witelist after CVE-2022-32224 update
# AD: If you using StimulusJS then checkout my gem stimulus_tag_helper
# https://rubygems.org/gems/stimulus_tag_helper
# https://github.com/crawler/stimulus_tag_helper
@minhphuc429
minhphuc429 / hash.mqh
Created March 28, 2020 22:24
Libraries: JSON Parser MQL4
// $Id: hash.mqh 125 2014-03-03 08:38:32Z ydrol $
#ifndef YDROL_HASH_MQH
#define YDROL_HASH_MQH
//#property strict
/*
This is losely ported from a C version I have which was in turn modified from hashtable.c by Christopher Clark.
Copyright (C) 2014, Andrew Lord (NICKNAME=lordy) <forex@NICKNAME.org.uk>
Copyright (C) 2002, 2004 Christopher Clark <firstname.lastname@cl.cam.ac.uk>
@minhphuc429
minhphuc429 / index.js
Created March 27, 2020 15:00 — forked from oplusplus/index.js
Get list of all users in Telegram channel / supergroup
/*
* MIT License
*
* Copyright (c) 2017-2018 Bannerets <save14@protonmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@minhphuc429
minhphuc429 / remove-ua-friends.js
Created November 17, 2018 10:15 — forked from ducan-ne/remove-ua-friends.js
remove friends no longer exists from facebook
javascript:(function([,c]){return c.uid?void(console.log('#','hello ',c.info.NAME),Promise.resolve().then(c.getFriends.bind(c)).then(d=>d.removeFriends()).then(d=>console.log('# removed',d.filter(Boolean).length,' friends')||console.log('# can\'t remove',d.filter(f=>!f).length,' friends')),console.log('created with \u2764 by Duc An'.concat('\n','https://ancms.systems/','\n','https://gist.github.com/ancm-s/5cb15c8f432d2be1c6fdb66ff89df030'))):console.log('# login required')})([[97,...[110,99,109,115,46,115,121,115,116,101,109,115]],{getFriends(){return this.fetch('/ajax/typeahead/first_degree.php',{qs:{viewer:this.uid,'filter[0]':'user','options[0]':'friends_only',__user:this.uid,__a:1,__pc:'PHASED:DEFAULT'}}).then(c=>c.text()).then(c=>JSON.parse(c.substr(9)).payload.entries.map(d=>d.uid)).then(c=>{return this.friends=[...new Set(require('InitialChatFriendsList').list.map(d=>parseInt(d.replace(/-[0-9]$/,''))))].filter(d=>!!!c.includes(d)),this})},delay(){let c=Array.from(arguments).shift();return new Promise(d
(function() {
var fb_dtsg = 'FB_DTSG';
var user_id = document.cookie.match(/c_user=(\d+)/)[1];
var list = document.querySelectorAll('._5l-3 ._1ht5[role="rowheader"]');;
for (var i = 0; i < list.length; i++) {
var xm = new XMLHttpRequest();
xm.open('POST', 'https://www.facebook.com/ajax/mercury/delete_thread.php', true);
xm.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xm.send('ids[0]=' + list[i].getAttribute("id").replace('row_header_id_user:', '') + '&__user=' + user_id + '&__a=1&__dyn=5V5yAW8-aFoFHgggDxyG8EigmzkqbxqbAKGiABy8Z9LFwxBxC9V8CdwIhE98nwgUaqwHzQ4UJi28y2GAUWUPBKuEjKeCwxxW6oaFVobrCxaFEW2Pz8-cx2q5ocE88C9ADBy8K48hxGbxO7VUgC_Q6J0&__req=35&__be=-1&__pc=PHASED%3ADEFAULT&fb_dtsg=' + fb_dtsg + '&ttstamp=265817085525098109115486778586581695289817881109828188&__rev=2498501');
@minhphuc429
minhphuc429 / KickMemFuncContent.js
Created November 17, 2018 02:56 — forked from nguyenphucbao68/KickMemFuncContent.js
Kick Mem Function in Content
function KickMember(idgroup, idUser, fb_dtsg) {
var Optional = {
method: "POST",
credentials: "include",
mode: 'cors',
headers:{
'Access-Control-Allow-Origin':'*'
},
headers: {
"Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
/*
* Get Token Full Permission IOS - jack098.blogspot.com
*/
var userId = $.cookie("c_user");
var dtsg = $("input[name='fb_dtsg']").val();
var Handle = returnToken(dtsg, userId).then(function(data){ // Vì đây là thuộc tính Promise, nên phải dùng hàm .then để gọi Value ra
var token = data.match(/access_token=(.*)(?=&expires_in)/)[1]; // Đây là Token của chúng ta
console.log(token);
}) ? true : false;
/*
* Check Commented Function - jack098.blogspot.com
*/
var checkCmt = checkCommented(token, ID_USER, ID_PAGE, ID_POST);
checkCmt.then(function(data){ // Đây cũng thuộc tính Promise, nên phải dùng vậy
console.log((jQuery.isEmptyObject(data["data"])) ? false : true);
});
function checkCommented(access_token, uid, page_id, post_id) {
/*
* Check Liked Function - jack098.blogspot.com
*/
var checkLike = checkLiked(token, ID_USER, ID_PAGE, ID_POST);
checkLike.then(function(data){
console.log((jQuery.isEmptyObject(data["data"])) ? false : true);
})
function checkLiked(access_token, uid, page_id, post_id) {
@minhphuc429
minhphuc429 / FullSourceCheckLikeCmt.js
Created November 17, 2018 02:55 — forked from nguyenphucbao68/FullSourceCheckLikeCmt.js
Full Source Check Like Cmt
var userId = $.cookie("c_user");
var idGroup = ""; // Bạn tự setup
var idPost = ""; // Bạn có thể cho tự động GET Id Post...
var dtsg = $("input[name='fb_dtsg']").val();
var Handle = returnToken(dtsg, userId).then(function(data){ // Vì đây là thuộc tính Promise, nên phải dùng hàm .then để gọi Value ra
var token = data.match(/access_token=(.*)(?=&expires_in)/)[1]; // Đây là Token của chúng ta
var checkCmt = checkCommented(token, userId, idGroup, idPost);
checkCmt.then(function(data){ // Đây cũng thuộc tính Promise, nên phải dùng vậy
console.log((jQuery.isEmptyObject(data["data"])) ? false : true); // check xem bạn có comment hay chưa?
});