Last active
January 20, 2017 13:58
-
-
Save minhanhhere/5fbd69b0f997c7d30bce to your computer and use it in GitHub Desktop.
hacklike.vn auto
This file contains hidden or 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
var url = ''; | |
if (location.href.indexOf('p=fb_subscribe') > 0) { | |
url = 'http://hacklike.vn/phan-loai-cnang/modules/fb_subscribe/process.php'; | |
} | |
if (location.href.indexOf('p=facebook') > 0) { | |
url = 'http://hacklike.vn/phan-loai-cnang/modules/facebook/process.php'; | |
} | |
if (location.href.indexOf('p=ysub') > 0) { | |
url = 'http://hacklike.vn/phan-loai-cnang/modules/ysub/process.php'; | |
} | |
var selector; | |
var total = 0; | |
var current = 0; | |
var id = 0; | |
var like = 0; | |
function doFollow() { | |
if (current == total) { | |
console.debug('finish!!!!!!!!!!!!!!!!!!!!!'); | |
location.reload(); | |
return; | |
} | |
id = $(selector)[current].id; | |
like = Math.round(Math.random()*1000) + 100; | |
if (location.href.indexOf('p=fb_subscribe') > 0) { | |
var img = $(selector).eq(current).find('img').first().attr('src'); | |
var fbid = getFbId(img); | |
$.post(url, {get: 1, url: fbid, pid: id, fb: like}); | |
} | |
if (location.href.indexOf('p=facebook') > 0) { | |
$.post(url, {get: 1, pid: id, fb: like}); | |
} | |
if (location.href.indexOf('p=ysub') > 0) { | |
$.post(url, {get: 1, pid: id, sub: like}); | |
} | |
console.debug('follow id=' + id + ' like=' + like); | |
setTimeout(returnFollow, 3000); | |
} | |
function returnFollow() { | |
if (location.href.indexOf('p=fb_subscribe') > 0) { | |
$.post(url, {id: id, fb: like+1}); | |
} | |
if (location.href.indexOf('p=facebook') > 0) { | |
$.post(url, {type: 1, id: id, fb: like+1}); | |
} | |
if (location.href.indexOf('p=ysub') > 0) { | |
$.post(url, {id: id, sub: like+1}); | |
} | |
current++; | |
console.debug('done id=' + id + ' like=' + (like+1) + ' nextIndex=' + current); | |
setTimeout(doFollow, 3000); | |
} | |
function prepareFB() { | |
var toRun = false; | |
toRun = toRun || (location.href.indexOf('p=fb_subscribe') > 0); | |
toRun = toRun || (location.href.indexOf('p=facebook') > 0); | |
toRun = toRun || (location.href.indexOf('p=ysub') > 0); | |
if (!toRun) { | |
return; | |
} | |
selector = '.follow_vip'; | |
total = $(selector).length; | |
if (total === 0) { | |
selector = '.follow'; | |
total = $(selector).length; | |
} | |
console.debug('prepareFB(): url ' + url); | |
console.debug('prepareFB(): total ' + selector + '=' + total); | |
if (total !== 0) { | |
doFollow(); | |
} | |
} | |
function getFbId(img) { | |
return img.replace(/\D/g,''); | |
} | |
//prepareFB(); | |
$( document ).ready(prepareFB); | |
// HACK SURF | |
(function() { | |
var url = 'http://hacklike.vn/phan-loai-cnang/modules/surf/process.php'; | |
var sid = 0; | |
function doSurf() { | |
if (location.href.indexOf('p=surf') > 0) { | |
$.post(url, {get: 1}, function(data) { | |
sid = JSON.parse(data).sid; | |
var cpc = JSON.parse(data).cpc; | |
console.debug('surf sid = ' + sid + ', cpc = ' + cpc); | |
setTimeout(returnSurf, 15500); | |
}); | |
} | |
} | |
function returnSurf() { | |
$.post(url, {sid: sid, complete: 1}, function() { | |
setTimeout(doSurf, 1000); | |
}); | |
} | |
doSurf(); | |
})(); |
This file contains hidden or 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
//INPUT YOUR POST ID HERE | |
var pageId = 1286823268063107; | |
var id = 1286828351395932; //https://www.facebook.com/funnypetsdemo/videos/1286828351395932/ | |
var wait = 720000; | |
var LIKE_MIN = 11; | |
var LIKE_MAX = 25; | |
var originalLike = 0; | |
var totalLike = 0; | |
var objectId = pageId + '_' + id; | |
var access_token = 'EAACEdEose0cBAA3XOd3zg6PTZBHcidlirsaYaI75ZBoI7C9vnUs6Y2ZAJs17mTWZA4B5g9Q9i8kWzOVZBRHQJyJVB9sZBtWYYrTYjVWw6ptC0EZAj1v228fZCni50KLyPYz2D6gpcKUJicLgJzO0bZCYTSHEkoFek9pcWIZAvKkoZCRxgZDZD'; | |
var countLikeApiURL = 'https://graph.facebook.com/v2.8/{objectId}/likes?summary=true&access_token=' + access_token; | |
countLikeApiURL = countLikeApiURL.replace('{objectId}', objectId); | |
function getRandomInt(min, max) { | |
min = Math.ceil(min); | |
max = Math.floor(max); | |
return Math.floor(Math.random() * (max - min)) + min; | |
} | |
function requestForLike() { | |
var nLike = getRandomInt(LIKE_MIN, LIKE_MAX); | |
console.debug('---------------------------------'); | |
console.debug('auto ' + nLike + ' like for post ' + id); | |
$.post('http://hacklike.vn/likes.php', { | |
postid: id, | |
like: nLike | |
}, function(data) { | |
console.debug(data); | |
$.get(countLikeApiURL, function(data2) { | |
var now = new Date().getTime(); | |
var next = now + wait; | |
var newTotalLike = data2.summary.total_count; | |
var delta = newTotalLike - totalLike; | |
totalLike = newTotalLike; | |
if (delta >= 0) { | |
delta = '+' + delta; | |
} | |
console.debug('total like: ' + newTotalLike + ' (' + delta + ')'); | |
console.debug('next run: ' + new Date(next)); | |
setTimeout(requestForLike, wait); | |
}); | |
$.get('http://hacklike.vn/phan-loai-cnang/uCoins.php', function(data) { | |
console.debug('coin left: ' + data); | |
}); | |
}); | |
} | |
$.get(countLikeApiURL, function(data) { | |
totalLike = data.summary.total_count; | |
originalLike = totalLike; | |
console.debug('--------- SCRIPT BEGIN! ---------'); | |
console.debug('ORIGINAL TOTAL LIKE: ' + originalLike); | |
console.debug('---------------------------------'); | |
requestForLike(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://chrome.google.com/webstore/detail/custom-javascript-for-web/poakhlngfciodnhlhhgnaaelnpjljija
auto_coins.js
for this page via the extensions and press save