what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

mfp_travatudin.c

mfp_travatudin.c
Posted Nov 8, 2003
Authored by m4rc3l0

Mfp_travatudin.c locks the console until a password is entered.

systems | unix
SHA-256 | 068c16bfe68903696b3e1f9b1721cc288f7b2ca0a8eb4e75c25b840dcdc0e8f3

mfp_travatudin.c

Change Mirror Download
/* mfp_travatudin.c (c)oded by m4rc3l0 in 092003 *
* *
* Compile with: *
* gcc -w -o mfp_travatudin travatudin.c *
* *
* Run: *
* ./mfp_travatudin -h *
* *
* Greetz: Julie, bashx, decodi, r0ot, esc2, br, *
* damita, mor_PH_eus, habeas, brun3rz, acubidu, *
* deadsckt, ag_volfi, reignu, unistldu, sinner, *
* japex, joshua, fingulino, portinari......... *
* *
* www.binaryrebels.cjb.net *
* www.m4rc3l0rlz.hpg.ig.com.br *
* *
* Mail-eu: m4rc3l0rlz@yahoo.com.br */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <getopt.h>
#include <signal.h>
#include <term.h>

#define TAG "\x6d\x66\x70"
#define UND "\x5f"

/* Change the BANNER */
#define BANNER "mfp_travatudin.c (c)oded by m4rc3l0\n\n"

#define DPASS "catacutianaum" /* PASSW DEFAULT */
#define DTIME 120 /* DEFAULT TIME */

void use(char *s);
void retorna(void);
void trava_porra(char *passw, int tts);

struct catar {
char *pass;
int tempo;
};

int bflag = 0;

int main(int argc, char *argv[]) {
int i, dflag=0, nflag=0;
char *temp1, *temp2, *bufi, c;
char alfa[] = "abcdefghijklmnopqrswxyz"; // ordem certa ?

struct catar uia;

if((argc < 2) || (argc > 5))
use(argv[0]);

while((i=getopt(argc, argv, "bdn:h")) != EOF) {
switch(i) {
case 'd':
dflag=1; break;
case 'n': nflag=1; uia.pass = optarg; break;
case 'b': bflag=1; break;
case '?':
case 'h': use(argv[0]);
}
}

if(dflag == 1)
trava_porra(DPASS, DTIME);
if(nflag == 1) {
if(strstr(uia.pass, ":") != NULL) {
temp1 = uia.pass;
while(*uia.pass != ':') uia.pass++;
*uia.pass = '\0';
uia.pass++;
bufi = uia.pass;
temp2 = atoi(bufi);
uia.pass = temp1;
for(c = (*bufi); c != '\0'; c = (*++bufi)) {
if(!isdigit(c) || strchr(alfa, c)) {
fprintf(stderr, "Time invalid\n");
exit(-1);
}
}
uia.tempo = temp2;
if(uia.tempo >= (int)65535)
uia.tempo = DTIME;
} else { uia.tempo = DTIME; }
trava_porra(uia.pass, uia.tempo);
}

return(0);
}

void trava_porra(char *passw, int tts) {
int k, ch;
char pass2[1024];
struct termios term, oldterm;

alarm(tts);
signal(SIGINT, retorna);
signal(SIGTERM, retorna);
signal(SIGTSTP, retorna);
signal(SIGQUIT, retorna);
signal(SIGSEGV, retorna);
tcgetattr(STDIN_FILENO, &oldterm);
term = oldterm;
term.c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL|ICANON);
tcsetattr(STDIN_FILENO, TCSAFLUSH, &term);

while(1) {
k = 0;
if(bflag==1) {
printf("\033[2J\033[01;01H");
printf("%s", BANNER);
printf("Enter Password: ");
}
while((ch = getchar()) != '\n')
pass2[k++] = ch;
pass2[k] = 0;

if(!(strcmp(passw, pass2))) {
printf("\nOkey! Leaving...\n");
printf("\n");
tcsetattr(STDIN_FILENO, TCSAFLUSH, &oldterm);
fflush(stdin); fflush(stdout);
exit(0);
}
else {
printf("\nPassword error\n");
sleep(1);
fflush(stdin); fflush(stdout);
bzero(pass2, sizeof(pass2));
}
}
}

void retorna(void) { return; }

void use(char *s) {
printf("%s%stravatudin.c (c)oded by m4rc3l0\n", TAG, UND);
printf("\nOptions: %s -d || -n <pass>[:<tts>] [-b] || [-h]\n", s);
printf("Usage: \n");
printf(" %s -d Default Mode\n", s);
printf(" %s -n <password>[:<time-to-sleep>] Change pass AND tts\n", s);
printf(" %s -d || -n <pass>[:<tts>] -b Show BANNER\n", s);
printf(" %s -h This help!\n", s);
printf("Examples: \n %s -n tefodeleso:1000\n", s);
exit(-1);
}
Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close