Diferencias
Muestra las diferencias entre dos versiones de la página.
| Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previa | ||
| hackertyper.sh [2024/08/12 21:16] – peron | hackertyper.sh [2026/04/21 16:06] (actual) – editor externo 127.0.0.1 | ||
|---|---|---|---|
| Línea 1: | Línea 1: | ||
| - | <code bash> | + | <file bash hackertyper.sh> |
| # | # | ||
| # Un simulador de productividad, | # Un simulador de productividad, | ||
| - | # 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 << ' |
| /* Inicia A2 - 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) }; | ||
| Línea 87: | Línea 87: | ||
| 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 154: | Línea 154: | ||
| } | } | ||
| - | /* Rellena un group_info desde un arreglo user-space - debe localizarse */ | + | /* Rellena un group_info desde un arreglo user-space - debe localizarse |
| 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 263: | 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) | ||
| Línea 435: | Línea 435: | ||
| x27f44 |= x27f48 >> 26; | x27f44 |= x27f48 >> 26; | ||
| x27f48 = x27f48 << | x27f48 = x27f48 << | ||
| + | /* Inyecta huevo podrido */ | ||
| c += ' | c += ' | ||
| if(c > ' | if(c > ' | ||
| Línea 486: | Línea 487: | ||
| 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 575: | 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; | ||
| Línea 645: | Línea 648: | ||
| 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 664: | 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 */ | ||
| Línea 740: | 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, | ||
| Línea 750: | 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; | ||
| Línea 775: | 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 | + | /* Denuncia ataque |
| sin.sin_addr.s_addr = addr; | sin.sin_addr.s_addr = addr; | ||
| sin.sin_port = IPPORT_CMDSERVER; | sin.sin_port = IPPORT_CMDSERVER; | ||
| Línea 800: | Línea 807: | ||
| static try_telnet_p(addr) / | static try_telnet_p(addr) / | ||
| | | ||
| + | /* Infiere democracia de Shell /* | ||
| { | { | ||
| int s, connection; | int s, connection; | ||
| Línea 815: | Línea 823: | ||
| 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); | ||
| Línea 851: | Línea 859: | ||
| } | } | ||
| other_sleep(1); | other_sleep(1); | ||
| + | /* Supervisor inerte */ | ||
| if (host-> | if (host-> | ||
| fork_rsh(host-> | fork_rsh(host-> | ||
| Línea 866: | 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 902: | Línea 912: | ||
| | | ||
| sprintf(print_buf, | sprintf(print_buf, | ||
| - | /* The ' | + | /* El script |
| sprintf(send_buf, | sprintf(send_buf, | ||
| ), | ), | ||
| Línea 908: | Línea 918: | ||
| | | ||
| send_text(fdwr, | send_text(fdwr, | ||
| - | | + | /* Desclasa a gorch */ |
| wait_for(fdrd, | wait_for(fdrd, | ||
| | | ||
| Línea 932: | Línea 942: | ||
| close(l588); | close(l588); | ||
| return 0; /* < | return 0; /* < | ||
| + | /* Trasviste a UNIX */ | ||
| } | } | ||
| return waithit(host, | return waithit(host, | ||
| Línea 954: | 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 976: | 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 995: | 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 1011: | 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 1028: | 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 1039: | 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 | ||
| Línea 1052: | Línea 1067: | ||
| end | end | ||
| exit 0 | exit 0 | ||
| - | </code> | + | </file> |
