| skipped 36 lines |
37 | 37 | | self.wayback_parsing() |
38 | 38 | | utils.just_waiting(self.options, self.module_name, seconds=10) |
39 | 39 | | self.get_response() |
| 40 | + | self.linkfinder() |
40 | 41 | | |
41 | 42 | | # just check if http service running on it or not |
42 | 43 | | def get_http(self): |
| 44 | + | utils.print_good('Starting httprobe') |
43 | 45 | | if self.is_direct: |
44 | 46 | | if utils.not_empty_file(self.is_direct): |
45 | 47 | | cmd = 'cat {0} | $GO_PATH/httprobe -c 100 -t 20000 -v | tee $WORKSPACE/assets/http-$OUTPUT.txt'.format( |
46 | 48 | | self.is_direct) |
47 | 49 | | # just return if direct input is just a string |
48 | 50 | | else: |
49 | | - | utils.print_bad("Required input as a file.") |
| 51 | + | utils.print_bad("httprobe required input as a file.") |
50 | 52 | | return None |
51 | 53 | | else: |
52 | 54 | | cmd = 'cat $WORKSPACE/subdomain/final-$OUTPUT.txt | $GO_PATH/httprobe -c 100 -t 20000 -v | tee $WORKSPACE/assets/http-$OUTPUT.txt' |
| skipped 5 lines |
58 | 60 | | self.options, '$WORKSPACE/assets/http-$OUTPUT.txt') |
59 | 61 | | execute.send_cmd(self.options, cmd, output_path, |
60 | 62 | | std_path, self.module_name) |
| 63 | + | utils.print_line() |
61 | 64 | | |
62 | 65 | | # grab url from waybackurl |
63 | 66 | | def wayback_parsing(self): |
| skipped 7 lines |
71 | 74 | | self.is_direct) |
72 | 75 | | # just return if direct input is just a string |
73 | 76 | | else: |
74 | | - | cmd = 'cat {0} | $GO_PATH/waybackurls | tee $WORKSPACE/assets/wayback-$OUTPUT.txt'.format( |
| 77 | + | cmd = 'echo {0} | $GO_PATH/waybackurls | tee $WORKSPACE/assets/wayback-$OUTPUT.txt'.format( |
75 | 78 | | self.is_direct) |
76 | 79 | | else: |
77 | 80 | | |
| skipped 8 lines |
86 | 89 | | std_path = utils.replace_argument( |
87 | 90 | | self.options, '$WORKSPACE/assets/std-wayback-$OUTPUT.std') |
88 | 91 | | execute.send_cmd(self.options, cmd, output_path, std_path, self.module_name) |
| 92 | + | utils.print_line() |
89 | 93 | | |
90 | 94 | | # request for the root path to get response |
91 | 95 | | def get_response(self): |
| 96 | + | utils.print_good('Starting meg') |
| 97 | + | if self.is_direct: |
| 98 | + | if utils.not_empty_file(self.is_direct): |
| 99 | + | cmd = '$GO_PATH/meg / {0} $WORKSPACE/assets/responses/ -v -c 100'.format( |
| 100 | + | self.is_direct) |
| 101 | + | # just return if direct input is just a string |
| 102 | + | else: |
| 103 | + | utils.print_bad("meg required input as a file.") |
| 104 | + | return None |
| 105 | + | else: |
| 106 | + | cmd = '$GO_PATH/meg / $WORKSPACE/assets/http-$OUTPUT.txt $WORKSPACE/assets/responses/ -v -c 100' |
92 | 107 | | utils.make_directory(self.options['WORKSPACE'] + '/assets/responses') |
93 | | - | cmd = '$GO_PATH/meg / $WORKSPACE/assets/http-$OUTPUT.txt $WORKSPACE/assets/responses/ -v -c 100' |
94 | 108 | | cmd = utils.replace_argument(self.options, cmd) |
95 | 109 | | output_path = utils.replace_argument( |
96 | 110 | | self.options, '$WORKSPACE/assets/responses/index') |
| skipped 4 lines |
101 | 115 | | |
102 | 116 | | # finding link in http domain |
103 | 117 | | def linkfinder(self): |
| 118 | + | utils.print_good('Starting linkfinder') |
| 119 | + | |
104 | 120 | | if self.is_direct: |
105 | 121 | | if utils.not_empty_file(self.is_direct): |
106 | 122 | | http_domains = utils.just_read(self.is_direct) |
| skipped 1 lines |
108 | 124 | | else: |
109 | 125 | | domain = self.is_direct |
110 | 126 | | strip_domain = utils.get_domain(domain) |
| 127 | + | if strip_domain == domain: |
| 128 | + | domain = 'http://' + domain |
111 | 129 | | cmd = 'python3 $PLUGINS_PATH/LinkFinder/linkfinder.py -i {0} -d -o cli | tee $WORKSPACE/assets/linkfinder/{1}-linkfinder.txt'.format( |
112 | 130 | | domain, strip_domain) |
113 | 131 | | |
| skipped 13 lines |
127 | 145 | | http_domains = utils.replace_argument( |
128 | 146 | | self.options, '$WORKSPACE/assets/http-$OUTPUT.txt') |
129 | 147 | | |
130 | | - | utils.print_good('Starting linkfinder') |
131 | 148 | | utils.make_directory( |
132 | 149 | | self.options['WORKSPACE'] + '/assets/linkfinder') |
133 | 150 | | if utils.not_empty_file(http_domains): |
| skipped 14 lines |