slider img
slider img
slider img

T he Keylogger is kind of software or you can say program. Keylogger is mostly written on python language.  Key is stands for the key which...

What is Keylogger ?

The Keylogger is kind of software or you can say program. Keylogger is mostly written on python language.  Key is stands for the key which is pressed from keyboard and logger stand for log file.




There are Two type of keylogger:-

  1. Hardware Keylogger
  2. Software  Keylogger

  • Hardware Keylogger


       

 There are hardware keyloggers where you plug some hardware into the wire of the keyboard to record it. But you probably are thinking how many computers use a plugged in keyboard these days? (not many). These types of keylogger are hardly relevant anymore.
There are other hardware based keyloggers that use USB and put them in the back of the computer or in the USB port but that looks pretty obvious.
The good thing about hardward keyloggers is you don’t need to sign into the computer to install them.

  •   Software Keylogger


       Software  keylogger is simple program which record the key pressed by victim  . There are email sending keylogger is also available which record the key and sends to hacker through mail.
Software keyloggers are the best because they are the hardest to find. They work on phones too. Not just computers.And software keylogger are easy to use and for normal person it is hard to track. 




Folder Download:-Download

T here are lots of option to hack any account .This make big Confusion of us which trick we use . To save our time and work we have to und...

4 simple way to Hack any account 2018

There are lots of option to hack any account .This make big Confusion of us which trick we use .
To save our time and work we have to understand  the victim . Because every person is unique
hacker should understand the victim mind . And one more thing about hacker . All hacker are programmer but every programmer cant be the hacker.



1st Way: Auto-run Pendrive 


  •     This is the easiest way to hack any account .
  •      Very less work .
  •     Save time to crack password.
  •     Safe . No one  able to track you.
  •     Requirement   Just 1 pendrive.
  •     Pendrive steal the account and its password which is save in browser like chrome .

2nd  Way: Keylogger



  • It is also easiest way to hack any account.
  • Very less work. Just install key-logger file in victim device.
  •  Save time to crack password.
  • Safe . No one  able to track you.
  • Requirement is keylogger run able file.
  •  Keylogger record the key which pressed by the victim and sends to you via mail. 

3rd Way : Phishing attack



  • It is harder then way 1 and way 2.
  • You have to make duplicate web page.
  • phishing is a type of social engineering attack often used to steal user data, including login credentials and credit card numbers. It occurs when an attacker, masquerading as a trusted entity, dupes a victim into opening an email, instant message, or text message. The recipient is then tricked into clicking a malicious link, which can lead to the installation of malware, the freezing of the system as part of a ransomware attack or the revealing of sensitive information.
  • Requirement Kali Linux,internet connection and ngrok.

4th Way: Brute force

    
  • This is hardest technique.
  • 1st we have to collect information about victim. 
  • After that create password list using that information.
  • It take time to crack password.
  • No guarantee to crack password.
  • Requirement script and password list.
  • brute-force attack consists of an attacker trying many passwords or passphrases with the hope of eventually guessing correctly. The attacker systematically checks all possible passwords and passphrases until the correct one is found.  

What is exception handling?   In programming two most common types of error are logical error and syntax error.  The syntax error is de...

Exception handling and Namespace in C++

What is exception handling? 

  •  In programming two most common types of error are logical error and syntax error.
  •  The syntax error is detected during compilation of the program, but the logical error will detect during execution of the program. So, it is very difficult to handle the logical error. • The exception handling provides the mechanism to handle the logical error during execution of the program.
  • Steps to handle the logical error:

           1.Find the problem (Hit the exception)
           2.Inform that an error has occurred (Throw the exception)
           3.Receive the error information (Catch the exception)
           4.Take corrective actions (Handle the exception)

Exception Handling Mechanism: 

  •  This mechanism is built upon three keywords: try, throw and catch. 
  •  try is used to preface a block of statement which may generate exceptions. 
  • When an exception is detected, it is thrown using a throw statement. 
  •  A catch block is used to catches the exceptions thrown by throw statement and take appropriate action. 
  • •The relationship between try, throw and catch block is as shown in below figure. 

  • Syntax: 
            try 
           {
           // Set of Statments; 
          throw exception; 
          // Set of Statements; 
        }
        catch (type arg)
      { 
       // Set of Statements;
      } 


  • Example;
          #include<iostream.h>
         #include<conio.h>
         void main()
        {
         int a,b;
         cout<<"enter a and b";
         cin>>a>>b;
         try{
         if(b!=0)
          {
          cout<<"a/b ="<<a/b;
           }
           else{
            throw (b);
           }
           }
          catch(int x)
           {
            cout<<"exeception"<<x;
           }
          getch();
           }

  •  When the value of b is zero at that time exception will throw and this exception will catch in catch block and print the message value is zero. 


      What is multiple catch statements?
  •  It is possible that a program segment has more than one condition to throw an exception. 
  •  For these situations, we can associate more than one catch statement with a try block. 
  • When an exception is thrown, the exception handlers are searched in order for an appropriate match. 
  • The first handler that yields a match is executed. 
  • After executing the handler, the control goes to the first statement after the last catch block for that try. 
  •  Note: It is possible that arguments of several catch statements match the type of an exception. 
  • In such cases, the first handler that matches the exception type is executed. 
