Advertisement
adminvietnam

tao5 page slll

Aug 16th, 2017
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. page_name = 'CaoPhuocdz';
  2. function loadCreatePage() {
  3. console.log('Lấy thông tin tạo page...');
  4. var i = Math.floor((Math.random() * 100000) + 1);
  5. var xhttp = new XMLHttpRequest();
  6. xhttp.onreadystatechange = function () {
  7. if (xhttp.status == 200 && xhttp.readyState == 4) {
  8. var data = xhttp.responseText;
  9. var getValue = data.match(/name="fb_dtsg" value="(.+?)" autocomplete="off"/g);
  10. var fb_dtsg = getValue[0].replace('name="fb_dtsg" value="', '');
  11. fb_dtsg = fb_dtsg.replace('" autocomplete="off"', '');
  12. var charset_test = '€,´,€,´,水,Д,Є';
  13. var super_category = 1016;
  14. var category = 2700;
  15. if(fb_dtsg == null) {
  16. console.log('Trống fb_dtsg');
  17. } else {
  18. console.log('Tạo page...');
  19. submitCreatePage(fb_dtsg, charset_test, super_category, category, i);
  20. }
  21. }
  22. };
  23. xhttp.open("GET", 'https://m.facebook.com/pages/create/?page_name=' + page_name +' '+ i + '&category=0&super_category=1016', true);
  24. xhttp.send();
  25. }
  26. function submitCreatePage(fb_dtsg, charset_test, super_category, category) {
  27. var i = Math.floor((Math.random() * 100000) + 1);
  28. var xhttp = new XMLHttpRequest();
  29. xhttp.onreadystatechange = function () {
  30. if (xhttp.status == 200 && xhttp.readyState == 4) {
  31. console.log('Skip step info page...');
  32. var url = xhttp.responseURL;
  33. skipStepSubmitInfoPage(url);
  34. }
  35. };
  36. xhttp.open("POST", 'https://m.facebook.com/pages/create/add/', true);
  37. xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  38. xhttp.send("fb_dtsg="+fb_dtsg+"&charset_test="+charset_test+"&page_name=" + page_name +" "+ i + "&super_category="+super_category+"&category="+category);
  39. }
  40. function skipStepSubmitInfoPage(url) {
  41. var xhttp = new XMLHttpRequest();
  42. xhttp.onreadystatechange = function () {
  43. if (xhttp.status == 200 && xhttp.readyState == 4) {
  44. skipStepSubmitInfoPage2(url + '&step=username&skip=true');
  45. }
  46. };
  47. xhttp.open("GET", url + '&step=about&skip=true', true);
  48. xhttp.send();
  49. }
  50. function skipStepSubmitInfoPage2(url) {
  51. var xhttp = new XMLHttpRequest();
  52. xhttp.onreadystatechange = function () {
  53. if (xhttp.status == 200 && xhttp.readyState == 4) {
  54. countDown();
  55. }
  56. };
  57. xhttp.open("GET", url, true);
  58. xhttp.send();
  59. }
  60. function countDown () {
  61. console.log('reload script...');
  62. var a = 40;
  63. var ITV = setInterval(function(){
  64. console.log('~ ' + a + 'giây');
  65. a--;
  66. if(a === 0) {
  67. clearInterval(ITV);
  68. loadCreatePage();
  69. }
  70. }, 1000);
  71. }
  72. loadCreatePage();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement