(shellcodes)
| 171 | ) |
| 172 | |
| 173 | def get_template(shellcodes): |
| 174 | funcs = [] |
| 175 | for shellcode in shellcodes: |
| 176 | func = shellcraft |
| 177 | cur_name = shellcode[0] |
| 178 | args = [] |
| 179 | if len(shellcode) > 1: |
| 180 | args = shellcode[1:] |
| 181 | for attr in cur_name.split('.'): |
| 182 | func = getattr(func, attr) |
| 183 | funcs.append((cur_name, func, args)) |
| 184 | return funcs |
| 185 | |
| 186 | def is_not_a_syscall_template(name): |
| 187 | template_src = shellcraft._get_source(name) |