misc.h

来自「UNIX、linux密码的破密程序源代码实现」· C头文件 代码 · 共 67 行

H
67 行
字号
/* * This file is part of John the Ripper password cracker, * Copyright (c) 1996-99,2003 by Solar Designer *//* * Miscellaneous routines. */#ifndef _JOHN_MISC_H#define _JOHN_MISC_H#include <stdio.h>/* * Exit on error. Logs the event, closes john.pot and the log file, and * terminates the process with non-zero exit status. */extern void error(void);/* * Similar to perror(), but supports formatted output, and calls error(). */extern void pexit(char *format, ...)#ifdef __GNUC__	__attribute__ ((format (printf, 1, 2)));#else	;#endif/* * Attempts to write all the supplied data. Returns the number of bytes * written, or -1 on error. */extern int write_loop(int fd, char *buffer, int count);/* * Similar to fgets(), but doesn't leave the newline character in the buffer, * and skips to the end of long lines. Handles both Unix and DOS style text * files correctly. */extern char *fgetl(char *s, int size, FILE *stream);/* * Similar to strncpy(), but terminates with only one NUL if there's room * instead of padding to the supplied size like strncpy() does. */extern char *strnfcpy(char *dst, char *src, int size);/* * Similar to the above, but always NUL terminates the string. */extern char *strnzcpy(char *dst, char *src, int size);/* * Similar to strncat(), but total buffer size is supplied, and always NUL * terminates the string. */extern char *strnzcat(char *dst, char *src, int size);/* * Converts a string to lowercase. */extern char *strlwr(char *s);#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?