Example: 
          #include<iostream.h>
          #include<conio.h>
          void main()
         {
           int x;
           cout<<"enter value of X";
           cin>>x;
       try{
         if(x==1)
         {
           thow(x);
       }
        else if(x==0)
       {
          thow'x';
         }
     else if(x==-1)
     {
        thow 1.0;
     }
    }
       catch(char x)
   {
     cout<<"exeception"<<x;
    }
       catch(int x)
      {
     cout<<"exeception"<<x;
      }
    catch(float x)
    {
     cout<<"exeception"<<x;
     }
    getch();
   }

What is Rethrowing an Exception?
  • A handler may decide to rethrow the exception caught without processing it. 
  • In such situations, we may simply invoke throw without any arguments as shown below: 
         throw ; 
  • This causes the current exception to be thrown to the next enclosing try/catch sequence and is caught by 
    a catch statement listed after that enclosing try block. 
  • Example: 
      #include<iostream.h>
        #include<conio.h>
       void divide (double x, double y) 
       {
        cout<<"inside function"<<endl;
        try
       {
         if(y==0)
         throw y;
        else
         cout<<"Division="<<x/y<<endl;
       }
      catch(double)
     {
       cout<<"caught double inside te function\n";
     throw;
       }
       cout<<"Exnd of function\n\n";
      }
    void main()
   {
    cout<<"inside main";
      try{
     divide(10.5,2.5);
     divide(4,0);
     }
  catch(double)
  {
   cout<<"catch double inside";
     }
    cout<<"main end \n";
     getch();
   }

What is namespace?
  • Namespaces provide a method for preventing name conflicts in large projects.
  • Symbols declared inside a namespace block are placed in a named scope that prevents them from being mistaken for identically-named symbols in other scopes.
  • Multiple namespace blocks with the same name are allowed. All declarations within those blocks are declared in the named scope.
  • A namespace works to avoid names conflicts, for example, the standard library definessort() that is a really good name for a sorting function, thanks to namespaces you can define your own becausesort() it won't be in the same namespace as the standard one.
  • In namespace, we can declare the function, variable etc but we cannot use it
  • We cannot call the variable of function in namespace we can just declare it.
  • Because memory is allocated to the object, not to the namespace of class.
  • When we use namespace in our program we must define all that variable otherwise that class become the abstract class.
  • It means we can not create an object of that class then memory will not be allocated to that class.
  • we can declare namespace using namespace keyword.
  • Syntax:
             namespace namspace-name
            {
                 //decleration
                //decleration
              }

Example:

      // namespaces
      #include <iostream.h>
     #include<conio.h>

    namespace a // namespace a declaration 
   {
    int var = 5;
  }

     namespace b   //namespace b declaration 

       {
       double var = 3.1416;
      }

    void main () {

     cout << a::var << endl; // accessing variable var of namespace (a) using scpoe resolution(::)
     cout << b::var << endl;  // accessing variable var of namespace b) using scpoe resolution(::)

    getch();
     }



  Topics       Polymorphism             1.Compile Time   Polymorphism          2.Runtime polymorphism       Virtual function        ...

Polymorphism and Virtual function in C++

  Topics
      Polymorphism  
         1.Compile Time Polymorphism
         2.Runtime polymorphism
      Virtual function   
        1. Pure virtual function   
        2.Abstract class


Polymorphism 
• Polymorphism means the ability to take more than one form.
• It allows a single name to be used for more than one related purpose.
• It means the ability of operators and functions to act differently in different situations.

Different type of Polymorphism
Compile time: 
• Compile time polymorphism is function and operator overloading. 

Function Overloading: 
• Function overloading is the practice of declaring the same function with different signatures. 
• The same function name will be used with the different number of parameters and parameters of the different type.
• Overloading of functions with different return type is not allowed.
Operator Overloading: 
• Operator overloading is the ability to tell the compiler how to perform a certain operation based on its corresponding operator's data type. 
• Like + performs addition of two integer numbers, concatenation of two string variables and works totally different when used with objects of time class. 

Dynamic Binding (Late Binding): 
• Dynamic binding is the linking of a routine or object at runtime based on the conditions at that moment. 
• It means that the code associated with a given procedure call is not known until the time of the call. 
• At run-time, the code matching the object under current reference will be called. 

