Arcade Prehacks

Results 1 to 9 of 9

Thread: pc coding

  1. #1

    Join Date
    Jan 2012
    Posts
    4

    pc coding

    hello , i am tactcalplaya akaTACx aka (cd)justin(cd) im also known as justinmarma i used to come to this forum now that my pc is fixed ill be posting more about all kinds of coding (javascript/vbs/batch/c++/etc) or just giving advise abour hacking (i will not teach you how to do something bad. ) so just post a message here and if i can i wiil help you.
    ima try to put a sample .html javascript code into here if the forum will let me (just as a little present) save the file as calculater.html(pm me for more code...i think i have a more advaced calculater then this one)
    Code:
    <HEAD>
    
    <SCRIPT LANGUAGE="JavaScript">
    
    
    
    
    
    
    
    <!-- Begin
    function a_plus_b(form) {
    a=eval(form.a.value)
    b=eval(form.b.value)
    c=a+b
    form.ans.value = c
    }
    function a_minus_b(form) {
    a=eval(form.a.value)
    b=eval(form.b.value)
    c=a-b
    form.ans.value=c
    }
    function a_times_b(form) {
    a=eval(form.a.value)
    b=eval(form.b.value)
    c=a*b
    form.ans.value=c
    }
    function a_div_b(form) {
    a=eval(form.a.value)
    b=eval(form.b.value)
    c=a/b
    form.ans.value = c
    }
    function a_pow_b(form) {
    a=eval(form.a.value)
    b=eval(form.b.value)
    c=Math.pow(a, b)
    form.ans.value = c
    }
    // End -->
    </SCRIPT>
    
    
    
    <BODY>
    <CENTER>
    <FORM name="formx"><input type=text size=4 value=12 name="a"> 
    <input type="button" value="  +  " onClick="a_plus_b(this.form)">  
    <input type="button" value="  -  " onClick="a_minus_b(this.form)">  
    <input type="button" value="  x  " onClick="a_times_b(this.form)">  
    <input type="button" value="  /  " onClick="a_div_b(this.form)">  
    <input type="button" value="  ^  " onClick="a_pow_b(this.form)">  
    <input type="number" size=4 value=3 name="b"> = <input type "number" value=0 name="ans" size=9>
    </FORM>
    </CENTER>
    
    
    <center>
    <font face="arial, helvetica" size="-2">Free JavaScripts provided
    
    by tactcalplaya</a></font>
    if you want code for games...or things on hacking..or just plain cool codes..post here


    o and if there is any errors plz post the eror .and if you have any improved code plz post the entire code including the new parts of the code (obviously) to this forum.....if the update is worth using i will change my script to enclude the new script

  2. #2
    Senior Member
    Join Date
    Dec 2010
    Location
    stuff do-er
    Posts
    288

    Re: pc coding

    oh COOL CODES! gee thats just what I always wanted! Please teach us something bad!

  3. #3

    Join Date
    Jan 2012
    Posts
    4

    Re: pc coding

    LOL #1 i hope you arnt being sarcastic


    i know plenty of "bad" stuff (enough to get you in trouble ) but idk if i want to teach em. my pc is full of cool codes (some were script kiddied) but i edited them made em better. and for thoses who still go on xat chat....i even have a spambot thatll spam the chat with lots'o messages {i have manny more codes than that tho}

    im just letting you know .....im making a new webpage (offline one) that is going to include a clock a title a few links a encrypter cool stuf like that i will include more and more everyday (its a very basic website)

  4. #4
    Super Moderator ZuckeR's Avatar
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    1,595

    Re: pc coding

    Quote Originally Posted by tactcalplaya
    i will not teach you how to do something bad.
    You just did! First, just a little thing, HTML tags are written in lower case since years but well. The other thing is your use of eval() which is just evil! It should be parseFloat(), parseInt() or Number() as eval() should not be used as it interprets input as JavaScript and is a potential security issue. Also it makes your whole code pretty blown up with all these functions.

    One input field and one output could do the same as eval() does calculate stuff like "4+2+1+7*4" pretty well. And even without eval() you don't need as much functions. Here is an example that uses a second parameter to select the performed operation.
    Code:
    function calculate(form, operation)
    {
    	a = parseInt(form.a.value);
    	b = parseInt(form.b.value);
    
    	switch(operation)
    	{
    		case 1: c = a + b; break;
    		case 2: c = a - b; break;
    		case 3: c = a * b; break;
    		case 4: c = a / b; break;
    		case 5: c = Math.pow(a, b); break;
    	}
    	form.ans.value = c;
    }
    
    <input type="button" value="  +  " onClick="calculate(this.form, 1)">
    <input type="button" value="  -  " onClick="calculate(this.form, 2)">
    <input type="button" value="  x  " onClick="calculate(this.form, 3)">
    <input type="button" value="  /  " onClick="calculate(this.form, 4)">
    <input type="button" value="  ^  " onClick="calculate(this.form, 5)">

  5. #5
    Senior Member
    Join Date
    Jul 2008
    Location
    Finland
    Posts
    1,867

  6. #6
    Super Moderator ZuckeR's Avatar
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    1,595

    Re: pc coding

    Quote Originally Posted by jCuber
    So much for the script kiddie

  7. #7

    Join Date
    Jan 2012
    Posts
    4

    Re: pc coding

    Thanks for the fix on the errors. But when i say evil, I mean im not going to teach you how to write a virus..... Ad that link.... its a script kiddie..i can tell because im pretty shure i saw that code in a javascript opensorce website............. note: when posting fix in the errors plz post the entire new script because it takes forever to manually make each of the changes

  8. #8
    Senior Member
    Join Date
    Jul 2008
    Location
    Finland
    Posts
    1,867

    Re: pc coding

    Quote Originally Posted by tactcalplaya
    Ad that link.... its a script kiddie..i can tell because im pretty shure i saw that code in a javascript opensorce websites
    Oh-ho-ho..you're digging a grave for yourself

  9. #9

    Join Date
    Jan 2012
    Posts
    4

    Re: pc coding

    Orly??? ps. I HATE THE SOPA law

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •