003 File Manager
Current Path:
/usr/src/contrib/opie
usr
/
src
/
contrib
/
opie
/
📁
..
📄
BUG-REPORT
(3.58 KB)
📄
COPYRIGHT.NRL
(3.3 KB)
📄
INSTALL
(7.68 KB)
📄
License.TIN
(2.34 KB)
📄
Makefile.in
(13.01 KB)
📄
README
(21.99 KB)
📄
acconfig.h
(5.99 KB)
📄
config.h.in
(11.48 KB)
📄
config.testeflag
(162 B)
📄
configure
(144.58 KB)
📄
configure.in
(18.14 KB)
📄
configure.munger.in
(409 B)
📄
ftpcmd.y
(27.11 KB)
📄
glob.c
(13.22 KB)
📄
install-sh
(4.66 KB)
📁
libmissing
📁
libopie
📄
opie.4
(14.27 KB)
📄
opie.h
(5.57 KB)
📄
opie_cfg.h
(4.99 KB)
📄
opieaccess.5
(3.1 KB)
📄
opieauto.c
(8.45 KB)
📄
opieftpd.8
(8.82 KB)
📄
opieftpd.c
(41.79 KB)
📄
opiegen.1
(2.4 KB)
📄
opiegen.c
(2.36 KB)
📄
opieinfo.1
(2.63 KB)
📄
opieinfo.c
(2.78 KB)
📄
opiekey.1
(4.87 KB)
📄
opiekey.c
(9.15 KB)
📄
opiekeys.5
(1.88 KB)
📄
opielogin.1
(3.21 KB)
📄
opielogin.c
(35.74 KB)
📄
opiepasswd.1
(4.36 KB)
📄
opiepasswd.c
(12.01 KB)
📄
opieserv.1
(2.13 KB)
📄
opieserv.c
(2.04 KB)
📄
opiesu.1
(2.97 KB)
📄
opiesu.c
(13.84 KB)
📄
opietest.c
(7.22 KB)
📄
permsfile.c
(4.22 KB)
📄
popen.c
(6.41 KB)
Editing: opiegen.c
/* opiegen.c: Sample OTP generator based on the opiegenerator() library routine. %%% portions-copyright-cmetz-96 Portions of this software are Copyright 1996-1999 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from <license@inner.net>. History: Modified by cmetz for OPIE 2.3. OPIE_PASS_MAX changed to OPIE_SECRET_MAX. Send debug info to syslog. Modified by cmetz for OPIE 2.2. Use FUNCTION definition et al. Fixed include order. Created at NRL for OPIE 2.2. */ #include "opie_cfg.h" #include <stdio.h> #if DEBUG #include <syslog.h> #endif /* DEBUG */ #include "opie.h" int main FUNCTION((argc, argv), int argc AND char *argv[]) { char buffer[OPIE_CHALLENGE_MAX+1]; char secret[OPIE_SECRET_MAX+1]; char response[OPIE_RESPONSE_MAX+1]; int result; if (opieinsecure()) { fputs("Sorry, but you don't seem to be on a secure terminal.\n", stderr); #if !DEBUG exit(1); #endif /* !DEBUG */ } if (argc <= 1) { fputs("Challenge: ", stderr); if (!opiereadpass(buffer, sizeof(buffer)-1, 1)) fprintf(stderr, "Error reading challenge!"); } else { char *ap, *ep, *c; int i; ep = buffer + sizeof(buffer) - 1; for (i = 1, ap = buffer; (i < argc) && (ap < ep); i++) { c = argv[i]; while ((*(ap++) = *(c++)) && (ap < ep)); *(ap - 1) = ' '; } *(ap - 1) = 0; #if DEBUG syslog(LOG_DEBUG, "opiegen: challenge is +%s+\n", buffer); #endif /* DEBUG */ } buffer[sizeof(buffer)-1] = 0; fputs("Secret pass phrase: ", stderr); if (!opiereadpass(secret, OPIE_SECRET_MAX, 0)) { fputs("Error reading secret pass phrase!\n", stderr); exit(1); }; switch (result = opiegenerator(buffer, secret, response)) { case -2: fputs("Not a valid OTP secret pass phrase.\n", stderr); break; case -1: fputs("Error processing challenge!\n", stderr); break; case 1: fputs("Not a valid OTP challenge.\n", stderr); break; case 0: fputs(response, stdout); fputc('\n', stdout); fflush(stdout); memset(secret, 0, sizeof(secret)); exit(0); default: fprintf(stderr, "Unknown error %d!\n", result); } memset(secret, 0, sizeof(secret)); return 1; }
Upload File
Create Folder