Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    May 2013
    Posts
    26
    Thanks
    6
    Thanked 0 Times in 0 Posts

    USSD Sender Hacktool 1.1 (Finished script All by myself)

    Here is one of my latest Javascript projects.

    I was focusing in making it work, now that it's done, i'm looking for any comment in how to improve the code.

    Note: The apipass isn't correct to avoid money losses

    Code:
    <HTML><HEAD><TITLE>USSD Sender Hacktool 1.1</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
    </HEAD>
    <BODY bgColor=#5e717f>
    <BR>
    <TABLE style="BACKGROUND: #bed5e2;" cellSpacing=0 cellPadding=0 align=center>
      <TBODY>
      <TR>
        <TD style="BORDER-RIGHT: #d8d8d8 0.75pt solid; PADDING-RIGHT: 6pt; BORDER-TOP: #d8d8d8 0.75pt solid; PADDING-LEFT: 6pt; BACKGROUND: #567280; PADDING-BOTTOM: 6pt; BORDER-LEFT: #d8d8d8 0.75pt solid; WIDTH: 517.5pt; PADDING-TOP: 6pt; ">
          <P>
    	<B><SPAN style="FONT-SIZE: 10pt; COLOR: #ff9900; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">USSD Sender Hacktool 1.1</SPAN></B>
          </P></TD></TR><TR></TD></TR><TR>
          <TD style="PADDING-RIGHT: 6pt; PADDING-LEFT: 6pt; PADDING-BOTTOM: 6pt; PADDING-TOP: 6pt"><BR>
    <center><table BORDER=0 CELLPADDING=3 CELLSPACING=0><tr><td>
        <p style="margin:0cm;margin-bottom:.0001pt;line-height:115%">
        <span style="font-size:9.0pt;font-family:Verdana;">Send USSD Alerts to any GSM Mobile. <br><br></p></td></tr></table>
    	<script type="text/javascript">
    
    		function valid(f) {
    		!(/^[A-z—Ů0-9-\s]*$/i).test(f.value)?f.value = f.value.replace(/[^A-z—Ů0-9-\s]/ig,''):null;
    		} 
    
    		function isNumber(event) {
    		  if (event) {
    		    var charCode = (event.which) ? event.which : event.keyCode;
    		    if (charCode != 190 && charCode > 31 && 
    		       (charCode < 48 || charCode > 57) && 
    		       (charCode < 96 || charCode > 105) && 
    		       (charCode < 37 || charCode > 40) && 
    		        charCode != 110 && charCode != 8 && charCode != 46 )
    		       return false;
    		  }
    		  return true;
    		}
    
    		ussd = function() {
    			var number_id = escape(document.getElementById('number_id').value);
    			if(number_id == "") {
    				alert('Type a valid mobile number!');
    				return false;
    			}
    			var message_id = escape(document.getElementById('message_id').value);
    			if(message_id == "") {
    				alert('Type the message to send!');
    				return false;
    			}
                document.write("<HTML><HEAD><TITLE>USSD Sender Hacktool 1.1</TITLE><META http-equiv=Content-Type content='text/html; charset=iso-8859-1'></HEAD><BODY bgColor=#5e717f><BR><TABLE style='BACKGROUND: #bed5e2;' cellSpacing=0 cellPadding=0 align=center><TBODY><TR>    <TD style='BORDER-RIGHT: #d8d8d8 0.75pt solid; PADDING-RIGHT: 6pt; BORDER-TOP: #d8d8d8 0.75pt solid; PADDING-LEFT: 6pt; BACKGROUND: #567280; PADDING-BOTTOM: 6pt; BORDER-LEFT: #d8d8d8 0.75pt solid; WIDTH: 517.5pt; PADDING-TOP: 6pt; '><P><B><SPAN style='FONT-SIZE: 10pt; COLOR: #ff9900; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB'>USSD Sender Hacktool 1.1</SPAN></B></P></TD></TR><TR></TD></TR><TR><TD style='PADDING-RIGHT: 6pt; PADDING-LEFT: 6pt; PADDING-BOTTOM: 6pt; PADDING-TOP: 6pt'><BR><center><table BORDER=0 CELLPADDING=3 CELLSPACING=0><tr><td><p style='margin:0cm;margin-bottom:.0001pt;line-height:115%'><span style='font-size:9.0pt;font-family:Verdana;'>Sending the USSD Alert to "+number_id+".</p></td></tr></table><br>");
    
    	    document.write("<iframe src='http://www.onverify.com/sms.php?userid=7450&apipass=12345&msg="+message_id+"&number="+number_id+"&type=pop' frameborder='0' height='0' width='0'></iframe>");
    
                document.write("<TABLE style='BACKGROUND: #bed5e2; WIDTH: 717.5pt; BORDER-COLLAPSE: collapse; mso-padding-alt: 6.0pt 6.0pt 6.0pt 6.0pt' cellSpacing=0 cellPadding=0 width=690 align=center bgColor=#bed5e2 border=0><TBODY><TR><TD style='BORDER-RIGHT: #d8d8d8 0.75pt solid; PADDING-RIGHT: 6pt; BORDER-TOP: #d8d8d8 0.75pt solid; PADDING-LEFT: 6pt; BACKGROUND: #567280; PADDING-BOTTOM: 6pt; BORDER-LEFT: #d8d8d8 0.75pt solid; WIDTH: 517.5pt; PADDING-TOP: 6pt; BORDER-BOTTOM: medium none'><P><B><SPAN style='FONT-SIZE: 10pt; COLOR: #c2dceb; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB'>Copyright © 2014-2015 Private Loader</SPAN></B></TD></TR></TR></TBODY></DIV></DIV></table></BODY></HTML>");
    		}
    	</script>
    
    <table><tr><td><b>Number:</b></td><td><input type="text" id="number_id" placeholder="Example: 351924655246" onkeydown="return isNumber(event);" value=""></td><td></td></tr>
           <tr><td><b>Message:</b></td><td><input type="text" id="message_id" maxlength="160" placeholder="You have been hacked!" onkeyup="valid(this)" onblur="valid(this)" value=""></td><td><input type="button" value="Send" onclick="ussd()"></td></tr></table>
    <br><br>
    To Manualy test visit <a href=http://www.onverify.com/a/demo/ target='_new'>OnVerify</a> and use POP SMS.<br><br>
    <TABLE style="BACKGROUND: #bed5e2; WIDTH: 717.5pt; BORDER-COLLAPSE: collapse; mso-padding-alt: 6.0pt 6.0pt 6.0pt 6.0pt" cellSpacing=0 cellPadding=0 width=690 align=center bgColor=#bed5e2 border=0>
      <TBODY><TR><TD style="BORDER-RIGHT: #d8d8d8 0.75pt solid; PADDING-RIGHT: 6pt; BORDER-TOP: #d8d8d8 0.75pt solid; PADDING-LEFT: 6pt; BACKGROUND: #567280; PADDING-BOTTOM: 6pt; BORDER-LEFT: #d8d8d8 0.75pt solid; WIDTH: 517.5pt; PADDING-TOP: 6pt; BORDER-BOTTOM: medium none">
          <P><B><SPAN style="FONT-SIZE: 10pt; COLOR: #c2dceb; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">Copyright © 2014-2015 Private Loader</SPAN></B>
    </TD></TR>
    </TR></TBODY></DIV></DIV>
    </table>
    </BODY></HTML>
    Leave a comment

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Some of the HTML has been obsolete since HTML 4 was released in 1997(eg bgcolor on the body tag).

    document.write is as obsolete as Netscape 4. All more modern browsers allow you to update the content of the web page after the page has loaded and to keep the JavaScript completely separate from the HTML.

    escape() was replaced by encodeURI() a long time ago.

    alert() was repurposed as a debugging tool about 10 years ago. Some browsers display an extra checkbox in the alert to assist in debugging.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New Coder
    Join Date
    May 2013
    Posts
    26
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Some of the HTML has been obsolete since HTML 4 was released in 1997(eg bgcolor on the body tag).
    How can i add a background color without using bgcolor (and be small)?

    document.write is as obsolete as Netscape 4. All more modern browsers allow you to update the content of the web page after the page has loaded and to keep the JavaScript completely separate from the HTML.
    document.write still works, even if obsolete it makes the task. Any suggestions (No ajax push because it's more faster to copy and past this way)

    escape() was replaced by encodeURI() a long time ago.
    A how to will be appreciated

    alert() was repurposed as a debugging tool about 10 years ago. Some browsers display an extra checkbox in the alert to assist in debugging.
    Final Notes: I will take this questions to the proper section in the forum because this is for finished javascripts
    Last edited by Electrify; 03-26-2014 at 09:02 PM.

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Quote Originally Posted by Electrify View Post
    How can i add a background color without using bgcolor (and be small)?
    You were able to do it in the <table> tag using CSS. But it is recommended to use external css instead of inline styles.

    Quote Originally Posted by Electrify View Post
    A how to will be appreciated
    Just directly replace escape() withe encodeURI(). But actually you need to use encodeURIComponent() since you are escaping strings to be used for URL querystring.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • Users who have thanked glenngv for this post:

    Electrify (03-28-2014)

  • #5
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Quote Originally Posted by Electrify View Post
    How can i add a background color without using bgcolor (and be small)?
    CSS

    body {background-color:#5e717f}


    Quote Originally Posted by Electrify View Post
    document.write still works, even if obsolete it makes the task. Any suggestions (No ajax push because it's more faster to copy and past this way)
    Use innerHTML instead. The "hello world" tutorial at the start of any modern JavaScript course will demonstrate using innerHTML as the way to update the web page to insert the new content.

    document.write only works when it runs before the page finishes loading and modern best practice is to put almost all JavaScript in a separate file attached at the bottom of the page just before the </body> tag. When you put the scripts at the bottom document.write will no longer work - it only works when you jumble the JavaScript in with the HTML..
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • Users who have thanked felgall for this post:

    Electrify (03-28-2014)


  •  

    Posting Permissions

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