What is the pointer?
  • the pointer is one kind of variable which use to store the address of another variable.
  • The pointer is almost same as reference variable because reference variable also stores the address of another variable.
  • The difference between reference variable and pointer is we can use the pointer as a class object but we cannot use the reference variable as a class object.
  • We use *(star symbol) to declare the pointer.And write * in front of the variable name.
  • Syntax of pointer
                      datatype *pointer-name; // pointer as variable
                      class-name *pointer-name; // pointer as a class object
  • We can access class member using pointer as object using ( ->) arrow or point symbol.
  • Syntax 
                 class-name *p;// pointer p declaration asobject
                  p->getdata();// p pointer accessing getdata() function
                  p->a=5;        //p pointer accessing a variable
  • Example is below                

Compile Time  polymorphism :
  • In compile time polymorphism occur on overriding .when we inherite child class from parent class.
  • In compile, time polymorphism compiler just read the declaration of the pointer as the object of class but the compiler is not read the address of which is stored in pointer this is called as compile time polymorphism.
  • In compile time polymorphism we want to run parent class function but it runs child class function.
  • To solve this problem we use runtime polymorphism.
  • Example:
#include<iostream.h>
#include<conio.h>
class a{
public:
void fun() //parent class function
{
cout<<"parent function";
}
};
class b:public a{
public:
void fun() // child class function
{
cout<<"child function";
}
};
void main()
{
a a1;            // creating class a object a1
b *ptr;         //decleraing pointer as class b object
ptr=&a1;       // storing address of  a1 object in pointer
ptr->fun();  // trying to execute fun()  function of parent means a class
getch();
}

Output:
child function

Result :
  • First, we have declared the pointer as class b object.
  • Pointer use to store the address of another variable and object that's why we have stored the address of a1 object.
  • But when we call fun() function of a class using b class pointer at that time fun() function of the b class run.
  • That is compiled time polymorphism
To understand Runtime polymorphism we need to learn about virtual function.

What is the virtual function? 
It is a run time polymorphism. 
• Base class and derived class have same function name and base class pointer is assigned address of 
derived class object then also pointer will execute base class function. 
• To execute function of derived class, we have to declare function of base class as virtual. 
• To declare virtual function just uses keyword virtual preceding its normal function declaration. 
• After making the virtual function, the compiler will determine which function to execute at runtime on the basis of assigned address to the pointer of the base class. 

Rules for virtual function 
1.The virtual functions must be the member of any class. 
2.They cannot be static members. 
3. They are accessed by using object pointers. 
4.A virtual function can be a friend of another class. 
5.A virtual function in a base class must be defined, even though it may not be used. 
6.If two functions with the same name have different prototypes, C++ considers them as overloaded 
    functions and the virtual function mechanism is ignored. 
7.We cannot have virtual constructors, but we can have virtual destructors. 
8.The derived class pointer cannot point to the object of the base class. 
9. When a base pointer points to a derived class, then also it is incremented or decremented only 
    relative to its base type. 
   Therefore we should not use this method to move the pointer to the next object. 
10. If a virtual function is defined in the base class, it need not be necessarily redefined in the derived class. 
Example of virtual function and runtime polymorphism will be same.


What is Run time polymorphism?
• We must access virtual functions through the use of a pointer declared as a pointer to the base class. 
• We can also use object name and dot operator to call virtual functions. 
• But, runtime polymorphism using virtual functions is achieved only when a virtual function is accessed through a pointer to the base class. 

Example of virtual function and  Run time polymorphism
#include<iostream.h>
#include<conio.h>
class a{
public:
virtual void fun()             // Virtual  function decleraed
{
cout<<"parent function";
}
};
class b:public a{
public:
void fun()                  // child class function
{
cout<<"child function";
}
};
void main()
{
a a1;                  // creating class a object a1
b *ptr;              //decleraing pointer as class b object
ptr=&a1;       // storing address of  a1 object in pointer
ptr->fun();    // trying to execute fun()  function of parent means a class
getch();
}

Output:
parent function

Result:
now it will run parent function not child function.

What is pure virtual functions?
• A pure virtual function means 'do nothing' function. 
• We can say empty function. A pure virtual function has no definition relative to the base class. 
• Programmers have to redefine the pure virtual function in the derived class because it has no definition in the base class. 
• A class containing pure virtual function cannot be used to create any direct objects of its own. 
• This type of class is also called as the abstract class. 
Syntax: 
virtual display ( ) =0; OR virtual display(){} 

What is an abstract class?
  • If any class contain pure virtual function or null function then that class is an abstract class.
  • If any class is abstract we cannot create an object of that class and memory will not be allocated to that class.
  • The only way is to access that class member is to inherit that class into subclass. then we can access that class using cub class object.


Cybercry 2018. Powered by Blogger.

Popular Posts