Megaupload auto-fill captcha

By Shn Last update May 23, 2009 — Installed 250,336 times.

Auto-download with XHR

in
Subscribe to Auto-download with XHR 5 posts, 3 voices



Avindra V.G. Scriptwright
FirefoxWindows

Hey Shaun,

Can you please copy + paste my code in a compatible implementation for this script?? It's amazing-- but XHR autodownload tops it all off.

The script I want you to copy from is: http://userscripts.org/scripts/review/43390

The two main things are cookie erasing (i.e., download as much as you want), and XMLHttprequest downloading.

Currently I've just overwritten your load_image function, used the title as a "status" center and it works pretty well:


function load_image(data)
  {

    function single(A) {return document.evaluate(A,document,null,9,null).singleNodeValue}
    var gif = new GIF();
    gif.from_array(data_array(data));
	document = unsafeWindow.document;
	const cooks = ["__utma", "__utmb", "__utmc", "__utmz", "mc_popt"];
	for(var i = cooks.length - 1; i>=0; --i)
		document.cookie = cooks[i] + "=" + ";domain=megaupload.com;expires=Thu, 01-Jan-1970 00:00:01 GMT";
GM_xmlhttpRequest({
	url : location.href,
	method : "POST",
	headers : {
		"Content-Type" : "application/x-www-form-urlencoded",
		"User-Agent" : "Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; InfoPath.2; MEGAUPLOAD 2.0)" // possible foreign hack
	},
	onload : function(A) {
		if(A.responseText.match(/oadlink"><a href="([^"]+)/)) {
			location.href=RegExp.$1;
			document.title = "Downloading...";
		} else {
			document.title = "Retrying..." + e;
			location.reload();
		}
	},
	data : "captchacode="+single("//input[@name='captchacode']").value +
           "&megavar="+single("//input[@name='megavar']").value +"&captcha=" + decode(gif)
});

  }

If you say yes, I can send you a draft of what I have in mind (Message center, xhr autodownload, xhr auto-try instead of reloading page).

What do you think?

 
Shn Script's Author
FirefoxMacintosh

Hi,
Sorry for the delay I only just read this. I'm a bit busy to add new features to the script at the moment. If you want to implement those ideas yourself (I don't really know what you mean by message centre) and fork the script you're welcome to or I can include changes in my script if you provide patches and credit you if you'd prefer (since that would be a lot easier to keep up to date if the captcha changes I suppose).

 
Avindra V.G. Scriptwright
FirefoxWindows

Hi Shaun, sorry for the delay in this as well, I'm busy as well at the moment. If you need me fast, email me (aavindraa@gmail.com). I wrote the script with a message center + auto download w/ XHR, and it is absolutely beautiful.

Basically, it cracks at the captcha over and over until it gets it, automatically, without ever refreshing the page.

(And I added my cookie eraser to allow more downloading :-))

Here's the sauce (set to expire in 3 days, if you don't catch it by then, I still have it):

http://pastebin.ca/1532232

Here's an install link:

http://pastebin.ca/raw/1532232#a.user.js

I also optimized parts of the code, and beautified the whitespace. Overall, it is smaller in filesize now.

 
malkocoglu User
FirefoxWindows

@The two main things are cookie erasing (i.e., download as much as you want)

avindra im using this script here ,i can download many at the same time but i have 2 issues.First i'd rather have a doqnload Q is this possible with this?

2nd one is after sometime it sez i exceeded the download limit i have to wait, ure cookie erasing option can it be added on this script?

thx

 
Avindra V.G. Scriptwright
FirefoxWindows

I have no idea what you wrote and I'm not going to bother to read it properly, but about a download queue: possible, but it'd have extremely hokey workarounds because of Greasemonkey's bullshit sandbox.

As for the exceeding bandwith, yes that can be overcome with my modified version.

@Shn: I uploaded the modded script here because many people are asking me to re-upload it:

http://userscripts.org/scripts/show/56989

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel