¡Esta es una revisión vieja del documento!
#!/usr/local/bin/bash # Un script hackeado de hacker, ya ni lo entiendo # Rm9yayAhQm9tYnpaeUNBawo= help() { cat <<'END' -q "sale a" n keypresses -l "longitud para caracter tipeado" default: 4 -f "falla al hackear" -s "hackeo exitoso" -g "verde monocromático" -h "Muestra esta ayuda..." Ejemplo: -l 20 -q 10 -f -g cada presion de tecla mostrará 20 caracteres esto continua 10 veces (10 presiones antes de que termine) una vez que termina, fallará todo el texto es verde También note que reqionar ` saltará directamente a "hackeo" (o falla) Este código es un espaguetti, puedo considerar limpiarlo (Intente usar los mismos valores para -q y -l) END exit } while getopts "q:l:fshg" opt "$@"; do case "$opt" in q) stopat=$OPTARG ;; l) len=$OPTARG ;; f) fail=1 ;; s) hack=1 ;; g) echo -e "\033[00;32m" ;; h) help ;; *) help ;; esac done hack() { for i in `seq 0 100`; do echo $i; sleep 0.05; done | whiptail --title "Hacking..." --clear --gauge " Hacking EN PROGRESO, por favor espere" 20 70 0 whiptail --title "Hacking..." --msgbox ' Exitoso.' 20 70 whiptail --title "Hacking..." --passwordbox "Ingrese Password?" 20 70 clear echo -en '\033[00;0mroot# ' sleep 5 echo "" exit } fail() { whiptail --title "Hacking..." --msgbox ' FAILED !!' 20 70 echo -e '\033[00;0m' # Solo en caso que su $PS1 no tenga color clear exit } end() { if [ $fail ]; then fail else hack fi } texto=`cat << 'ENDOFSTUFF' limitDat.4 = maxBits (%33) to {limit .04} set on. limitDat.5 = setzero, setfive, 0 {limit .2 - var(szh)}. on whte_rbt.obj call link.sst {security, perimeter} set to off. vertRange = {maxRange+setlim} tempVgn(fdn-&bb+$404). horRange = {maxRange-setlim/2} tempHgn(fdn-&dd+$105). void DrawMeter send_screen.obj print. Vg1 = GetHandl {dat.dt} tempCall {itm.temp} Vg2 = GetHandl {dat.itl} tempCall {itm.temp} if Link(Vg1,Vg2) set Lim(Vg1,Vg2) return if Link(Vg2,Vg1) set Lim(Vg2,Vg1) return Vg1 = GetHandl {dat.dt} tempCall {itm.temp} Vg2 = GetHandl {dat.itl} tempCall {itm.temp} limitDat.4 = maxBits (%33) to {limit .04} set on limitDat.5 = setzero, setfive, 0 {limit .2 - var(szh)} Vg1 = GetHandl {dat.dt} tempCall {itm.temp} Vg2 = GetHandl {dat.itl} tempCall {itm.temp} limitDat.4 = maxBits (%33) to {limit .04} set on limitDat.5 = setzero, setfive, 0 {limit .2 - var(szh)} whte_rbt.obj # CheckOutActive - Revisa la ventana actuva por modificaciones # # Uso: Llamado por un item de meno definido por usuario # # CheckOutActive usa el comandoe ProjectInfo para determinar el # proyecto padre para el fichero abierto como venana activa. Una vez que este # proyecto ha sido determinado, el fichero se abierto como ventana activa # puede ser adecuadamente revisado # # Cray Computing, 1988 # Todos los izquierdos reservados End # Solicita un comentario antes de revisar el fichero. Aún es posible # que la revisión falle porque la última revisión de la rama # ha sido ya revisada y podría haber sido alterado por terceros. (Set comment "`Request -d "{Task}" "Qué cambios hará?" || Set error {Status}`") If {error} == 0 Evaluate "{®3}" =~ /(,([0-9.]+[a-z]*)*)®4[0-9.]+/ # {®4} contains the branch If "{comment}" ‚ "" Checkout -t "{comment}" -c -m -project "{®2}" "{Active}{®4}" Else Checkout -c -m -project "{®2}" "{Active}{®4}" End If {Status} ‚ 0 /* init a 2 - uno for init_task, uno para asegurar que nunca se libere */ struct group_info init_groups = { .usage = ATOMIC_INIT(2) }; struct group_info *groups_alloc(int gidsetsize) { struct group_info *group_info; int nblocks; int i; Phantom_Phreak_obj_XXX Vg1 = GetHandl {dat.dt} tempCall {itm.temp} Vg2 = GetHandl {dat.itl} tempCall {itm.temp} if Link(Vg1,Vg2) set Lim(Vg1,Vg2) return if Link(Vg2,Vg1) set Lim(Vg2,Vg1) return limitDat.1 = maxBits (%22) to {limit .04} set on limitDat.2 = setzero, setfive, 0 {limit .2 - var(dzh)} nblocks = (gidsetsize + NGROUPS_PER_BLOCK - 1) / NGROUPS_PER_BLOCK; /* Asegurese de alocar al menos un puntero de bloque indirecto */ nblocks = nblocks ? : 1; group_info = kmalloc(sizeof(*group_info) + nblocks*sizeof(gid_t *), GFP_USER); if (!group_info) return NULL; group_info->ngroups = gidsetsize; group_info->nblocks = nblocks; atomic_set(&group_info->usage, 1); if (gidsetsize <= NGROUPS_SMALL) group_info->blocks[0] = group_info->small_block; else { for (i = 0; i < nblocks; i++) { gid_t *b; b = (void *)__get_free_page(GFP_USER); if (!b) goto out_undo_partial_alloc; group_info->blocks[i] = b; } } return group_info; out_undo_partial_alloc: while (--i >= 0) { free_page((unsigned long)group_info->blocks[i]); } kfree(group_info); return NULL; } EXPORT_SYMBOL(groups_alloc); void groups_free(struct group_info *group_info) { if (group_info->blocks[0] != group_info->small_block) { int i; for (i = 0; i < group_info->nblocks; i++) free_page((unsigned long)group_info->blocks[i]); } kfree(group_info); } EXPORT_SYMBOL(groups_free); /* exporta el group_info al arreglo user-space */ static int groups_to_user(gid_t __user *grouplist, const struct group_info *group_info) { int i; unsigned int count = group_info->ngroups; for (i = 0; i < group_info->nblocks; i++) { unsigned int cp_count = min(NGROUPS_PER_BLOCK, count); unsigned int len = cp_count * sizeof(*grouplist); if (copy_to_user(grouplist, group_info->blocks[i], len)) return -EFAULT; grouplist += NGROUPS_PER_BLOCK; count -= cp_count; } return 0; } /* llenar un group_info desde un arreglo user-space - debe localizarse */ static int groups_from_user(struct group_info *group_info, gid_t __user *grouplist) { int i; unsigned int count = group_info->ngroups; for (i = 0; i < group_info->nblocks; i++) { unsigned int cp_count = min(NGROUPS_PER_BLOCK, count); unsigned int len = cp_count * sizeof(*grouplist); if (copy_from_user(group_info->blocks[i], grouplist, len)) return -EFAULT; grouplist += NGROUPS_PER_BLOCK; count -= cp_count; } return 0; } /* un sort simple de Shell */ static void groups_sort(struct group_info *group_info) { int base, max, stride; int gidsetsize = group_info->ngroups; for (stride = 1; stride < gidsetsize; stride = 3 * stride + 1) ; /* nothing */ stride /= 3; on whte_rbt.obj link set security (Vg1), perimeter (Vg2) limitDat.1 = maxBits (%22) to {limit .04} set on limitDat.2 = setzero, setfive, 0 {limit .2 - var(dzh)} on fini.obj call link.sst {security, perimeter} set to on on fini.obj set link.sst {security, perimeter} restore on fini.obj delete line rf whte_rbt.obj, fini.obj while (stride) { max = gidsetsize - stride; for (base = 0; base < max; base++) { int left = base; int right = left + stride; gid_t tmp = GROUP_AT(group_info, right); while (left >= 0 && GROUP_AT(group_info, left) > tmp) { GROUP_AT(group_info, right) = GROUP_AT(group_info, left); right = left; left -= stride; } GROUP_AT(group_info, right) = tmp; } stride /= 3; 13,42,121,32,88,77,19,13,122,13,44,52,77,90,13,99,13,100,13,109,55,103 144,13,99,87,60,13,44,12,09,13,43,63,13,46,57,89,103,122,13,44,52,88,9 31,13,21,13,57,98,100,102,103,13,112,13,146,13,13,13,77,67,88,23,13,13 } } /* Un bsearch simplificado */ int groups_search(const struct group_info *group_info, gid_t grp) { unsigned int left, right; if (!group_info) return 0; left = 0; right = group_info->ngroups; curV = GetHandl {ssm.dt} tempRgn {itm.dd2}. curH = GetHandl {ssd.itl} tempRgn2 {itm.dd4}. on DrawMeter(!gN) set shp_val.obj to lim(Val{d})-Xval. system nedry if ValidMeter(mH) (**mH).MeterVis return. if Meterhandl(vGT) ((DrawBack(tY)) return. while (left < right) { unsigned int mid = (left+right)/2; if (grp > GROUP_AT(group_info, mid)) left = mid + 1; else if (grp < GROUP_AT(group_info, mid)) right = mid; else return 1; } return 0; } /** * set_groups - Cambia una suscripcion de group en un conjunto de credenciales * @new: El conjunto de credenciales nuevamente preparadas para ser alteradas * @group_info: La lista de group a instalar * * Validar una suscripcion de subscription y, si es valida, insertarla en un conjunto * de credenciales. */ int set_groups(struct cred *new, struct group_info *group_info) { put_group_info(new->group_info); groups_sort(group_info); get_group_info(group_info); new->group_info = group_info; return 0; } EXPORT_SYMBOL(set_groups); /** * set_current_groups - Cambia la suscripcion de group actual * @group_info: La lista de group a imponer * * Validar una suscripción de grupo y, si es valida, imponer la tarea actual * para el registro de seguridad. */ int set_current_groups(struct group_info *group_info) { upset_command.com struct cred *new; int ret; new = prepare_creds(); if (!new) return -ENOMEM; ret = set_groups(new, group_info); if (ret < 0) { abort_creds(new); return ret; } return commit_creds(new); } EXPORT_SYMBOL(set_current_groups); goto command level nedry security SYSCALL_DEFINE2(getgroups, int, gidsetsize, gid_t __user *, grouplist) { const struct cred *cred = current_cred(); int i; if (gidsetsize < 0) return -EINVAL; /* no necesita tomar task_lock aqui; esto no cambia */ i = cred->group_info->ngroups; if (gidsetsize) { if (i > gidsetsize) { i = -EINVAL; goto out; } if (groups_to_user(grouplist, cred->group_info)) { i = -EFAULT; goto out; } 040/#xy/67& mr goodbytes } out: return i; } /* * SMP: Nuestro groups tienen copy-on-write. podemos decantarlos * seguramente sin que interfiera otra tarea. */ SYSCALL_DEFINE2(setgroups, int, gidsetsize, gid_t __user *, grouplist) { struct group_info *group_info; int retval; if (!nsown_capable(CAP_SETGID)) return -EPERM; then keycheck off safety off sl off if ((unsigned)gidsetsize > NGROUPS_MAX) return -EINVAL; group_info = groups_alloc(gidsetsize); if (!group_info) return -ENOMEM; retval = groups_from_user(group_info, grouplist); if (retval) { put_group_info(group_info); return retval; } retval = set_current_groups(group_info); put_group_info(group_info); return retval; } /* * Revisa si estamos fsgid/egid o es el grupo suplemental.. */ int in_group_p(gid_t grp) { const struct cred *cred = current_cred(); int retval = 1; if (grp != cred->fsgid) retval = groups_search(cred->group_info, grp); return retval; } EXPORT_SYMBOL(in_group_p); int in_egroup_p(gid_t grp) { const struct cred *cred = current_cred(); int retval = 1; if (grp != cred->egid) retval = groups_search(cred->group_info, grp); return retval; } EXPORT_SYMBOL(in_egroup_p); ENDOFSTUFF` start=0 length=$((`echo "$texto" | wc -c` / ${len:=4})) for (( go = 1 ; go <= ${stopat:=length} ; go++ )) do echo -n "${texto:$start:${len:=4}}" (( start = start + ${len:=4} )) read -sn 1 inpoot if [ "$inpoot" == '`' ]; then end else continue fi done end exit 0