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:

April 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close