Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .model small
- .stack 32
- .data
- head1 db "Dipsticks",10,'$'
- head2 db 4 Dup(' '), '$'
- ;; change the value above for a buffer overflow attack
- ; 9 writes it perfectly
- ; 8 removes the E in Equals --> qual
- ;7 removes the Eq in Equals and prints out S from dispsticks in front
- msg1 db "Equal",10,'$'
- msg2 db "Not Equals",10,'$'
- .code
- shamoo proc far
- mov ax, @data
- mov ds, ax
- mov es, ax
- cld
- mov cx, 10
- lea si, head1
- lea di, head2
- REP MOVsB
- cld
- mov cx, 10
- lea si, head1
- lea di, head2
- REPE CMPSB
- JE L1
- LEA Dx, msg2
- mov ah, 09h
- int 21h
- jmp a30
- L1:
- lea dx, msg1
- mov ah, 09h
- int 21h
- a30:
- mov ax, 4c00h
- int 21h
- shamoo endp
- end shamoo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement