(self)
| 7 | class Java(Plugin): |
| 8 | |
| 9 | def language_init(self): |
| 10 | |
| 11 | self.update_actions({ |
| 12 | |
| 13 | 'execute' : { |
| 14 | 'test_cmd': bash.echo % { 's1': rand.randstrings[2] }, |
| 15 | 'test_cmd_expected': rand.randstrings[2], |
| 16 | 'test_os' : """uname""", |
| 17 | 'test_os_expected': '^[\w-]+$' |
| 18 | }, |
| 19 | |
| 20 | 'read' : { |
| 21 | 'call': 'execute', |
| 22 | 'read' : """base64<'%(path)s'""" |
| 23 | }, |
| 24 | 'md5' : { |
| 25 | 'call': 'execute', |
| 26 | 'md5': """$(type -p md5 md5sum)<'%(path)s'|head -c 32""" |
| 27 | }, |
| 28 | # Prepared to used only for blind detection. Not useful for time-boolean |
| 29 | # tests (since && characters can\'t be used) but enough for the detection phase. |
| 30 | 'blind' : { |
| 31 | 'call': 'execute_blind', |
| 32 | 'test_bool_true' : 'true', |
| 33 | 'test_bool_false' : 'false' |
| 34 | }, |
| 35 | 'bind_shell' : { |
| 36 | 'call' : 'execute_blind', |
| 37 | 'bind_shell': bash.bind_shell |
| 38 | }, |
| 39 | 'reverse_shell' : { |
| 40 | 'call': 'execute_blind', |
| 41 | 'reverse_shell' : bash.reverse_shell |
| 42 | } |
| 43 | }) |
| 44 | |
| 45 | language = 'java' |
| 46 |
nothing calls this directly
no test coverage detected