Difference between revisions of "Widget:NTLMgenerator"
(create NTLM widget (attempt)) |
m (firefix) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
== Copy to your site == | == Copy to your site == | ||
To use this widget on your site, just install [http://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as '''{{FULLPAGENAME}}''' article. | To use this widget on your site, just install [http://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as '''{{FULLPAGENAME}}''' article. | ||
− | </noinclude><includeonly><script type="text/javascript"> | + | </noinclude><includeonly> |
+ | |||
+ | <b>NTLM hash generator</b><br/> | ||
+ | (note that there is no roundtrip involved, hash is generated client-side using utf8-to-utf16 little endian and md4 hash)<br/> | ||
+ | <script type="text/javascript"> | ||
/** | /** | ||
* [js-md4]{@link https://github.com/emn178/js-md4} | * [js-md4]{@link https://github.com/emn178/js-md4} | ||
Line 37: | Line 41: | ||
} | } | ||
− | function generateNTLM() | + | function generateNTLM( _event ) |
{ | { | ||
− | + | if ( !_event ) | |
− | document.getElementById( "NTLM" ).value = md4( encodeUTF16LE( | + | _event = window.event; |
+ | document.getElementById( "NTLM" ).value = md4( encodeUTF16LE( _event.target.value ) ); | ||
} | } | ||
Line 46: | Line 51: | ||
{ | { | ||
"use strict"; | "use strict"; | ||
− | document.write( '<input type="password" onchange="generateNTLM()" | + | document.write( '<input size="40" type="password" onchange="generateNTLM(event)" onkeyup="generateNTLM(event)" onpaste="generateNTLM(event)" /><br/><input size="40" type="text" readonly="readonly" id="NTLM" />' ); |
}( )); | }( )); | ||
</script> | </script> | ||
</includeonly> | </includeonly> |
Latest revision as of 15:36, 19 August 2018
This widget allows you to create an NTLM hash from a password (used in spacenet accounts)
Created by Xopr
Using this widget
To insert this widget, use the following code:
{{#widget:NTLMgenerator}}
This will give the following result:
NTLM hash generator
(note that there is no roundtrip involved, hash is generated client-side using utf8-to-utf16 little endian and md4 hash)
Copy to your site
To use this widget on your site, just install MediaWiki Widgets extension and copy full source code of this page to your wiki as Widget:NTLMgenerator article.