Monday, 1 February 2016

How to change pc mac address

What is MAC address?

MAC(media access control address) is physical address of your computer system. Each device have unique MAC address. MAC address is assigned by manufacture into NIC(network interface controller)

Why to change MAC address?

1. Motherboard, router is changed and your ISP is using the previous MAC address.
2. If MAC address is blocked by the firewall or router
3. Safety

Watch Video : https://www.youtube.com/watch?v=2HwVB2XlQfk(audio+video  mixing with ffmpeg)
ffmpeg.exe -ss 00:00:00  -t 116 -i "mac2.avi" -ss 0:00:00 -t 116 -i "mac2.mp3" -map 0:v:0 -map 1:a:0 -y out.mp4

More about ffmpeg :http://hackfi.blogspot.in/2015/10/slow-motion-video-using-ffmpeg.html

How to change MAC address in windows:

1. Generate random MAC address.

2. Go to Control panel >> Network and Internet >> Network connection.




3. Right Click on Local Area Connection >> Configure.



4. Advanced >> select Network Address >> enter "MAC address" into value>> Ok

5. To check MAC address "ipconfig -all"







Sunday, 10 January 2016

Schedule,abort,reboot,shutdown in windows with cmd

Sometime after the software update windows automatically restart the system.(system will restart in 10 minutes) Or you may want to schedule shutdown or reboot of system.


To abort this shutdown: (before you know how to shutdown you should know how to abort)

shutdown -a or shutdown /a

Scheduling shutdown, reboot time for windows:

shutdown -s -t 30  (Shutdown will be in 30 sec)

shutdown -r -t 30 (Reboot will be in 30 sec)



Create batch file off above command:

shutdown.bat ( open notepad and write below save as shudown.bat file)

shutdown.exe -s -t -60

abort.bat ( open notepad and write below save as abort.bat file)

shutdown.exe -a

HackTips with shutdown.bat file:(first read solution)

If the shutdown.bat file is copied to "startup" folder of windows then whenever the system will start
the shutdown.bat file  command will run and system will shutdown. This will create shutdown loop the system will never start.

Where is startup folder(startup folder path)

Solution: 

Need to start windows in safe mode by pressing F8 key from your keyboard and we need to delete the shutdown.bat file from the startup folder.(in safe mode only basic programs are loaded)

Fun stuff:

Create shutdown.bat(with -t 00) file and send your friend and tell them to double click on that file to see magic or whatever.

Schedule shutdown time in some system.


Wednesday, 6 January 2016

simple caesar cipher code in java

simple Caesar cipher code in java(encryption,decryption)

import java.io.*;
class cipher
{
 public static void main(String a[])
 {

  String s1,s2,cipher,alpha;
  int count=0;
  alpha="abcdefghijklmnopqrstuvwxyz";
  Console c=System.console();


  System.out.println("-----cipher----");
  s1=c.readLine("Enter the plain text :");
  s2=c.readLine("Enter the key(in number) :");
  System.out.println("---decryption---");
  int key=Integer.parseInt(s2);
  cipher="";

  for(int i=0;i<s1.length();i++)
      {
   for(int j=0;j<26;j++)
   {
     if(s1.charAt(i)==alpha.charAt(j))
      {
       cipher=""+alpha.charAt(j+key);
    System.out.print(cipher);
    }
   }

   }
   System.out.println("");
System.out.println("");
System.out.print(cipher);
System.out.println("");
System.out.println("");

   System.out.println("---decryption---");
 
   for(int i=0;i<cipher.length();i++)
      {
    for(int j=0;j<26;j++)
   {
     if(cipher.charAt(i)==alpha.charAt(j))
      {
       cipher=""+alpha.charAt(j-key);
    System.out.print(cipher);
    }
   }
   }
}
}