Package: python-glimmer
GlimmerCurrent version: 1.7.3A poc framework base on pythonRequirementsrichfunc_timeoutrequestsclickshodanzoomeyeInstallcommonpip3install-Upython-glimmer
glimmer--helporgitclonehttps://github.com/WAY29/glimmer.gitcdglimmer
python3-mpipinstall-rrequirements.txt
python3glimmer/main.py--helpdocker# start a glimmer dockerdockerrun--nameglimmer-itdlonglone/glimmer# exec bash from dockerdockerexec-itglimmerbash# in docker, run glimmerglimmer--help# or just use glimmer directlydockerrun--rm-itlonglone/glimmer:cli--helpUsageUsage: main.py [OPTIONS] COMMAND [ARGS]...

  A poc framework base on python.

  Tips: {parser} are plugins in plugins/parser which parse user input by
  protocol and get data for poc and target, you can write yourself parser.

Options:
  -u, --url TEXT         Load targets from {parser}.
  -f, --file TEXT        Load targets from file and parse each line with
                         {parser}.

  -p, --poc TEXT         Load pocs from {parser}.
  -pf, --poc-file TEXT   Load pocs from file and parse each line with
                         {parser}.

  --pocs_path TEXT       User custom poc dir.
  --attack               set poc mode to attack mode, default is check mode.
  -o, --out TEXT         Use output plugins. default is console
  --plugins_path TEXT    User custom output plugin dir.
  --threads INTEGER      Number of threads
  -c, --config TEXT      Load config from a configuration toml file.
  -t, --timeout INTEGER  Max program runtime.
  -v, --verbose          display verbose information.
  -vv                    display more verbose information.
  --debug                setup debug mode.
  --help                 Show this message and exit.

Commands:
  search-poc     Search pocs by poc type / poc name / poc filename.
  show-poc-info  Show poc information by poc filename.configYou can use the-coption to specify the configuration file, if not set, glimmer will use default config in glimmer/data/default_config.ini, you can copy it and change by yourself.poc repositorypocsdefault offical pocs save intogitee/glimmer_pocswrite yourself pocpoc template in glimmer/pocs/_demo/demo.pyyou can write yourself poc into glimmer/pocs/new_folder/demo_poc.py and load it by new_folder/demo_pocor you can write yourself poc into anywhere the Internet can access, and load it by url parseror you can write yourself poc into anywhere and load it by yourself parserplugin:parserparser plugin used to parse the protocol to provide pocs or targets.Support parsersfileurlpythonshodanzoomeyefofafileexample:file://./url.txt,files://./poc.txtif protocol is files, the result will be split by line and decode if encoded by base64, so you can generate multi targets / pocs.urlexample:http://localhost,https://baidu.compythonexample:python://./poc.py,pythons://./targets.pyif protocol is pythons, the result will be split by line and decode if encoded by base64, so you can generate multi targets / pocs.shodanexample:shodan://[key@]shodan.io/?q={query_str}[&max_page=1&limit=0]you can set shodan key in config[shodan]
key =zoomeyeexample:zoomeye://[key@]zoomeye.org/?q={query_str}[&max_page=1&resource=host]you can set zoomeye key in config[zoomeye]
key =fofaexample:fofa://[email:key@]fofa.so/?q={query_str}[&max_page=1]you can set fofa email and key in config[fofa]
email = 
key =repoexample:repo://rce/netentsec/ngfw_rce,repo://rce/(will load pocs from rce directory in offical repository)you can load poc(s) from offical poc repository in giteewrite yourself parser plugincopy this template, edit and move it into glimmer/plugins/parser directory, rename it as you like.fromglimmer.apiimportPluginParserBase,register_plugin,is_valid_pathname,base64_decode,check_if_base64classPlugin(PluginParserBase):protocols=["myfile","myfiles"]defrule_check(self,module_path):"""check if module_path start with protocols"""# self.protocol_check: check if protocol start with Plugin.protocols# is_valid_pathname: check if module_path is valid pathnamereturnself.protocol_check(module_path)andis_valid_pathname(self.remove_protocol(module_path))defget_data(self,module_path):"""get poc from module_path"""# get protocol from module_pathprotocol=self.get_protocol(module_path)try:# remove protocolmodule_path=self.remove_protocol(module_path)# open filewithopen(module_path,"r")asf:result=f.read()# if protocols is myfilesifprotocol=="myfiles":# split result by lineresult=result.split()# base64 decode result if is base64 encoderesult=[base64_decode(r)ifcheck_if_base64(r)elserforrinresult]returnresultelse:# return a result listreturn(result,)exceptException:return()# register plugin for glimmerregister_plugin(Plugin)plugin:outputoutput plugin used to show poc result.Exist pluginsconsolepure_texttabletextconsoleprint result to console with colorpure_textwrite pure hit urls to ./pure_result.txttableprint result as table to console with colortextwrite pure result to ./text.txtresult parameterresult={"url":url,# target url"status":status,# spoc tatus, 0 if success else failed"msg":msg,# poc message"hit_urls":[],# hit urls"extra":{# extra data, store as key-value dict}}write yourself output plugincopy this template, edit and move it into glimmer/plugins/output directory, rename it as you like.fromglimmer.apiimportPluginOutputBase,register_plugin,cprint,headerfromthreadingimportLockLOCK=Lock()classPlugin(PluginOutputBase):defconstruct(self):"""plugin construct, if you want to save as file, you can init file handler in this function."""...# self._handler = open("result.txt", "w+")defhandle(self,poc,result,**kwargs):"""plugin handler, you can handle poc result in this function."""status=result.get('status',-1)text=result.get("url")+" "text+="success"ifstatus==0else"failed"ifnotstatus:LOCK.acquire()self._handler.write(text)self._handler.flush()LOCK.release()defdestruct(self):"""plugin destruct, if you want to save as file, you can close file handler and print message in this function."""...# self._handler.close()# del self._handler# cprint(header("Poc", "*", "Result save in ./result.txt"))register_plugin(Plugin)