Your Ad Here

Way 2 Sms Api Demo & Source Code

Well many people asked how to implement the Way2Sms Api and Code and hence I provide them the Code.
DEMO :
Instructions : Enter Your Way2Sms Mobile Number , Way2Sms Password , The person you want to send and the Message . Message will be sent from your Way2Sms Account
I Have Used Free Hosting provided to me by applied Innovations . For Quick Sms You can visit my link (without copyrights) Over HERE . Thanking Applied Innovations For providing free Hosting Space .


Source Code :DOWNLOAD IT FROM HERE

Steps To Use It In Your Application :
Step 1 : In Your Default.aspx Page Add This HTML code
<iframe runat="server" style="visibility:hidden;" id="sms" ></iframe>
Step 2: Add a asp:Button in the in your application also add a click event which is going to fired u when u click the button . The Code Is :
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Text="Send Sms" />

Step 3 :Now In the Code-Behind of this file that is Default.aspx.cs we add the event of button . Which loads the Api In the Iframe and the message gets sent . We Are using ubaid.tk servers for better performance .... The Code-behind Code : protected void Button1_Click(object sender, EventArgs e)
{
sms.Attributes.Add("Src", "http://ubaid.tk/sms/sms.aspx?uid=ur_mobile_no&pwd=ur_mobile_password&msg=ur_message&phone=to_whom_u_wannasend_to&provider=way2sms");
}

Download The Code and Enjoy........................... Cheers

Hacking FTP Of Website Part 2

Well this is the second part of my tutorial in which i am going to explain how to use Nikto And Hydra GTK . This is the easy part of tutorial the hard part was installing.

How To Use Nikto ?
Open Terminal and type
nikto -host somewebsite.com

How to use Hydra ?
Use the Ip address given by Nikto as the target Ip instead of website name and all , the rest of the procedure u can get in the video below .
This Video Tutorial shows u how

Hacking FTP of a Website Part 1

Disclaimer :The Following Code is only for Educational purposes

What I am Going to teach ?
Hacking a ftp of a website using Brute-Force Attacking Or Dictionary Attacks. Brute Force Attack means randomly trying all the alphabets as username and Password while dictionary attack means using given list of usernames and passwords.

The Requirements :-
I personally used Ubuntu 10.10 Maverick Meerkat but i will be also explaining that of Lucid Lynx Ubuntu 10.04. Any Of the mentioned OS will Do . In short let me tell you how i am going to hack the FTP. First , I am going to install the Hydra and Xhydra in Ubuntu and then Nikto . Both the tools are used in Ubuntu in order to test the "how strong the ftp password is " but around 30% of the websites could be easily hacked by this method . Many Websites still have no FTP passwords !!

NOTE : I am assuming That you have not modified any of the ubuntu source files and hence won't run into errors . Even If you Do please mention it in the Comment box below.

Installing Nikto

System > Administration > Synaptic Package Manager
Search Nikto in it . And install it on your computer That's pretty simple

Installing Hydra In Ubuntu 10.04

Follow the steps given below to install Hydra 5.7 in Ubuntu Lucid Lynx 10.04

Step 1. Paste the following code in terminal . It installs the required softwares .
sudo apt-get install build-essential linux-headers-$(uname -r) libgtk2.0-dev

Step 2 Download and extract the THC-Hydra tarball
wget -c http://freeworld.thc.org/releases/hydra-5.7-src.tar.gz
tar -xvzf hydra-5.7-src.tar.gz
cd hydra-5.7-src

Step 3 Now you are ready to compile:
./configure
make
sudo makeinstall

Now Close The terminal and press alt + F2 and type xhydra and press enter . A window like the one in image below will open up .

We Have successfully installed the Hydra , HydraGTK(xhydra) and Nikto :) .

Installing Hydra In Ubuntu 10.10

Go Here For How to install Xhydra in Ubuntu 10.10 .

Using Cookies In ASP.NET

Well Cookies are used to store values less than 14 KB . In later tutorial I am going to explain how to make comment box using Cookies , In this tutorial i m gonna tell u about how to Write and Request Cookies .

CODE :
To Write Cookies In Csharp From Code-Behind
Response.Cookies["BackgroundColor"].Value = "Red";

To Request Cookies From another Page
(Request.Cookies["BackgroundColor"].Value);
Will Be Posting Further.....

