Skip to content

Instantly share code, notes, and snippets.

@rajput-hemant
Created June 25, 2022 22:50
Show Gist options
  • Save rajput-hemant/09daa38be2f00d06dae7f9cf7d06da67 to your computer and use it in GitHub Desktop.
Save rajput-hemant/09daa38be2f00d06dae7f9cf7d06da67 to your computer and use it in GitHub Desktop.

Mega Import Bypass

Steps

  • Add an Extensions in the any Chromium based browser: Tampermonkey - Chrome Web Store

  • Now click on the extension and select create a new script as follow:

  • Copy the code/script & replace/paste it in the “New userscript” file & save the file with CTRL+S or from the file menu.

  • Open the Mega sign-up/login page & create A new account with the mail-id you just created or log in to your MEGA account if you have one already.

If you don’t want to use your own e-mail then create a new one, you can use this to create temp email otherwise, sign-up/log-in with your regular mail-id.

IMPORTANT NOTE: If you are using your old account, there should be some storage free in your MEGA drive otherwise import will not work.

  • Open the MEGA link after you have successfully logged in to MEGA.

  • Click this button

Note: After this, it will take a few minutes to import. After this import, you can’t import anything else as the drive will be full.

Once its done help others too, Emjoy✌🏻

Now your account storage capacity is 20 GBs but you are storing 13 TBs. Now this is called Over the limit Import. Mega allows this Over the limit Import for 30 days, which means after 30 days Mega will delete your files.

So before 30 days create a new account. Now get the shareable link of the 13 TB folder from the first account and use that shareable link and the method of bypassing import limits mentioned above to import the 13 TB folder to your new account, after importing delete the 13 TB folder from the first account. Again before 30 days get the shareable link from the second account and import to first account and delete the folder from second account. You have to repeat this process every 30 days.

This process may seem boring but when you are getting free courses worth lakhs of rupees, you have to do this much work.

Script

var _____WB$wombat$assign$function_____ = function (name) {
	return (
		(self._wb_wombat &&
			self._wb_wombat.local_init &&
			self._wb_wombat.local_init(name)) ||
		self[name]
	);
};
if (!self.__WB_pmw) {
	self.__WB_pmw = function (obj) {
		this.__WB_source = obj;
		return this;
	};
}
{
	let window = _____WB$wombat$assign$function_____("window");
	let self = _____WB$wombat$assign$function_____("self");
	let document = _____WB$wombat$assign$function_____("document");
	let location = _____WB$wombat$assign$function_____("location");
	let top = _____WB$wombat$assign$function_____("top");
	let parent = _____WB$wombat$assign$function_____("parent");
	let frames = _____WB$wombat$assign$function_____("frames");
	let opener = _____WB$wombat$assign$function_____("opener");

	// ==UserScript==
	// @name         MEGA.nz Ultimately Import
	// @name:zh-TW   MEGA.nz Ultimately Import / 繞過MEGA.nz網頁版導入大小限制
	// @name:zh-CN   MEGA.nz Ultimately Import / 绕过MEGA.nz网页版导入大小限制
	// @namespace    com.dogkiller87
	// @version      0.1
	// @description  Bypass import limit on Mega Web client & remove warning about the space usage
	// @description:zh-TW  去除導入超過容量大小的限制
	// @description:zh-CN  去除导入超过容量大小的限制
	// @author       d0gkiller87
	// @match        chrome-extension://bigefpfhnfcobdlfbedofhhaibnlghod/*
	// @match        http://mega.co.nz/*
	// @match        http://mega.io/*
	// @match        http://mega.is/*
	// @match        http://mega.nz/*
	// @match        https://mega.co.nz/*
	// @match        https://mega.io/*
	// @match        https://mega.is/*
	// @match        https://mega.nz/*
	// @icon         https://mega.nz/favicon.ico?v=3
	// @run-at       document-end
	// @grant        none
	// ==/UserScript==

	(function () {
		"use strict";
		// Reference [Augular loaded detect]: https://stackoverflow.com/a/31970556/9182265
		var initWatcher = setInterval(function () {
			if (window.MegaUtils) {
				clearInterval(initWatcher);
				hookImport();
				hookFull();
				console.info("FUNtions Hooked!");
			}
		}, 500);
	})();

	var hookImport = function () {
		MegaUtils.prototype.checkGoingOverStorageQuota = function (opSize) {
			var promise = new MegaPromise();
			loadingDialog.pshow();

			M.getStorageQuota()
				.always(function () {
					loadingDialog.phide();
				})
				.fail(promise.reject.bind(promise))
				.done(function (data) {
					/*
            if (opSize === -1) {
                opSize = data.mstrg;
            }

            if (opSize > data.mstrg - data.cstrg) {
                var options = {custom: 1, title: l[882], body: l[16927]};

                M.showOverStorageQuota(data, options)
                    .always(function() {
                    promise.reject();
                });
            }
            else {
            */
					promise.resolve();
				});
			return promise;
		};
	};

	var hookFull = function () {
		FileManager.prototype.showOverStorageQuota = null;
	};
}
/*
     FILE ARCHIVED ON 21:57:12 Apr 28, 2021 AND RETRIEVED FROM THE
     INTERNET ARCHIVE ON 20:17:12 Jun 18, 2022.
     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.

     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
     SECTION 108(a)(3)).
*/
/*
playback timings (ms):
  captures_list: 116.91
  exclusion.robots: 0.092
  exclusion.robots.policy: 0.086
  RedisCDXSource: 6.202
  esindex: 0.007
  LoadShardBlock: 85.066 (3)
  PetaboxLoader3.datanode: 73.493 (4)
  CDXLines.iter: 22.998 (3)
  load_resource: 93.924
  PetaboxLoader3.resolve: 56.368
*/
@Batista990904
Copy link

Working in 2024 ?

@megastrer
Copy link

still working??

@Jason8980
Copy link

Jason8980 commented Feb 19, 2025

Hell....no!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment