This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| === gen.py === | |
| #!/usr/bin/python3 | |
| def glob_format(s): | |
| g = globals().copy() | |
| if 'n' in g: | |
| g['n_inc'] = (g['n'] + 1) % 256 | |
| g['n_dec'] = (g['n'] - 1) % 256 | |
| g['n_c'] = chr(g['n']) | |
| if 'c' in g: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| window.onload = function() { alert('XSS!'); } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .text | |
| .global _start | |
| _start: # syscall is done by %rax(%rdi, %rsi, %rdx) | |
| # read(fd, buf, count) | |
| # we want read one char from stdin, so %rax = 1; %rdi = 1; %rsi = buffer; %rdx = 1 | |
| movq $buffer, %rsi # pointer to buffer | |
| movq $0, %rdi # STDIN_FILENO | |
| movq $1, %rdx # one char | |
| rchar: movq $0, %rax # syscall read number (as defined in asm/unistd.h) |
NewerOlder