Play .wav Extension Sound In Asp.Net (Javascript)

How To Play .WAV Sound Files In Asp.NET Using Javascript . The Code is in Html Format .

CODE:

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
<title></title>
<script type="text/javascript">
var soundObject = null;
function PlaySound() {
if (soundObject != null) {
document.body.removeChild(soundObject);
soundObject.removed = true;
soundObject = null;
}
soundObject = document.createElement("embed");
soundObject.setAttribute("src", "sounds/sound.wav");
soundObject.setAttribute("hidden", true);
soundObject.setAttribute("autostart", true);
document.body.appendChild(soundObject);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<input type = "button" onclick = "PlaySound()" value = "Play Sound" />
</form>
</body>

</html>

Twitter Type Textbox Glow




The Html Code :
<style type="text/css">input[type=text]:focus,input[type=password]:focus,textarea:focus{outline:none;border-color:rgba(82,168,236,.75)!important;box-shadow:0 0 8px rgba(82,168,236,.5);-moz-box-shadow:0 0 8px rgba(82,168,236,.5);-webkit-box-shadow:0 0 8px rgba(82,168,236,.5);}</style>

<input id="txtText" type="text">

Getting X And Y Axis Co-ordinates (Javascript)

DEMO :


Source Code :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
function GetScreenCordinates(obj) {
var p = {};
p.x = obj.offsetLeft;
p.y = obj.offsetTop;
while (obj.offsetParent) {
p.x = p.x + obj.offsetParent.offsetLeft;
p.y = p.y + obj.offsetParent.offsetTop;
if (obj == document.getElementsByTagName("body")[0]) {
break;
}
else {
obj = obj.offsetParent;
}
}
return p;
}
</script>
<script type = "text/javascript">
function GetTextboxCordinates() {
var txt = document.getElementById("txtText");
var p = GetScreenCordinates(txt);
alert("X:" + p.x + " Y:" + p.y);
}
</script>
</head>
<body>
<form id="form1">
<input id = "txtText" type = "text" /><br/><br/>
<input value = "Get Coordinates" type = "button" onclick = "GetTextboxCordinates()" />
</form>
</body>
</html>


The above code has been tested in the following browsers
Internet Explorer FireFox Chrome Safari Opera

* All browser logos displayed above are property of their respective owners.

Webparts In Firefox

DOWNLOAD THE CODE OVER HERE It works In Firefox

DEMO :
DEMO By What I think about.net

Default.aspx Code Snippet


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register assembly="Microsoft.Web.Preview" namespace="Microsoft.Web.Preview.UI.Controls.WebParts" tagprefix="dotnetsnippets" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<a href="http://www.dotnetsnippets.co.cc"> <h2>Code Provided By dotnetsnippets.co.cc by Vaibhav Maheshwari</h2>
</a>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<dotnetsnippets:WebPartManager ID="WebPartManager1" runat="server">
</dotnetsnippets:WebPartManager>
<dotnetsnippets:WebPartZone ID="WebPartZone1" runat="server">
<ZoneTemplate>
<asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
</ZoneTemplate>
</dotnetsnippets:WebPartZone>
<dotnetsnippets:WebPartZone ID="WebPartZone2" runat="server">
</dotnetsnippets:WebPartZone>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>


Default.aspx.cs Code Snippet

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
if (ApplicationInstance.Context.User.Identity.IsAuthenticated == true)
{
// set the display mode to "Design" to allow drag and drop .This works In Firefox
WebPartDisplayMode mode = WebPartManager1.SupportedDisplayModes["Design"];
if (mode != null)
{
WebPartManager1.DisplayMode = mode;
}
}
}
}
}

DOWNLOAD THE CODE OVER HEREIt works In Firefox

Where is Microsoft.Web.Preview.dll ???

DOWNLOAD IT RIGHT OVER HERE

Well , I was literally crying when i searched for this term on google . It resulted about ajax control Toolkit , ATLAS , Forum link but after half an hour of browsing I did found where it was ?
So I have uploaded it on my Google docs folder and make it available to you .

How 2 Use It and all is described in my next tutorial which shows you how to enable web-parts drag and drop in Mozilla firefox . Unfortunately in Visual Studio 2010 also microsoft has not updated this BUG .

DOWNLOAD IT RIGHT OVER HERE