| 739 | |
| 740 | # check for path traversal |
| 741 | def verify_path(self, path, found={}): |
| 742 | # 1st method: EXISTS |
| 743 | opt1 = self.dir_exists(path) or False |
| 744 | # 2nd method: DIRLIST |
| 745 | dir2 = self.dirlist(path, False) |
| 746 | opt2 = True if dir2 else False |
| 747 | # show fuzzing results |
| 748 | output().fuzzed(path, "", ("", opt1, opt2)) |
| 749 | if opt2: # DIRLIST successful |
| 750 | # add path if not already listed |
| 751 | if dir2 not in list(found.values()): |
| 752 | found[path] = dir2 |
| 753 | output().raw("Listing directory.") |
| 754 | self.do_ls(path) |
| 755 | elif opt1: # only EXISTS successful |
| 756 | found[path] = None |
| 757 | |
| 758 | # check for remote files (write) |
| 759 | def verify_write(self, path, name, data, cmd): |