Logo Search packages:      
Sourcecode: john version File versions  Download package

symlink.c

/*
 * This file is part of John the Ripper password cracker,
 * Copyright (c) 1996-98 by Solar Designer
 */

/*
 * Symlink emulation for Win32.
 */

#include <string.h>
#include <process.h>

#define MAIN_NAME             "john.exe"

int main(int argc, char **argv)
{
      char path[strlen(argv[0] ? argv[0] : "") + sizeof(MAIN_NAME)];
      char *name;

      if (!argv[0])
            name = path;
      else
      if ((name = strrchr(strcpy(path, argv[0]), '/')))
            name++;
      else
            name = path;
      strcpy(name, MAIN_NAME);

      execv(path, argv);
      return 1;
}

Generated by  Doxygen 1.6.0   Back to index