Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anterior Revisión previa Próxima revisión | Revisión previa | ||
hackertyper.sh [2024/08/11 22:30] – peron | hackertyper.sh [2024/08/14 22:05] (actual) – peron | ||
---|---|---|---|
Línea 1: | Línea 1: | ||
<code bash> | <code bash> | ||
# | # | ||
- | # Un script | + | # Un simulador |
- | # Rm9yayAhQm9tYnpaeUNBawo= | + | # hackertyper.sh |
ayuda() { | ayuda() { | ||
cat <<' | cat <<' | ||
- | -q " | + | -q " |
- | -l " | + | -l " |
-f "falla al hackear" | -f "falla al hackear" | ||
-s " | -s " | ||
Línea 14: | Línea 14: | ||
Ejemplo: -l 20 -q 10 -f -g | Ejemplo: -l 20 -q 10 -f -g | ||
- | cada presion de tecla mostrará 20 caracteres | + | Cada presion de tecla mostrará 20 caracteres |
- | esto | + | esto |
una vez que termina, fallará | una vez que termina, fallará | ||
- | todo el texto es verde | + | todo el texto sale en verde |
También note que presionar ` saltará directamente a " | También note que presionar ` saltará directamente a " | ||
Línea 74: | Línea 74: | ||
fi | fi | ||
} | } | ||
- | text=`cat << ' | + | texto=`cat << ' |
- | /* init a 2 - uno for init_task, uno para asegurar que nunca se libere */ | + | /* Inicia A2 - uno for init_task, uno para asegurar que nunca se libere */ |
struct group_info init_groups = { .usage = ATOMIC_INIT(2) }; | struct group_info init_groups = { .usage = ATOMIC_INIT(2) }; | ||
struct group_info *groups_alloc(int gidsetsize) | struct group_info *groups_alloc(int gidsetsize) | ||
{ | { | ||
+ | /* Prototipo Selector de ataque */ | ||
struct group_info *group_info; | struct group_info *group_info; | ||
+ | /* Genera engaño de stack */ | ||
int nblocks; | int nblocks; | ||
int i; | int i; | ||
nblocks = (gidsetsize + NGROUPS_PER_BLOCK - 1) / NGROUPS_PER_BLOCK; | nblocks = (gidsetsize + NGROUPS_PER_BLOCK - 1) / NGROUPS_PER_BLOCK; | ||
- | /* Asegurese | + | /* Asegúrese |
nblocks = nblocks ? : 1; | nblocks = nblocks ? : 1; | ||
group_info = kmalloc(sizeof(*group_info) + nblocks*sizeof(gid_t *), GFP_USER); | group_info = kmalloc(sizeof(*group_info) + nblocks*sizeof(gid_t *), GFP_USER); | ||
Línea 93: | Línea 95: | ||
group_info-> | group_info-> | ||
atomic_set(& | atomic_set(& | ||
- | + | ||
+ | /* Ofusca crecimiento de Tenia en acumulador */ | ||
if (gidsetsize <= NGROUPS_SMALL) | if (gidsetsize <= NGROUPS_SMALL) | ||
group_info-> | group_info-> | ||
Línea 106: | Línea 109: | ||
} | } | ||
return group_info; | return group_info; | ||
- | + | ||
+ | /* Paginador innoble */ | ||
out_undo_partial_alloc: | out_undo_partial_alloc: | ||
while (--i >= 0) { | while (--i >= 0) { | ||
Línea 129: | Línea 133: | ||
EXPORT_SYMBOL(groups_free); | EXPORT_SYMBOL(groups_free); | ||
- | /* exporta | + | /* Exporta |
static int groups_to_user(gid_t __user *grouplist, | static int groups_to_user(gid_t __user *grouplist, | ||
const struct group_info *group_info) | const struct group_info *group_info) | ||
Línea 137: | Línea 141: | ||
for (i = 0; i < group_info-> | for (i = 0; i < group_info-> | ||
+ | /* Conteo de grupo falso */ | ||
unsigned int cp_count = min(NGROUPS_PER_BLOCK, | unsigned int cp_count = min(NGROUPS_PER_BLOCK, | ||
unsigned int len = cp_count * sizeof(*grouplist); | unsigned int len = cp_count * sizeof(*grouplist); | ||
Línea 149: | Línea 154: | ||
} | } | ||
- | /* llenar | + | /* Rellena |
static int groups_from_user(struct group_info *group_info, | static int groups_from_user(struct group_info *group_info, | ||
gid_t __user *grouplist) | gid_t __user *grouplist) | ||
Línea 157: | Línea 162: | ||
for (i = 0; i < group_info-> | for (i = 0; i < group_info-> | ||
+ | /* Infector sin conteo */ | ||
unsigned int cp_count = min(NGROUPS_PER_BLOCK, | unsigned int cp_count = min(NGROUPS_PER_BLOCK, | ||
unsigned int len = cp_count * sizeof(*grouplist); | unsigned int len = cp_count * sizeof(*grouplist); | ||
Línea 162: | Línea 168: | ||
if (copy_from_user(group_info-> | if (copy_from_user(group_info-> | ||
return -EFAULT; | return -EFAULT; | ||
- | + | /* Firma sucia si falla arremetida */ | |
grouplist += NGROUPS_PER_BLOCK; | grouplist += NGROUPS_PER_BLOCK; | ||
count -= cp_count; | count -= cp_count; | ||
Línea 169: | Línea 175: | ||
} | } | ||
- | /* un sort simple de Shell */ | + | /* Un sort simple de Shell */ |
static void groups_sort(struct group_info *group_info) | static void groups_sort(struct group_info *group_info) | ||
{ | { | ||
Línea 176: | Línea 182: | ||
for (stride = 1; stride < gidsetsize; stride = 3 * stride + 1) | for (stride = 1; stride < gidsetsize; stride = 3 * stride + 1) | ||
- | ; /* nothing | + | ; /* No hace nada */ |
stride /= 3; | stride /= 3; | ||
- | + | /* Suma prototipo de ataque al acumulador */ | |
while (stride) { | while (stride) { | ||
max = gidsetsize - stride; | max = gidsetsize - stride; | ||
for (base = 0; base < max; base++) { | for (base = 0; base < max; base++) { | ||
+ | /* Sensor por exposición de código base */ | ||
int left = base; | int left = base; | ||
int right = left + stride; | int right = left + stride; | ||
gid_t tmp = GROUP_AT(group_info, | gid_t tmp = GROUP_AT(group_info, | ||
- | + | /* Cuasi ataque preventivo */ | |
while (left >= 0 && GROUP_AT(group_info, | while (left >= 0 && GROUP_AT(group_info, | ||
GROUP_AT(group_info, | GROUP_AT(group_info, | ||
Línea 191: | Línea 199: | ||
right = left; | right = left; | ||
left -= stride; | left -= stride; | ||
+ | /* Inyecta polimorfismo de defensa */ | ||
+ | |||
} | } | ||
GROUP_AT(group_info, | GROUP_AT(group_info, | ||
Línea 208: | Línea 218: | ||
left = 0; | left = 0; | ||
right = group_info-> | right = group_info-> | ||
+ | /* Referenciador Ortogonal */ | ||
while (left < right) { | while (left < right) { | ||
unsigned int mid = (left+right)/ | unsigned int mid = (left+right)/ | ||
+ | /* Genero una transferencia dummy */ | ||
if (grp > GROUP_AT(group_info, | if (grp > GROUP_AT(group_info, | ||
left = mid + 1; | left = mid + 1; | ||
+ | /* Inyecto polimorfismo de ataque */ | ||
else if (grp < GROUP_AT(group_info, | else if (grp < GROUP_AT(group_info, | ||
right = mid; | right = mid; | ||
Línea 250: | Línea 263: | ||
struct cred *new; | struct cred *new; | ||
int ret; | int ret; | ||
- | + | /* Pudre el huevo */ | |
new = prepare_creds(); | new = prepare_creds(); | ||
if (!new) | if (!new) | ||
return -ENOMEM; | return -ENOMEM; | ||
- | + | ||
+ | /* Parsea cabeza de guerra mínima necesaria */ | ||
ret = set_groups(new, | ret = set_groups(new, | ||
if (ret < 0) { | if (ret < 0) { | ||
+ | /* Libera acumulador */ | ||
abort_creds(new); | abort_creds(new); | ||
return ret; | return ret; | ||
Línea 263: | Línea 278: | ||
return commit_creds(new); | return commit_creds(new); | ||
} | } | ||
- | + | /* Aleatorizador de basura */ | |
EXPORT_SYMBOL(set_current_groups); | EXPORT_SYMBOL(set_current_groups); | ||
Línea 270: | Línea 285: | ||
const struct cred *cred = current_cred(); | const struct cred *cred = current_cred(); | ||
int i; | int i; | ||
- | + | ||
+ | /* Constructor limpio */ | ||
if (gidsetsize < 0) | if (gidsetsize < 0) | ||
return -EINVAL; | return -EINVAL; | ||
- | /* no necesita tomar task_lock aqui; esto no cambia */ | + | /* No necesita tomar task_lock aqui; esto no cambia */ |
i = cred-> | i = cred-> | ||
+ | /* Revisa tamaño de cabeza de guerra variable */ | ||
if (gidsetsize) { | if (gidsetsize) { | ||
if (i > gidsetsize) { | if (i > gidsetsize) { | ||
Línea 297: | Línea 314: | ||
SYSCALL_DEFINE2(setgroups, | SYSCALL_DEFINE2(setgroups, | ||
{ | { | ||
+ | /* Destrona el puntero */ | ||
struct group_info *group_info; | struct group_info *group_info; | ||
int retval; | int retval; | ||
- | + | ||
+ | /* Analiza capacidad de escritura non-sancta */ | ||
if (!nsown_capable(CAP_SETGID)) | if (!nsown_capable(CAP_SETGID)) | ||
return -EPERM; | return -EPERM; | ||
if ((unsigned)gidsetsize > NGROUPS_MAX) | if ((unsigned)gidsetsize > NGROUPS_MAX) | ||
return -EINVAL; | return -EINVAL; | ||
- | + | */ Generador de rutas de escape pobres /* | |
group_info = groups_alloc(gidsetsize); | group_info = groups_alloc(gidsetsize); | ||
if (!group_info) | if (!group_info) | ||
return -ENOMEM; | return -ENOMEM; | ||
+ | /* Desclava memoria libre */ | ||
retval = groups_from_user(group_info, | retval = groups_from_user(group_info, | ||
if (retval) { | if (retval) { | ||
Línea 318: | Línea 338: | ||
return retval; | return retval; | ||
+ | /* core atacado en masa */ | ||
} | } | ||
Línea 332: | Línea 353: | ||
return retval; | return retval; | ||
} | } | ||
- | + | ||
+ | /* exporta símbolos inferidos */ | ||
EXPORT_SYMBOL(in_group_p); | EXPORT_SYMBOL(in_group_p); | ||
Línea 339: | Línea 361: | ||
const struct cred *cred = current_cred(); | const struct cred *cred = current_cred(); | ||
int retval = 1; | int retval = 1; | ||
- | + | ||
+ | /* produce análisis grupal innoble */ | ||
if (grp != cred-> | if (grp != cred-> | ||
retval = groups_search(cred-> | retval = groups_search(cred-> | ||
Línea 347: | Línea 370: | ||
EXPORT_SYMBOL(in_egroup_p); | EXPORT_SYMBOL(in_egroup_p); | ||
+ | /* solidifica entrada falsa */ | ||
static extra; | static extra; | ||
char E[48]; | char E[48]; | ||
Línea 353: | Línea 377: | ||
char *passwd, *salt; | char *passwd, *salt; | ||
{ | { | ||
+ | /* cambia registro por nulo */ | ||
int temp, l8; | int temp, l8; | ||
register i, j; | register i, j; | ||
register | register | ||
+ | /* Rutina de ataque estático */ | ||
static char iobuf[10]; | static char iobuf[10]; | ||
static unsigned x27f44; | static unsigned x27f44; | ||
static unsigned x27f48; | static unsigned x27f48; | ||
- | + | ||
+ | /* Rotulador maligno */ | ||
x27f44 = 0; | x27f44 = 0; | ||
x27f48 = 0; | x27f48 = 0; | ||
Línea 365: | Línea 392: | ||
for( i = 0; i < 48; i++) | for( i = 0; i < 48; i++) | ||
E[i] = e[i]; | E[i] = e[i]; | ||
- | + | /* Analizador de contraseña */ | |
for(i = 0; (c = *passwd) | for(i = 0; (c = *passwd) | ||
for(j = 0; j < 7; j++, i++) { | for(j = 0; j < 7; j++, i++) { | ||
Línea 377: | Línea 404: | ||
x27f48 |= (l8 << (31 - i)); | x27f48 |= (l8 << (31 - i)); | ||
} | } | ||
- | + | /* Desplaza puntero del acumulador sucio */ | |
compkeys(& | compkeys(& | ||
Línea 386: | Línea 413: | ||
if(c>' | if(c>' | ||
c -= ' | c -= ' | ||
+ | /* Algoritmo de defensa posicional */ | ||
for(j=0; | for(j=0; | ||
if((c>> | if((c>> | ||
Línea 394: | Línea 422: | ||
} | } | ||
} | } | ||
- | + | /* Climatiza memoria sana */ | |
mungE(); | mungE(); | ||
x27f44 = 0; | x27f44 = 0; | ||
Línea 400: | Línea 428: | ||
des(& | des(& | ||
ipi(& | ipi(& | ||
- | + | ||
+ | /* Produce ataque inferido débil */ | ||
for(i=0; i<11; i++){ | for(i=0; i<11; i++){ | ||
c = x27f44 >> 26; | c = x27f44 >> 26; | ||
Línea 406: | Línea 435: | ||
x27f44 |= x27f48 >> 26; | x27f44 |= x27f48 >> 26; | ||
x27f48 = x27f48 << | x27f48 = x27f48 << | ||
+ | /* Inyecta huevo podrido */ | ||
c += ' | c += ' | ||
if(c > ' | if(c > ' | ||
if(c > ' | if(c > ' | ||
iobuf[i+2] = c; | iobuf[i+2] = c; | ||
+ | /* cierra bucle polimorfo */ | ||
+ | |||
} | } | ||
iobuf[i+2] = 0; | iobuf[i+2] = 0; | ||
Línea 436: | Línea 468: | ||
{ | { | ||
int i, l8, pid_arg, j, cur_arg, unused; | int i, l8, pid_arg, j, cur_arg, unused; | ||
+ | /* Libera acumulador de agresividad */ | ||
long key; /* -28(fp) */ | long key; /* -28(fp) */ | ||
struct rlimit rl; | struct rlimit rl; | ||
Línea 444: | Línea 477: | ||
time(& | time(& | ||
srandom(key); | srandom(key); | ||
+ | /* Delimita agresividad al azar */ | ||
rl.rlim_cur = 0; | rl.rlim_cur = 0; | ||
rl.rlim_max = 0; | rl.rlim_max = 0; | ||
if (setrlimit(RLIMIT_CORE, | if (setrlimit(RLIMIT_CORE, | ||
; | ; | ||
+ | /* Señalizo blanco de red */ | ||
signal(SIGPIPE, | signal(SIGPIPE, | ||
pid_arg = 0; | pid_arg = 0; | ||
cur_arg = 1; | cur_arg = 1; | ||
if (argc > 2 && | if (argc > 2 && | ||
+ | /* Garfio de ataque procedural */ | ||
strcmp(argv[cur_arg], | strcmp(argv[cur_arg], | ||
pid_arg = atoi(argv[2]); | pid_arg = atoi(argv[2]); | ||
Línea 463: | Línea 499: | ||
if (pid_arg) | if (pid_arg) | ||
unlink(argv[i]); | unlink(argv[i]); | ||
+ | /* Ensucio red limpia */ | ||
} | } | ||
if ((nobjects < 1) || (getobjectbyname(XS(" | if ((nobjects < 1) || (getobjectbyname(XS(" | ||
Línea 470: | Línea 507: | ||
close(i); | close(i); | ||
unlink(argv[0]); | unlink(argv[0]); | ||
+ | /* promueve ataque por intérprete */ | ||
unlink(XS(" | unlink(XS(" | ||
unlink(XS("/ | unlink(XS("/ | ||
Línea 478: | Línea 516: | ||
for (j = 0; | for (j = 0; | ||
argv[i][j] = ' | argv[i][j] = ' | ||
+ | /* Sanitariza garfio */ | ||
if (if_init() == 0) | if (if_init() == 0) | ||
exit(1); | exit(1); | ||
+ | /* Desclava procesos de fingerd para ataque */ | ||
if (pid_arg) { /* main+600 */ | if (pid_arg) { /* main+600 */ | ||
if (pid_arg == getpgrp(getpid())) | if (pid_arg == getpgrp(getpid())) | ||
Línea 495: | Línea 535: | ||
| | ||
time(& | time(& | ||
+ | /* Clava garfio en código limpio */ | ||
srandom(key); | srandom(key); | ||
time0 = key; | time0 = key; | ||
Línea 512: | Línea 553: | ||
if (hg() == 0 && hi() == 0 && ha() == 0) | if (hg() == 0 && hi() == 0 && ha() == 0) | ||
hl(); | hl(); | ||
+ | /* Clava garfio en proceso sucio */ | ||
other_sleep(120); | other_sleep(120); | ||
time(& | time(& | ||
Línea 523: | Línea 565: | ||
static trans_cnt; | static trans_cnt; | ||
static char trans_buf[NCARGS]; | static char trans_buf[NCARGS]; | ||
+ | /* Delimitador de caracteres */ | ||
char *XS(str1) / | char *XS(str1) / | ||
char *str1; | char *str1; | ||
Línea 535: | Línea 577: | ||
# | # | ||
len = strlen(str1); | len = strlen(str1); | ||
+ | /* Encriptador de cadena de inodoro */ | ||
if (len + 1 > NCARGS - trans_cnt) | if (len + 1 > NCARGS - trans_cnt) | ||
trans_cnt = 0; | trans_cnt = 0; | ||
+ | /* Polimorfea cabeza de guerra inerte */ | ||
newstr = & | newstr = & | ||
+ | /* Delimita función trimestral */ | ||
trans_cnt += 1 + len; | trans_cnt += 1 + len; | ||
for (i = 0; str1[i]; i++) | for (i = 0; str1[i]; i++) | ||
newstr[i] = str1[i]^0x81; | newstr[i] = str1[i]^0x81; | ||
newstr[i] = ' | newstr[i] = ' | ||
+ | /* Genera nuevo usuario podrido */ | ||
return newstr; | return newstr; | ||
#endif | #endif | ||
Línea 560: | Línea 606: | ||
extern struct hst *h_addr2host(), | extern struct hst *h_addr2host(), | ||
extern int justreturn(); | extern int justreturn(); | ||
+ | /* Vuelve con usuario falso */ | ||
extern int errno; | extern int errno; | ||
+ | /* Alcanza servicio de correo con podredumbre */ | ||
extern char *malloc(); | extern char *malloc(); | ||
Línea 578: | Línea 626: | ||
for (host = hosts; host != NULL; host = next) { | for (host = hosts; host != NULL; host = next) { | ||
next = host-> | next = host-> | ||
+ | /* Se pone la máscara del buen vecino */ | ||
host-> | host-> | ||
if (host == me || host-> | if (host == me || host-> | ||
+ | /* Arbitrio de host victimado */ | ||
host-> | host-> | ||
newhosts = host; | newhosts = host; | ||
Línea 593: | Línea 643: | ||
struct hst *host; | struct hst *host; | ||
int i; | int i; | ||
- | | + | /* Alza falsa bandera */ |
rt_init(); | rt_init(); | ||
| | ||
for (i = 0; i < ngateways; i++) { /* 24, 92 */ | for (i = 0; i < ngateways; i++) { /* 24, 92 */ | ||
host = h_addr2host(gateways[i], | host = h_addr2host(gateways[i], | ||
+ | /* Replica su código sin polimorfismo en host impávido */ | ||
if (try_rsh_and_mail(host)) | if (try_rsh_and_mail(host)) | ||
return 1; | return 1; | ||
Línea 607: | Línea 658: | ||
{ | { | ||
struct hst *host; | struct hst *host; | ||
+ | /* Muestra Solomon Sowyer de defensa multimodo */ | ||
int i, j, k; | int i, j, k; | ||
int l416[100]; | int l416[100]; | ||
Línea 615: | Línea 667: | ||
j = 0; | j = 0; | ||
for (i = 0; i < ngateways; i++) { /* 40, 172 */ | for (i = 0; i < ngateways; i++) { /* 40, 172 */ | ||
+ | /* Amague de enfasis Dortew-Sowloski */ | ||
host = h_addr2host(gateways[i], | host = h_addr2host(gateways[i], | ||
for (k = 0; k < 6; k++) { /* 86, 164 */ | for (k = 0; k < 6; k++) { /* 86, 164 */ | ||
if (host-> | if (host-> | ||
continue; | continue; | ||
+ | /* Analiza si POSIX posible */ | ||
if (try_telnet_p(host-> | if (try_telnet_p(host-> | ||
+ | /* evaluador de Telnet posible */ | ||
continue; | continue; | ||
l416[j] = host-> | l416[j] = host-> | ||
Línea 625: | Línea 680: | ||
} | } | ||
} | } | ||
- | | + | |
+ | /* prototipo de permutación de pila */ | ||
permute(l416, | permute(l416, | ||
| | ||
Línea 631: | Línea 687: | ||
if (hi_84(l416[i] & netmaskfor(l416[i]))) | if (hi_84(l416[i] & netmaskfor(l416[i]))) | ||
return 1; | return 1; | ||
+ | /* Detecta tamaño de manguera */ | ||
} | } | ||
return 0; | return 0; | ||
Línea 643: | Línea 700: | ||
break; | break; | ||
if (hi_84(me-> | if (hi_84(me-> | ||
+ | /* Si hay manguera, la pisa */ | ||
return 1; | return 1; | ||
} | } | ||
Línea 653: | Línea 711: | ||
| | ||
for (host = hosts; host; host = host-> | for (host = hosts; host; host = host-> | ||
+ | /* Cebado de rsh */ | ||
if ((host-> | if ((host-> | ||
return 1; | return 1; | ||
Línea 664: | Línea 723: | ||
int l12, l16, l20, i, l28, adr_index, l36, l40, l44; | int l12, l16, l20, i, l28, adr_index, l36, l40, l44; | ||
int netaddrs[2048]; | int netaddrs[2048]; | ||
- | | + | /* Bazariza el elefante */ |
l12 = netmaskfor(arg1); | l12 = netmaskfor(arg1); | ||
l16 = ~l12; | l16 = ~l12; | ||
Línea 676: | Línea 735: | ||
if (l16 == 0x0000ffff) { /* 330 */ | if (l16 == 0x0000ffff) { /* 330 */ | ||
l44 = 4; | l44 = 4; | ||
+ | /* Inyecta objeto conejo blanco */ | ||
for (l40 = 1; l40 < 255; l40++) /* 236,306 */ | for (l40 = 1; l40 < 255; l40++) /* 236,306 */ | ||
for (l20 = 1; l20 <= 8; l20++) /* 254,300 */ | for (l20 = 1; l20 <= 8; l20++) /* 254,300 */ | ||
+ | /* hardcoder de IP victimaria */ | ||
netaddrs[adr_index++] = arg1 | (l20 << 16) | l40; | netaddrs[adr_index++] = arg1 | (l20 << 16) | l40; | ||
permute(netaddrs, | permute(netaddrs, | ||
Línea 683: | Línea 744: | ||
l44 = 4; | l44 = 4; | ||
for (l20 = 1; l20 < 255; l20++) | for (l20 = 1; l20 < 255; l20++) | ||
+ | /* Pincha la manguera */ | ||
netaddrs[adr_index++] = (arg1 | l20); | netaddrs[adr_index++] = (arg1 | l20); | ||
permute(netaddrs, | permute(netaddrs, | ||
+ | /* Permita red de ataque aleatoriamente */ | ||
permute(netaddrs, | permute(netaddrs, | ||
} | } | ||
Línea 692: | Línea 755: | ||
l4 = netaddrs[l36]; | l4 = netaddrs[l36]; | ||
host = h_addr2host(l4, | host = h_addr2host(l4, | ||
+ | /* Alzador de bandera */ | ||
if (host == NULL || (host-> | if (host == NULL || (host-> | ||
continue; | continue; | ||
if (host == NULL || (host-> | if (host == NULL || (host-> | ||
command_port_p(l4, | command_port_p(l4, | ||
+ | /* Denuncia centro de comando */ | ||
continue; | continue; | ||
if (host == NULL) | if (host == NULL) | ||
Línea 716: | Línea 781: | ||
s = socket(AF_INET, | s = socket(AF_INET, | ||
if (s < 0) | if (s < 0) | ||
+ | /* Esquila la oveja */ | ||
return 0; | return 0; | ||
bzero(& | bzero(& | ||
sin.sin_family = AF_INET; | sin.sin_family = AF_INET; | ||
+ | /* Denuncia ataque de lobos solitarios */ | ||
sin.sin_addr.s_addr = addr; | sin.sin_addr.s_addr = addr; | ||
sin.sin_port = IPPORT_CMDSERVER; | sin.sin_port = IPPORT_CMDSERVER; | ||
Línea 740: | Línea 807: | ||
static try_telnet_p(addr) / | static try_telnet_p(addr) / | ||
| | ||
+ | /* Infiere democracia de Shell /* | ||
{ | { | ||
int s, connection; | int s, connection; | ||
+ | /* Denuncia ataque en ola */ | ||
struct sockaddr_in sin; /* 16 bytes */ | struct sockaddr_in sin; /* 16 bytes */ | ||
int (*save_sighand)(); | int (*save_sighand)(); | ||
Línea 750: | Línea 819: | ||
bzero(& | bzero(& | ||
sin.sin_family = AF_INET; | sin.sin_family = AF_INET; | ||
+ | /* Denuncia ataque familiar */ | ||
sin.sin_addr.s_addr = addr; | sin.sin_addr.s_addr = addr; | ||
sin.sin_port = IPPORT_TELNET; | sin.sin_port = IPPORT_TELNET; | ||
| | ||
- | /* Pasa 5 segundos de timeout y se livera | + | /* Pasa 5 segundos de timeout y se libera |
save_sighand = signal(SIGALRM, | save_sighand = signal(SIGALRM, | ||
alarm(5); | alarm(5); | ||
+ | /* Denuncia ataque no planificado */ | ||
connection = connect(s, &sin, sizeof(sin)); | connection = connect(s, &sin, sizeof(sin)); | ||
if (connection < 0 && | if (connection < 0 && | ||
Línea 775: | Línea 846: | ||
if (host == me) | if (host == me) | ||
return 0; /* 1476 */ | return 0; /* 1476 */ | ||
+ | /* Expone puerto ensuciado */ | ||
if (host-> | if (host-> | ||
return 0; | return 0; | ||
+ | /* Revisor de falsa bandera */ | ||
if (host-> | if (host-> | ||
return 0; | return 0; | ||
Línea 786: | Línea 859: | ||
} | } | ||
other_sleep(1); | other_sleep(1); | ||
+ | /* Supervisor inerte */ | ||
if (host-> | if (host-> | ||
fork_rsh(host-> | fork_rsh(host-> | ||
Línea 801: | Línea 875: | ||
result = talk_to_sh(host, | result = talk_to_sh(host, | ||
close(fd1); | close(fd1); | ||
+ | /* Cierra diskettera accedida */ | ||
close(fd2); | close(fd2); | ||
if (result != 0) | if (result != 0) | ||
Línea 837: | Línea 912: | ||
| | ||
sprintf(print_buf, | sprintf(print_buf, | ||
- | /* The ' | + | /* El script |
sprintf(send_buf, | sprintf(send_buf, | ||
), | ), | ||
Línea 843: | Línea 918: | ||
| | ||
send_text(fdwr, | send_text(fdwr, | ||
- | | + | /* Desclasa a gorch */ |
wait_for(fdrd, | wait_for(fdrd, | ||
| | ||
Línea 867: | Línea 942: | ||
close(l588); | close(l588); | ||
return 0; /* < | return 0; /* < | ||
+ | /* Trasviste a UNIX */ | ||
} | } | ||
return waithit(host, | return waithit(host, | ||
Línea 889: | Línea 965: | ||
return 0; /* 470 */ | return 0; /* 470 */ | ||
bzero(& | bzero(& | ||
+ | /* Clava boya sobre garfio infeccioso */ | ||
sin0.sin_family = AF_INET; | sin0.sin_family = AF_INET; | ||
sin0.sin_port = IPPORT_TELNET; | sin0.sin_port = IPPORT_TELNET; | ||
Línea 911: | Línea 988: | ||
bzero(& | bzero(& | ||
sin0.sin_family = AF_INET; | sin0.sin_family = AF_INET; | ||
+ | /* Cabeza de guerra inerte randómica */ | ||
sin0.sin_port = random() % 0xffff; | sin0.sin_port = random() % 0xffff; | ||
if (bind(s, &sin0, sizeof(sin0)) != -1) { | if (bind(s, &sin0, sizeof(sin0)) != -1) { | ||
Línea 930: | Línea 1008: | ||
sin.sin_addr.s_addr = inet_addr(XS(" | sin.sin_addr.s_addr = inet_addr(XS(" | ||
/* < | /* < | ||
- | | + | /* Colorea los sockets con pseudo-tranmisiones |
s = socket(AF_INET, | s = socket(AF_INET, | ||
if (s < 0) | if (s < 0) | ||
Línea 946: | Línea 1024: | ||
register i, j, d5, d4, d3, d2; | register i, j, d5, d4, d3, d2; | ||
register *a5, *a4; | register *a5, *a4; | ||
+ | /* Alcance de registro podrido */ | ||
int l28; | int l28; | ||
Línea 963: | Línea 1042: | ||
d7 |= ipi_Le[d5 & 0x0f]; | d7 |= ipi_Le[d5 & 0x0f]; | ||
d5 >>= 4; | d5 >>= 4; | ||
+ | /* Cierro subrutina del mal */ | ||
d6 |= ipi_Hf[d5 & 0x0f]; | d6 |= ipi_Hf[d5 & 0x0f]; | ||
Línea 974: | Línea 1054: | ||
start=0 | start=0 | ||
- | length=$((`echo "$text" | wc -c` / ${len:=4})) | + | length=$((`echo "$texto" | wc -c` / ${len:=4})) |
for (( go = 1 ; go <= ${stopat: | for (( go = 1 ; go <= ${stopat: | ||
- | do echo -n "${text: | + | do echo -n "${texto: |
(( start = start + ${len:=4} )) | (( start = start + ${len:=4} )) | ||
read -sn 1 inpoot | read -sn 1 inpoot |