Linux ip-172-26-2-223 5.4.0-1018-aws #18-Ubuntu SMP Wed Jun 24 01:15:00 UTC 2020 x86_64
Apache
: 172.26.2.223 | : 3.14.134.62
Cant Read [ /etc/named.conf ]
8.1.13
www
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
www /
server /
panel /
class_v2 /
safeModelV2 /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
base.py
4.05
KB
-rw-r--r--
firewallModel.py
187.47
KB
-rw-r--r--
freeipModel.py
3.02
KB
-rw-r--r--
ipsModel.py
6.16
KB
-rw-r--r--
securityModel.py
140.58
KB
-rw-r--r--
sshModel.py
15.84
KB
-rw-r--r--
syslogModel.py
85.26
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : freeipModel.py
#coding: utf-8 #------------------------------------------------------------------- # aaPanel #------------------------------------------------------------------- # Copyright (c) 2015-2099 aaPanel(www.aapanel.com) All rights reserved. #------------------------------------------------------------------- # Author: cjxin <cjxin@aapanel.com> #------------------------------------------------------------------- # 免费IP库 #------------------------------ import os,re,json,time from safeModelV2.base import safeBase import public class main(safeBase): _sfile = '{}/data/free_ip_area.json'.format(public.get_panel_path()) def __init__(self): try: self.user_info = public.get_user_info() except: self.user_info = None def get_ip_area(self,get): """ @获取IP地址所在地 @param get: dict/array """ ips = get['ips'] arrs,result = [],{} for ip in ips:arrs.append(ip) if len(arrs) > 0: data = self.__get_cloud_ip_info(arrs) for ip in data: result[ip] = data[ip] return result def __get_cloud_ip_info(self,ips): """ @获取IP地址所在地 @得判断是否是我们的用户 @param ips: """ result = {} try: ''' @从云端获取IP地址所在地 @param data 是否是宝塔用户,如果不是则不返回 @param ips: IP地址 ''' data = {} data['ip'] = ','.join(ips) data['uid'] = self.user_info['uid'] # 与面板字段差异 data["serverid"]=self.user_info["server_id"] #如果不是我们的用户,那么不返回数据 res = public.httpPost('https://wafapi2.aapanel.com/api/ip/info',data) res = json.loads(res) data = self.get_ip_area_cache() for key in res: info = res[key] if public.is_local_ip(key): res[key]['city']="Intranet" if not res[key]['city']: continue if not res[key]['city'].strip() and not res[key]['continent'].strip(): info = {'info':'Unknown IP'} else: info['info'] = '{} {} {} {}'.format(info['carrier'],info['country'],info['province'],info['city']).strip() data[key] = info result[key] = info self.set_ip_area_cache(data) except: pass return result def get_ip_area_cache(self): """ @获取IP地址所在地 @param get: """ data = {} try: data = json.loads(public.readFile(self._sfile)) except: public.writeFile(self._sfile,json.dumps({})) return data def set_ip_area_cache(self,data): """ @设置IP地址所在地 @param data: """ public.writeFile(self._sfile,json.dumps(data)) return True
Close