No need to add reference to execute JS, publish without DLL, example: QQMD5 qqgtk 13-bit timestamp random number

Source: Internet
Author: User

Javascriptdemo.rar

I write post often encounter with JS to encrypt some sites, and then do not want to use C # rewrite.
In Baidu and the forum to find the JS execution is not 64 bit does not support is to bring a DLL God horse. Very annoying.
And then I wrote a no need to bring a DLL. and support all systems Yo (64-bit also) (Server 2003 multi-threading POST1 months did not crash)

<ignore_js_op>



First, a 13-bit timestamp is believed to play post is more common, such as:1410106357535

[C #]Plain Text view copy code
Type obj = Type.gettypefromprogid ("ScriptControl");
if (obj = = null) return; Single? I can't find the object.
Object ScriptControl = Activator.CreateInstance (obj);
Obj. InvokeMember ("Language", BindingFlags.SetProperty, NULL, ScriptControl, new object[] {"JScript"});
String js = "function time () {return new Date (). GetTime ()}";
Obj. InvokeMember ("Addcode", BindingFlags.InvokeMethod, NULL, ScriptControl, new object[] {JS});
String str = obj. InvokeMember ("Eval", BindingFlags.InvokeMethod, NULL, ScriptControl, new object[] {"Time ()"}). ToString ();
TextBox1.Text = str;



Continue to take random numbers such as:0.0117551307930485

[C #]Plain Text view copy code
Type obj = Type.gettypefromprogid ("ScriptControl");
if (obj = = null) return; Single? I can't find the object.
Object ScriptControl = Activator.CreateInstance (obj);
Obj. InvokeMember ("Language", BindingFlags.SetProperty, NULL, ScriptControl, new object[] {"JScript"});
String js = "function random () {return math.random ()}";
Obj. InvokeMember ("Addcode", BindingFlags.InvokeMethod, NULL, ScriptControl, new object[] {JS});
String str = obj. InvokeMember ("Eval", BindingFlags.InvokeMethod, NULL, ScriptControl, new object[] {"Random ()"}). ToString ();
TextBox1.Text = str;



Continue to evaluate an expression such as: expression:(5*10-2*10)/2 results for

[C #]Plain Text view copy code
Type obj = Type.gettypefromprogid ("ScriptControl");
if (obj = = null) return; Single? I can't find the object.
Object ScriptControl = Activator.CreateInstance (obj);
Obj. InvokeMember ("Language", BindingFlags.SetProperty, NULL, ScriptControl, new object[] {"JScript"});
String str = obj. InvokeMember ("Eval", BindingFlags.InvokeMethod, NULL, ScriptControl, new object[] {"(5*10-2*10)/2"}). ToString ();
TextBox1.Text = "(5*10-2*10)/2=" + str;



Continue to the GTK + QQ space, such as:193432059

[C #]Plain Text view copy code
StringBuilder sb = new StringBuilder ();
Sb. Append ("function getgtk (str) {");
Sb. Append ("var hash = 5381;");
Sb. Append ("for (var i = 0,");
Sb. Append ("len = str.length; i < Len; ++i) {");
Sb. Append ("hash + = (hash << 5) + Str.charat (i). charCodeAt ();");
Sb. Append ("}");
Sb. Append ("return hash & 0x7fffffff;");
Sb. Append ("}");

Type obj = Type.gettypefromprogid ("ScriptControl");
if (obj = = null) return; Single? I can't find the object.
Object ScriptControl = Activator.CreateInstance (obj);
Obj. InvokeMember ("Language", BindingFlags.SetProperty, NULL, ScriptControl, new object[] {"JScript"});
Obj. InvokeMember ("Addcode", BindingFlags.InvokeMethod, NULL, ScriptControl, new object[] {sb. ToString ()});
String str = obj. InvokeMember ("Eval", BindingFlags.InvokeMethod, NULL, ScriptControl, new object[] {"GETGTK (\" 123\ ")"}). ToString ();
TextBox1.Text = str;

No need to add reference to execute JS, publish without DLL, example: QQMD5 qqgtk 13-bit timestamp random number

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.