Difference between revisions of "Widget:NTLMgenerator"
(create NTLM widget (attempt)) |
m (fixed event handler) |
||
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> |
+ | '''NTLM hash generator''' | ||
+ | (note that there is no roundtrip involved, hash is generated client-side using utf8-to-utf16 little endian and md4 hash) | ||
+ | <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 40: | ||
} | } | ||
− | function generateNTLM() | + | function generateNTLM( _event ) |
{ | { | ||
+ | if ( !_event ) | ||
+ | _event = window.event; | ||
console.log( arguments, this ); | console.log( arguments, this ); | ||
− | document.getElementById( "NTLM" ).value = md4( encodeUTF16LE( | + | document.getElementById( "NTLM" ).value = md4( encodeUTF16LE( _event.target.value ) ); |
} | } | ||
Revision as of 08:29, 20 April 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.