├── README.md ├── __init__.py ├── gui_record.py ├── main ├── __init__.py ├── config.ini ├── districtcode.txt ├── emailReceive.py ├── hex_handle.py ├── ident_card.py ├── ld_control.py ├── main.py ├── main.spec ├── main_run.py ├── names.txt └── v_script.py └── main_init.py /README.md: -------------------------------------------------------------------------------- 1 | # LdGauntlet 2 | 3 | 基于模拟器(雷电)的自动化测试工具
4 | 无需root或者装app至模拟器内,与按键精灵等内置相比,识别效率略低但隐匿性更强 5 | 6 |
7 | 8 | ## 使用方法: 9 | 10 |
11 | 1.通过运行gui_record.py抓取色值点生成脚本
12 | 2.生成的json和脚本存储在main/script文件夹中
13 | 3.修改config.ini后运行main/main.py
14 |
15 | 16 | ### 可配置的属性:(config.ini) 17 | 18 |
19 | 20 | ``` 21 | 22 | [File-Path] 23 | ;apk包名 24 | package_name = 25 | [Screen-Setting] 26 | ;模拟器分辨率 27 | screen_width = 960 28 | screen_height = 540 29 | ;坐标偏移范围量 30 | DEFAULT_OFFSET = 3 31 | ;百度OCR 32 | APP_ID = 33 | API_KEY = 34 | SECRET_KEY = 35 | [Script-Setting] 36 | ACCOUNT_TYPE = 1 37 | RUN_SCRIPT = 38 | RUN_START_MODULE = 0 39 | IS_COLUMN = 0 40 | IS_DEV = 0 41 | IP_NAME = 42 | REPEAT_ERROR = 0 43 | EMPTY_ERROR = 0 44 | ``` 45 | 46 | ### 注意事项: 47 | 48 |
49 | 1.本项目使用的是色值匹配、多色值匹配及偏移色值匹配。
50 | 2.通过将整体流程拆分成各个模块进行识别,因此如果出现重复的色值点请通过拆分模块来避免识别错误。
51 | 3.如果需要使用百度OCR需配置APP_ID、API_KEY、SECRET_KEY。
52 | -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/json1109/LdGauntlet/46f3449d16b0a1dd73ab3fb729b7ac35a6121f12/__init__.py -------------------------------------------------------------------------------- /gui_record.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import tkinter 3 | from tkinter import ttk 4 | from inspect import signature 5 | import re 6 | from pynput import mouse, keyboard 7 | from threading import Thread 8 | from PIL import ImageGrab,Image 9 | from pathlib import Path 10 | import time 11 | import sys 12 | import os 13 | import win32gui 14 | import random 15 | import shutil 16 | import pyautogui 17 | import json 18 | import traceback 19 | 20 | # rec实例 21 | rec_instance = None 22 | 23 | dn_ld = None 24 | dn_console = None 25 | dn_share_path = None 26 | 27 | # state状态 28 | dot_record_state = False 29 | command_record_state = False 30 | 31 | win_name = input("input script name:") or "demo" 32 | emulator_index = input("input record emulator index:") or "0" 33 | module_index = input("input now module:") or "0" 34 | 35 | # 点阵外部容器 36 | grid_list_wrapper = None 37 | grid_state = 0 38 | # 点阵实体 39 | dot_list = [ 40 | ] 41 | # 命令实体 42 | command_list = { 43 | "name":'', 44 | "param":'', 45 | "data":[] 46 | } 47 | 48 | # 命令外部容器 49 | text_area = None 50 | # 实际命令文本域 51 | script_text = None 52 | # 模块索引 53 | sp_module_index = None 54 | 55 | FILE_FOLDER_PATH = os.path.dirname(os.path.realpath(__file__)) + '\\' 56 | 57 | def _entry_val_c(index,v): 58 | global dot_list 59 | if grid_state == 0: 60 | time.sleep(0.1) 61 | ls_arr = v.get().split(",") 62 | if len(ls_arr) == 4 and ls_arr[0] and ls_arr[1] and ls_arr[2] and ls_arr[3]: 63 | rox_confidence = round(float(ls_arr[3]),2) 64 | if rox_confidence == 1: 65 | rox_confidence = int(rox_confidence) 66 | dot_list[index] = [int(ls_arr[0]),int(ls_arr[1]),str(ls_arr[2]),rox_confidence] 67 | else: 68 | lc_arr = v.get().split(",") 69 | if index == 0 or index == 1: 70 | if len(lc_arr) == 2 and lc_arr[0] and lc_arr[1]: 71 | dot_list[index][0] = int(lc_arr[0]) 72 | dot_list[index][1] = int(lc_arr[1]) 73 | elif index == 2: 74 | rox_confidence = round(float(lc_arr[1]),2) 75 | if rox_confidence == 1: 76 | rox_confidence = int(rox_confidence) 77 | if len(lc_arr) == 2 and lc_arr[0] and lc_arr[1]: 78 | dot_list[index][2] = lc_arr[0] 79 | dot_list[index][3] = rox_confidence 80 | else: 81 | rox_confidence = round(float(lc_arr[3]),2) 82 | if rox_confidence == 1: 83 | rox_confidence = int(rox_confidence) 84 | if len(lc_arr) == 4 and lc_arr[0] and lc_arr[1] and lc_arr[2] and lc_arr[3]: 85 | dot_list[index] = [int(lc_arr[0]),int(lc_arr[1]),str(lc_arr[2]),rox_confidence] 86 | 87 | def entry_val_change(index,v): 88 | # 键入时获取数据同步到dot_list 89 | p = Thread(target=_entry_val_c, args=(index,v)) 90 | p.start() 91 | 92 | def clean_t(item): 93 | if "\t" in item: 94 | return item.replace("\t"," ") 95 | return item 96 | 97 | def _text_val_c(): 98 | global script_text,command_list,cmb,text_area 99 | select_index = int(cmb.get().split(":")[0]) 100 | if text_area and script_text: 101 | if select_index == 3 or select_index == 4: 102 | time.sleep(0.1) 103 | val = script_text.get('0.0','end') 104 | sx_arr = val.strip().split('\n') 105 | start_inx = 0 106 | for inx,item in enumerate(sx_arr): 107 | if 'def' in item: 108 | start_inx = inx 109 | if start_inx: 110 | new_arr = sx_arr[start_inx+1:] 111 | command_list["data"] = list(map(clean_t,new_arr)) 112 | elif select_index == 2: 113 | time.sleep(0.1) 114 | val = script_text.get('0.0','end') 115 | sx_arr = val.strip().split('\n') 116 | command_list["data"] = list(map(clean_t,sx_arr)) 117 | 118 | def text_val_change(e): 119 | p = Thread(target=_text_val_c) 120 | p.start() 121 | 122 | # 实体类 123 | class DnPlayer(object): 124 | def __init__(self, info: list): 125 | super(DnPlayer, self).__init__() 126 | self.index = int(info[0]) 127 | self.name = info[1] 128 | self.top_win_handler = int(info[2]) 129 | self.bind_win_handler = int(info[3]) 130 | self.is_in_android = True if int(info[4]) == 1 else False 131 | self.pid = int(info[5]) 132 | self.vbox_pid = int(info[6]) 133 | 134 | def is_running(self) -> bool: 135 | return self.is_in_android 136 | 137 | def __str__(self): 138 | index = self.index 139 | name = self.name 140 | r = str(self.is_in_android) 141 | twh = self.top_win_handler 142 | bwh = self.bind_win_handler 143 | pid = self.pid 144 | vpid = self.vbox_pid 145 | return "\nindex:%d name:%s top:%08X bind:%08X running:%s pid:%d vbox_pid:%d\n" % ( 146 | index, name, twh, bwh, r, pid, vpid) 147 | 148 | def __repr__(self): 149 | index = self.index 150 | name = self.name 151 | r = str(self.is_in_android) 152 | twh = self.top_win_handler 153 | bwh = self.bind_win_handler 154 | pid = self.pid 155 | vpid = self.vbox_pid 156 | return "\nindex:%d name:%s top:%08X bind:%08X running:%s pid:%d vbox_pid:%d\n" % ( 157 | index, name, twh, bwh, r, pid, vpid) 158 | 159 | def get_list(): 160 | cmd = os.popen(dn_console + 'list2') 161 | text = cmd.read() 162 | cmd.close() 163 | info = text.split('\n') 164 | result = list() 165 | for line in info: 166 | if len(line) > 1: 167 | dnplayer = line.split(',') 168 | result.append((DnPlayer(dnplayer))) 169 | return result 170 | 171 | def list_running(): 172 | result = list() 173 | all_init = get_list() 174 | for dn in all_init: 175 | if dn.is_running() is True: 176 | result.append((dn.index,dn.bind_win_handler)) 177 | return result 178 | 179 | class RecordScript(object): 180 | simulator_x = 960 181 | simulator_y = 540 182 | 183 | def __init__(self): 184 | # 偏移的xy(正确) 185 | self.offset_x = 0 186 | self.offset_y = 0 187 | # 录制文件路径 和 录制资源文件夹 188 | self.script_path = None 189 | self.res_path = None 190 | 191 | self.fn_record_flag = False 192 | self.json_flag = False 193 | self.json_dump_enable = False 194 | # 左键点击缓存时间变量 195 | self._press_time_cache = 0 196 | self._press_cache = None 197 | self.res_order = None 198 | self.input_emulator = 0 199 | # 当前的录制模块 200 | self.script_module = 0 201 | # 截屏路径 202 | self.emu_png_path = dn_share_path + '\\record.png' 203 | 204 | self.get_start_offset() 205 | 206 | def v_create_dir(self,dirs): 207 | if not os.path.exists(dirs): 208 | os.makedirs(dirs) 209 | 210 | def dnld(self,index: int, command: str, silence: bool = True): 211 | cmd = dn_ld + '-s %d %s' % (index, command) 212 | if silence: 213 | os.system(cmd) 214 | return '' 215 | process = os.popen(cmd) 216 | result = process.read() 217 | process.close() 218 | return result 219 | 220 | # 点击起始x 221 | def click_x(self,num): 222 | return num - self.offset_x 223 | 224 | # 点击起始y 225 | def click_y(self,num): 226 | return num - self.offset_y 227 | 228 | def v_find_by_pic(self,image,grayscale=False): 229 | try: 230 | x,y,w,h = pyautogui.locateOnScreen(image,grayscale=grayscale,confidence=0.99) 231 | return True,(x,y) 232 | except Exception as e: 233 | print(e) 234 | return False,None 235 | 236 | def v_screen_get(self): 237 | x1 = self.offset_x 238 | y1 = self.offset_y 239 | x2 = x1 + self.simulator_x 240 | y2 = y1 + self.simulator_y 241 | bbox = (x1, y1, x2, y2) 242 | im = ImageGrab.grab(bbox) 243 | return im 244 | 245 | def get_start_offset(self): 246 | result = None 247 | for device in list_running(): 248 | left, top, right, bottom = win32gui.GetWindowRect(device[1]) 249 | if(left < 0 or top < 0): 250 | win.quit() 251 | raise ValueError('plz set emulator top !') 252 | result = (left,top) 253 | if(result): 254 | x,y = result 255 | print('emulator x and y: %s %s'%(result[0],result[1])) 256 | self.offset_x = result[0] 257 | self.offset_y = result[1] 258 | else: 259 | win.quit() 260 | raise ValueError('emulator not exist') 261 | 262 | def run(self): 263 | global win_name,module_index,emulator_index 264 | self.input_names = win_name 265 | self.input_emulator = int(emulator_index) 266 | self.script_module = int(module_index) 267 | 268 | if(self.offset_x == 0 and self.offset_y == 0): 269 | print('Warning : offset_x and offset_y is 0 !') 270 | else: 271 | print('offset_x:%s offset_y:%s'%(self.offset_x,self.offset_y)) 272 | 273 | self._init_script() 274 | self._init_listener() 275 | 276 | def refresh_base_res_path(self): 277 | self.res_path = FILE_FOLDER_PATH + 'main\\' + 'script\\' + self.input_names +'\\'+ str(self.script_module) 278 | self.v_create_dir(self.res_path) 279 | 280 | def _init_script(self): 281 | self.refresh_base_res_path() 282 | self.script_path = FILE_FOLDER_PATH + 'main\\' + 'script\\' + self.input_names + '.py' 283 | if not os.path.exists(self.script_path): 284 | with open(self.script_path, 'a',encoding='utf-8') as file_obj: 285 | self._add_import() 286 | 287 | def _add_import(self): 288 | arr_str = [ 289 | 'class ScriptFunction(object):', 290 | ' def __init__(self, *args, **kwargs):', 291 | ' return super().__init__(*args, **kwargs)', 292 | '' 293 | ] 294 | self._append_script(arr_str) 295 | 296 | def append_command_to_py(self,command_obj): 297 | if command_obj["name"]: 298 | insert_lines = "" 299 | insert_lines += '\n' 300 | insert_lines += ' @staticmethod\n' 301 | insert_lines += ' def %s(%s):\n'%(command_obj["name"],command_obj["param"]) 302 | for i in command_obj["data"]: 303 | insert_lines += i + '\n' 304 | with open(self.script_path, 'a',encoding='utf-8') as file_obj: 305 | file_obj.write(insert_lines) 306 | 307 | def _append_script(self,text,init_flag=False): 308 | if(not isinstance(text,str)): 309 | text = '\n'.join(text) 310 | else: 311 | text = text+'\n' 312 | with open(self.script_path, 'a',encoding='utf-8') as file_obj: 313 | file_obj.write(text) 314 | 315 | def get_file_order_name(self): 316 | for i in range(1000): 317 | if not os.path.exists(self.res_path +'\\'+ (str(i)+'.json')): 318 | return str(i) 319 | 320 | def write_into_json(self,json_str): 321 | json_path = self.res_path +'\\'+ (self.res_order + '.json') 322 | with open(json_path, 'w',encoding='utf-8') as json_file: 323 | try: 324 | json_file.write(json_str) 325 | except Exception as e: 326 | traceback.print_exc() 327 | print(e) 328 | 329 | def get_hex_data(self,path): 330 | with open(path, 'rb') as f: 331 | hexdata = hexdata = f.read().hex() 332 | return hexdata 333 | 334 | def get_start_t(self,hexbase,x,y): 335 | return hexbase + ((x+1+y*960)-1)*4*2 336 | 337 | def get_end_t(self,hexbase,x,y): 338 | return hexbase + (x+1+y*960)*4*2 339 | 340 | def get_hex_str(self,hex_data,hexbase,x,y): 341 | start_t = self.get_start_t(hexbase,x,y) 342 | end_t = self.get_end_t(hexbase,x,y) 343 | target_hex = hex_data[start_t:end_t-2] 344 | return '#%s'%(target_hex) 345 | 346 | def json_load(self,path): 347 | with open(path,encoding='utf-8') as json_file: 348 | data = json.load(json_file) 349 | return data 350 | 351 | def v_get_color(self,x,y,path=None,file_data=None): 352 | if self.json_dump_enable: 353 | self.dnld(self.input_emulator, 'screencap /sdcard/Pictures/record.dump') 354 | time.sleep(0.5) 355 | self.json_dump_enable = False 356 | dmp_path = dn_share_path + '\\record.dump' 357 | if not os.path.exists(dmp_path): 358 | raise Exception('emulator config of share path has error , now is%s'%(dmp_path)) 359 | hex_data = self.get_hex_data(dn_share_path +'\\record.dump') 360 | return self.get_hex_str(hex_data,24,x,y) 361 | 362 | 363 | def v_rgb2hex(self,valid_values): 364 | r, g, b = valid_values[0], valid_values[1], valid_values[2] 365 | return '#{:02x}{:02x}{:02x}'.format(r, g, b).upper() 366 | 367 | def snap_screen_by_start(self): 368 | self.res_order = self.get_file_order_name() 369 | png_path = self.res_path +'\\'+ (self.res_order + '.png') 370 | if not os.path.exists(png_path): 371 | self.dnld(self.input_emulator, 'screencap /sdcard/Pictures/record.png') 372 | if(os.path.exists(self.emu_png_path)): 373 | self.moveFileto(self.emu_png_path,png_path) 374 | 375 | # 资源录制 376 | def _snap_record(self,x,y): 377 | global dot_list 378 | dot_list.append([x,y,self.v_get_color(x, y),1]) 379 | render_grid() 380 | 381 | def get_now_time(self): 382 | t = time.time() 383 | return int(round(t * 1000)) 384 | 385 | def _new_press_down(self,x,y): 386 | self.clean_press_cache() 387 | self._press_cache = [x,y] 388 | 389 | def clean_press_cache(self): 390 | global command_list 391 | now_time = self.get_now_time() 392 | command_list['data'].append(' context.sleep(%s)'%(now_time-self._press_time_cache)) 393 | render_command() 394 | self._press_time_cache = now_time 395 | 396 | def fn_name_get(self): 397 | return 'rec'+self.v_ran_str(7) 398 | 399 | def v_ran_str(self,num): 400 | H = 'abcdefghijklmnopqrstuvwxyz0123456789' 401 | salt = '' 402 | for i in range(num): 403 | salt += random.choice(H) 404 | return salt 405 | 406 | def f2_handle_start(self): 407 | global dot_record_state,dot_list 408 | self.f3_handle_stop() 409 | self.json_flag = True 410 | if len(dot_list) == 0: 411 | self.json_dump_enable = True 412 | self.snap_screen_by_start() 413 | dot_record_state = True 414 | show_tips_label() 415 | 416 | def f2_handle_stop(self): 417 | global dot_record_state 418 | self.json_flag = False 419 | dot_record_state = False 420 | show_tips_label() 421 | 422 | def f4_handle(self): 423 | global sp_module_index 424 | if dot_record_state: 425 | show_result("please stop dot record") 426 | return 427 | self.script_module = self.script_module + 1 428 | self.refresh_base_res_path() 429 | sp_module_index.set(self.script_module) 430 | 431 | def f3_handle_start(self,params_num): 432 | global command_list,command_record_state 433 | self.f2_handle_stop() 434 | self.fn_record_flag = True 435 | if len(command_list["data"]) == 0: 436 | if params_num == 1: 437 | command_list = { 438 | "name":self.fn_name_get(), 439 | "param":'context', 440 | "data":[] 441 | } 442 | else: 443 | command_list = { 444 | "name":self.fn_name_get(), 445 | "param":'context,point', 446 | "data":[] 447 | } 448 | self._press_time_cache = self.get_now_time() 449 | render_command() 450 | command_record_state = True 451 | show_tips_label() 452 | 453 | def f3_handle_stop(self): 454 | global command_record_state 455 | self.fn_record_flag = False 456 | command_record_state = False 457 | show_tips_label() 458 | 459 | def _new_press_up(self,x,y): 460 | global command_list 461 | now_time = self.get_now_time() 462 | time_between = now_time - self._press_time_cache 463 | if(x == self._press_cache[0] and y == self._press_cache[1]): 464 | command_list['data'].append(' context.click(%s,%s,%s,40)'%(x,y,time_between)) 465 | else: 466 | command_list['data'].append(' context.swipe(%s,%s,%s,%s,%s,40)'%(self._press_cache[0],self._press_cache[1],x,y,time_between)) 467 | render_command() 468 | 469 | def _init_listener(self): 470 | #监听鼠标 471 | def on_click(x,y,button,pressed): 472 | try: 473 | x = int(self.click_x(x)) 474 | y = int(self.click_y(y)) 475 | if(button == mouse.Button.right): 476 | if self.json_flag: 477 | if(pressed): 478 | self._snap_record(x,y) 479 | if self.fn_record_flag: 480 | if(pressed): 481 | self._new_press_down(x,y) 482 | else: 483 | self._new_press_up(x,y) 484 | except Exception as e: 485 | traceback.print_exc() 486 | print(e) 487 | 488 | 489 | mouse_listener = mouse.Listener(on_click=on_click) 490 | mouse_listener.start() 491 | 492 | def on_release(key): 493 | try: 494 | if(key == keyboard.Key.esc): 495 | mouse_listener.stop() 496 | keyboard_listener.stop() 497 | win.quit() 498 | return False 499 | 500 | except Exception as e: 501 | traceback.print_exc() 502 | print(e) 503 | 504 | keyboard_listener = keyboard.Listener(on_release=on_release) 505 | keyboard_listener.start() 506 | 507 | mouse_listener.join() 508 | keyboard_listener.join() 509 | 510 | def coverFiles(self,sourceDir, targetDir): 511 | for file_item in os.listdir(sourceDir): 512 | sourceFile = os.path.join(sourceDir, file_item) 513 | targetFile = os.path.join(targetDir, file_item) 514 | #cover the files 515 | if os.path.isfile(sourceFile): 516 | self.moveFileto(sourceFile,targetFile) 517 | 518 | def moveFileto(self,sourceDir, targetDir): 519 | shutil.copy(sourceDir, targetDir) 520 | 521 | win = tkinter.Tk() 522 | win.title(win_name) 523 | win.geometry("380x700+1200+50") 524 | 525 | # 选框模块 526 | cmb_val = 0 527 | cmb = ttk.Combobox(win,state='readonly') 528 | cmb.grid(row=4,column=0,padx=10,pady=5,sticky=tkinter.W) 529 | cmb['value'] = ('1: Click First Dot','2: Run By command','3: Run By function','4: Area find muti-color') 530 | cmb.current(0) 531 | tkinter.Label(win,text = "now module:").grid(row=1,column=0,padx=10,pady=5,sticky=tkinter.W) 532 | sp_module_index = tkinter.Variable() 533 | sp_module_index.set(module_index) 534 | tkinter.Entry(win,textvariable = sp_module_index,state='readonly').grid(row=1,column=0,pady=5,padx=100,sticky=tkinter.W) 535 | btn_group = tkinter.Frame(win) 536 | tkinter.Button(btn_group,text="START",width=10,command=lambda:rec_instance.f2_handle_start())\ 537 | .grid(row=0, column=0,sticky=tkinter.W) 538 | tkinter.Button(btn_group,text="STOP",width=10,command=lambda:rec_instance.f2_handle_stop())\ 539 | .grid(row=0, column=1,sticky=tkinter.W,padx=10) 540 | tkinter.Button(btn_group,text="NEXT MODULE",width=15,command=lambda:rec_instance.f4_handle())\ 541 | .grid(row=0, column=2,sticky=tkinter.W) 542 | btn_group.grid(row=2,column=0,padx=10,pady=5,sticky=tkinter.W) 543 | 544 | state_tips_label = None 545 | def show_tips_label(): 546 | global state_tips_label,dot_record_state,command_record_state 547 | if state_tips_label: 548 | result_label.destroy() 549 | result_out_str = '' 550 | on_state = False 551 | if dot_record_state: 552 | result_out_str += "Point Record: On " 553 | on_state = True 554 | else: 555 | result_out_str += "Point Record: Off " 556 | if command_record_state: 557 | result_out_str += "Script Record: On " 558 | on_state = True 559 | else: 560 | result_out_str += "Script Record: Off " 561 | if on_state: 562 | result_label = tkinter.Label(win,text = result_out_str,bg = "#90EE90") 563 | else: 564 | result_label = tkinter.Label(win,text = result_out_str) 565 | result_label.grid(row=0,column=0,padx=10,pady=5,sticky=tkinter.W) 566 | 567 | def close_tips_label(): 568 | global state_tips_label 569 | if state_tips_label: 570 | result_label.destroy() 571 | 572 | result_label = None 573 | def show_result(val): 574 | global result_label 575 | if result_label: 576 | result_label.destroy() 577 | result_label = tkinter.Label(win,text = val) 578 | result_label.grid(row=10,column=0,padx=10,pady=5,sticky=tkinter.W) 579 | 580 | def close_result(): 581 | global result_label 582 | if result_label: 583 | result_label.destroy() 584 | 585 | # 点阵列 586 | def render_grid(): 587 | global dot_list,grid_list_wrapper 588 | close_result() 589 | if grid_list_wrapper: 590 | grid_list_wrapper.destroy() 591 | grid_list_wrapper = tkinter.Frame(win) 592 | if grid_state == 0: 593 | for index,item in enumerate(dot_list): 594 | e1 = tkinter.Variable() 595 | tke1 = tkinter.Entry(grid_list_wrapper,textvariable = e1) 596 | e1.set(",".join(map(lambda x:str(x), item))) 597 | tkb1 = tkinter.Button(grid_list_wrapper,text="DELETE",command=lambda n=index:(dot_list.pop(n),grid_list_wrapper.destroy(),render_grid())) 598 | tke1.grid(row=index,column=0,pady=5) 599 | tke1.bind('', lambda e,p=index,v=e1:entry_val_change(p,v)) 600 | tkb1.grid(row=index,column=1,padx=5,pady=5) 601 | else: 602 | for index,item in enumerate(dot_list): 603 | e1 = tkinter.Variable() 604 | tke1 = tkinter.Entry(grid_list_wrapper,textvariable = e1) 605 | if index == 0 or index == 1: 606 | e1.set(",".join(map(lambda x:str(x), item[0:2]))) 607 | elif index == 2: 608 | e1.set(",".join(map(lambda x:str(x), item[2:4]))) 609 | else: 610 | e1.set(",".join(map(lambda x:str(x), item))) 611 | tkb1 = tkinter.Button(grid_list_wrapper,text="DELETE",command=lambda n=index:(dot_list.pop(n),grid_list_wrapper.destroy(),render_grid())) 612 | tke1.grid(row=index,column=0,pady=5) 613 | tke1.bind('', lambda e,p=index,v=e1:entry_val_change(p,v)) 614 | tkb1.grid(row=index,column=1,padx=5,pady=5) 615 | grid_list_wrapper.grid(row=3,column=0,padx=10,pady=5,sticky=tkinter.W) 616 | render_grid() 617 | 618 | def render_command(): 619 | global text_area,script_text,command_list 620 | if text_area: 621 | script_text.delete('0.0','end') 622 | script_text.insert(tkinter.END,'\n') 623 | script_text.insert(tkinter.END,' @staticmethod\n') 624 | script_text.insert(tkinter.END,' def %s(%s):\n'%(command_list["name"],command_list["param"])) 625 | script_text.update() 626 | script_text.see(tkinter.END) 627 | for i in command_list["data"]: 628 | script_text.insert(tkinter.END,i+'\n') 629 | script_text.update() 630 | script_text.see(tkinter.END) 631 | 632 | record_btn = None 633 | stop_record_btn = None 634 | def remove_record(): 635 | global record_btn,stop_record_btn 636 | if record_btn: 637 | record_btn.destroy() 638 | if stop_record_btn: 639 | stop_record_btn.destroy() 640 | 641 | def show_record(params_num): 642 | global record_btn,stop_record_btn 643 | if record_btn: 644 | record_btn.destroy() 645 | if stop_record_btn: 646 | stop_record_btn.destroy() 647 | if params_num == 1: 648 | record_btn = tkinter.Button(win,text="RECORD",width=15,command=lambda:rec_instance.f3_handle_start(1)) 649 | else: 650 | record_btn = tkinter.Button(win,text="RECORD",width=15,command=lambda:rec_instance.f3_handle_start(2)) 651 | record_btn.grid(row=5, column=0,sticky=tkinter.W,padx=10,pady=5) 652 | stop_record_btn = tkinter.Button(win,text="STOP",width=15,command=lambda:rec_instance.f3_handle_stop()) 653 | stop_record_btn.grid(row=5, column=0,sticky=tkinter.W,padx=140,pady=5) 654 | 655 | def remove_text_area(): 656 | global text_area 657 | if text_area: 658 | script_text.delete('0.0','end') 659 | text_area.destroy() 660 | text_area = None 661 | 662 | def show_text_area(): 663 | global text_area,script_text 664 | if text_area: 665 | script_text.delete('0.0','end') 666 | text_area.destroy() 667 | text_area = None 668 | text_area = tkinter.Frame(win) 669 | scroll = tkinter.Scrollbar() 670 | script_text = tkinter.Text(text_area,width = 50,height = 15) 671 | script_text.grid() 672 | script_text.bind('', text_val_change) 673 | scroll.config(command = script_text.yview) 674 | script_text.config(yscrollcommand = scroll.set) 675 | text_area.grid(row=6,column=0,padx=10,pady=5,sticky=tkinter.W) 676 | 677 | def cmb_func(event): 678 | global grid_state,grid_list_wrapper,cmb_val,script_text,text_area,command_list 679 | if grid_list_wrapper: 680 | grid_list_wrapper.destroy() 681 | 682 | close_result() 683 | rec_instance.f3_handle_stop() 684 | remove_record() 685 | remove_text_area() 686 | command_list["data"] = [] 687 | 688 | select_index = int(cmb.get().split(":")[0]) 689 | 690 | if select_index == 1: 691 | cmb_val = 0 692 | grid_state = 0 693 | render_grid() 694 | elif select_index == 2: 695 | cmb_val = 1 696 | grid_state = 0 697 | render_grid() 698 | show_text_area() 699 | elif select_index == 3: 700 | cmb_val = 2 701 | grid_state = 0 702 | render_grid() 703 | show_record(1) 704 | show_text_area() 705 | elif select_index == 4: 706 | cmb_val = 3 707 | grid_state = 1 708 | render_grid() 709 | show_record(2) 710 | show_text_area() 711 | close_result() 712 | cmb.bind("<>",cmb_func) 713 | 714 | def clean_all(): 715 | global dot_list,grid_state,cmb_val,cmb,grid_list_wrapper,command_list,script_text,text_area 716 | grid_state = 0 717 | dot_list = [] 718 | cmb_val = 0 719 | cmb.current(0) 720 | if grid_list_wrapper: 721 | grid_list_wrapper.destroy() 722 | command_list = { 723 | "name":'', 724 | "param":'', 725 | "data":[] 726 | } 727 | remove_record() 728 | if text_area: 729 | script_text.delete('0.0','end') 730 | text_area.destroy() 731 | text_area = None 732 | 733 | def generate_all(): 734 | global rec_instance,command_list 735 | outpush_str = "" 736 | outpush_func = "" 737 | rec_instance.f2_handle_stop() 738 | rec_instance.f3_handle_stop() 739 | json_mod = { 740 | "pointJudge": [], 741 | "handle": { 742 | "type": 0, 743 | "event": [] 744 | } 745 | } 746 | 747 | if len(dot_list) == 0: 748 | show_result("there is no pointJudge") 749 | return 750 | 751 | for item in dot_list: 752 | json_mod['pointJudge'].append({ 753 | "dot": [item[0], item[1]], 754 | "color": item[2], 755 | "confidence":item[3] 756 | }) 757 | json_mod["handle"]["type"] = cmb_val 758 | 759 | if cmb_val == 1: 760 | """ 761 | click: [0,0] 762 | swipe: [0,0,0,0] 763 | next_module: 'next' 764 | sleep: 1000 765 | """ 766 | sc_text = script_text.get("0.0","end").strip() 767 | if sc_text: 768 | json_mod["handle"]["event"] = sc_text.split("\n") 769 | else: 770 | show_result("please input event text") 771 | return 772 | elif cmb_val == 2: 773 | sc_text = script_text.get("0.0","end").strip() 774 | if sc_text: 775 | bold = re.compile('def (\S+)\(context\):') 776 | matches = re.search(bold,sc_text) 777 | if matches: 778 | json_mod["handle"]["event"] = [matches.group(1)] 779 | else: 780 | show_result("def format is not true") 781 | return 782 | else: 783 | show_result("please input event text") 784 | return 785 | elif cmb_val == 3: 786 | sc_text = script_text.get("0.0","end").strip() 787 | if sc_text: 788 | bold = re.compile('def (\S+)\(context,point\):') 789 | matches = re.search(bold,sc_text) 790 | if matches: 791 | json_mod["handle"]["event"] = [matches.group(1)] 792 | else: 793 | show_result("def format is not true") 794 | return 795 | 796 | show_result("create success") 797 | outpush_str = json.dumps(json_mod) 798 | rec_instance.write_into_json(outpush_str) 799 | if cmb_val == 2 or cmb_val == 3: 800 | rec_instance.append_command_to_py(command_list) 801 | clean_all() 802 | 803 | 804 | btn_end_group = tkinter.Frame(win) 805 | tkinter.Button(btn_end_group,text="CREATE",width=10,command=generate_all)\ 806 | .grid(row=0, column=0,sticky=tkinter.W) 807 | btn_end_group.grid(row=9,column=0,padx=10,pady=15,sticky=tkinter.W) 808 | 809 | def task(name): 810 | global rec_instance 811 | rec_instance = RecordScript() 812 | try: 813 | rec_instance.run() 814 | except Exception as e: 815 | traceback.print_exc() 816 | print(e) 817 | 818 | def init_script(): 819 | p = Thread(target=task, args=('thread-1',)) 820 | p.start() 821 | win.after(0,init_script) 822 | win.mainloop() -------------------------------------------------------------------------------- /main/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/json1109/LdGauntlet/46f3449d16b0a1dd73ab3fb729b7ac35a6121f12/main/__init__.py -------------------------------------------------------------------------------- /main/config.ini: -------------------------------------------------------------------------------- 1 | [File-Path] 2 | ;apk包名 3 | package_name = 4 | 5 | [Screen-Setting] 6 | ;模拟器分辨率 7 | screen_width = 960 8 | screen_height = 540 9 | 10 | ;坐标偏移范围量 11 | DEFAULT_OFFSET = 3 12 | 13 | ;百度OCR 14 | APP_ID = 15 | API_KEY = 16 | SECRET_KEY = 17 | 18 | [Script-Setting] 19 | ;账号类型 1文件 2账号 20 | ACCOUNT_TYPE = 1 21 | ;运行的脚本模块 22 | RUN_SCRIPT = 23 | ;起始运行模块 24 | RUN_START_MODULE = 0 25 | ;是否竖屏 1竖 0横 注意:如果设置是竖屏的须将模拟器设置为禁止自动旋转 26 | IS_COLUMN = 0 27 | ;是否是dev模式 0否 1是 28 | IS_DEV = 0 29 | ;ipName 30 | IP_NAME = 31 | ;重复匹配异常次数 为0时表示关闭 32 | REPEAT_ERROR = 0 33 | ;空匹配异常次数 为0时表示关闭 34 | EMPTY_ERROR = 0 -------------------------------------------------------------------------------- /main/districtcode.txt: -------------------------------------------------------------------------------- 1 | 110000 北京市 2 | 3 | 110100 市辖区 4 | 5 | 110101 东城区 6 | 7 | 110102 西城区 8 | 9 | 110105 朝阳区 10 | 11 | 110106 丰台区 12 | 13 | 110107 石景山区 14 | 15 | 110108 海淀区 16 | 17 | 110109 门头沟区 18 | 19 | 110111 房山区 20 | 21 | 110112 通州区 22 | 23 | 110113 顺义区 24 | 25 | 110114 昌平区 26 | 27 | 110115 大兴区 28 | 29 | 110116 怀柔区 30 | 31 | 110117 平谷区 32 | 33 | 110200 县 34 | 35 | 110228 密云县 36 | 37 | 110229 延庆县 38 | 39 | 120000 天津市 40 | 41 | 120100 市辖区 42 | 43 | 120101 和平区 44 | 45 | 120102 河东区 46 | 47 | 120103 河西区 48 | 49 | 120104 南开区 50 | 51 | 120105 河北区 52 | 53 | 120106 红桥区 54 | 55 | 120110 东丽区 56 | 57 | 120111 西青区 58 | 59 | 120112 津南区 60 | 61 | 120113 北辰区 62 | 63 | 120114 武清区 64 | 65 | 120115 宝坻区 66 | 67 | 120116 滨海新区 68 | 69 | 120200 县 70 | 71 | 120221 宁河县 72 | 73 | 120223 静海县 74 | 75 | 120225 蓟县 76 | 77 | 130000 河北省 78 | 79 | 130100 石家庄市 80 | 81 | 130101 市辖区 82 | 83 | 130102 长安区 84 | 85 | 130103 桥东区 86 | 87 | 130104 桥西区 88 | 89 | 130105 新华区 90 | 91 | 130107 井陉矿区 92 | 93 | 130108 裕华区 94 | 95 | 130121 井陉县 96 | 97 | 130123 正定县 98 | 99 | 130124 栾城县 100 | 101 | 130125 行唐县 102 | 103 | 130126 灵寿县 104 | 105 | 130127 高邑县 106 | 107 | 130128 深泽县 108 | 109 | 130129 赞皇县 110 | 111 | 130130 无极县 112 | 113 | 130131 平山县 114 | 115 | 130132 元氏县 116 | 117 | 130133 赵县 118 | 119 | 130181 辛集市 120 | 121 | 130182 藁城市 122 | 123 | 130183 晋州市 124 | 125 | 130184 新乐市 126 | 127 | 130185 鹿泉市 128 | 129 | 130200 唐山市 130 | 131 | 130201 市辖区 132 | 133 | 130202 路南区 134 | 135 | 130203 路北区 136 | 137 | 130204 古冶区 138 | 139 | 130205 开平区 140 | 141 | 130207 丰南区 142 | 143 | 130208 丰润区 144 | 145 | 130209 曹妃甸区 146 | 147 | 130223 滦县 148 | 149 | 130224 滦南县 150 | 151 | 130225 乐亭县 152 | 153 | 130227 迁西县 154 | 155 | 130229 玉田县 156 | 157 | 130281 遵化市 158 | 159 | 130283 迁安市 160 | 161 | 130300 秦皇岛市 162 | 163 | 130301 市辖区 164 | 165 | 130302 海港区 166 | 167 | 130303 山海关区 168 | 169 | 130304 北戴河区 170 | 171 | 130321 青龙满族自治县 172 | 173 | 130322 昌黎县 174 | 175 | 130323 抚宁县 176 | 177 | 130324 卢龙县 178 | 179 | 130400 邯郸市 180 | 181 | 130401 市辖区 182 | 183 | 130402 邯山区 184 | 185 | 130403 丛台区 186 | 187 | 130404 复兴区 188 | 189 | 130406 峰峰矿区 190 | 191 | 130421 邯郸县 192 | 193 | 130423 临漳县 194 | 195 | 130424 成安县 196 | 197 | 130425 大名县 198 | 199 | 130426 涉县 200 | 201 | 130427 磁县 202 | 203 | 130428 肥乡县 204 | 205 | 130429 永年县 206 | 207 | 130430 邱县 208 | 209 | 130431 鸡泽县 210 | 211 | 130432 广平县 212 | 213 | 130433 馆陶县 214 | 215 | 130434 魏县 216 | 217 | 130435 曲周县 218 | 219 | 130481 武安市 220 | 221 | 130500 邢台市 222 | 223 | 130501 市辖区 224 | 225 | 130502 桥东区 226 | 227 | 130503 桥西区 228 | 229 | 130521 邢台县 230 | 231 | 130522 临城县 232 | 233 | 130523 内丘县 234 | 235 | 130524 柏乡县 236 | 237 | 130525 隆尧县 238 | 239 | 130526 任县 240 | 241 | 130527 南和县 242 | 243 | 130528 宁晋县 244 | 245 | 130529 巨鹿县 246 | 247 | 130530 新河县 248 | 249 | 130531 广宗县 250 | 251 | 130532 平乡县 252 | 253 | 130533 威县 254 | 255 | 130534 清河县 256 | 257 | 130535 临西县 258 | 259 | 130581 南宫市 260 | 261 | 130582 沙河市 262 | 263 | 130600 保定市 264 | 265 | 130601 市辖区 266 | 267 | 130602 新市区 268 | 269 | 130603 北市区 270 | 271 | 130604 南市区 272 | 273 | 130621 满城县 274 | 275 | 130622 清苑县 276 | 277 | 130623 涞水县 278 | 279 | 130624 阜平县 280 | 281 | 130625 徐水县 282 | 283 | 130626 定兴县 284 | 285 | 130627 唐县 286 | 287 | 130628 高阳县 288 | 289 | 130629 容城县 290 | 291 | 130630 涞源县 292 | 293 | 130631 望都县 294 | 295 | 130632 安新县 296 | 297 | 130633 易县 298 | 299 | 130634 曲阳县 300 | 301 | 130635 蠡县 302 | 303 | 130636 顺平县 304 | 305 | 130637 博野县 306 | 307 | 130638 雄县 308 | 309 | 130681 涿州市 310 | 311 | 130682 定州市 312 | 313 | 130683 安国市 314 | 315 | 130684 高碑店市 316 | 317 | 130700 张家口市 318 | 319 | 130701 市辖区 320 | 321 | 130702 桥东区 322 | 323 | 130703 桥西区 324 | 325 | 130705 宣化区 326 | 327 | 130706 下花园区 328 | 329 | 130721 宣化县 330 | 331 | 130722 张北县 332 | 333 | 130723 康保县 334 | 335 | 130724 沽源县 336 | 337 | 130725 尚义县 338 | 339 | 130726 蔚县 340 | 341 | 130727 阳原县 342 | 343 | 130728 怀安县 344 | 345 | 130729 万全县 346 | 347 | 130730 怀来县 348 | 349 | 130731 涿鹿县 350 | 351 | 130732 赤城县 352 | 353 | 130733 崇礼县 354 | 355 | 130800 承德市 356 | 357 | 130801 市辖区 358 | 359 | 130802 双桥区 360 | 361 | 130803 双滦区 362 | 363 | 130804 鹰手营子矿区 364 | 365 | 130821 承德县 366 | 367 | 130822 兴隆县 368 | 369 | 130823 平泉县 370 | 371 | 130824 滦平县 372 | 373 | 130825 隆化县 374 | 375 | 130826 丰宁满族自治县 376 | 377 | 130827 宽城满族自治县 378 | 379 | 130828 围场满族蒙古族自治县 380 | 381 | 130900 沧州市 382 | 383 | 130901 市辖区 384 | 385 | 130902 新华区 386 | 387 | 130903 运河区 388 | 389 | 130921 沧县 390 | 391 | 130922 青县 392 | 393 | 130923 东光县 394 | 395 | 130924 海兴县 396 | 397 | 130925 盐山县 398 | 399 | 130926 肃宁县 400 | 401 | 130927 南皮县 402 | 403 | 130928 吴桥县 404 | 405 | 130929 献县 406 | 407 | 130930 孟村回族自治县 408 | 409 | 130981 泊头市 410 | 411 | 130982 任丘市 412 | 413 | 130983 黄骅市 414 | 415 | 130984 河间市 416 | 417 | 131000 廊坊市 418 | 419 | 131001 市辖区 420 | 421 | 131002 安次区 422 | 423 | 131003 广阳区 424 | 425 | 131022 固安县 426 | 427 | 131023 永清县 428 | 429 | 131024 香河县 430 | 431 | 131025 大城县 432 | 433 | 131026 文安县 434 | 435 | 131028 大厂回族自治县 436 | 437 | 131081 霸州市 438 | 439 | 131082 三河市 440 | 441 | 131100 衡水市 442 | 443 | 131101 市辖区 444 | 445 | 131102 桃城区 446 | 447 | 131121 枣强县 448 | 449 | 131122 武邑县 450 | 451 | 131123 武强县 452 | 453 | 131124 饶阳县 454 | 455 | 131125 安平县 456 | 457 | 131126 故城县 458 | 459 | 131127 景县 460 | 461 | 131128 阜城县 462 | 463 | 131181 冀州市 464 | 465 | 131182 深州市 466 | 467 | 140000 山西省 468 | 469 | 140100 太原市 470 | 471 | 140101 市辖区 472 | 473 | 140105 小店区 474 | 475 | 140106 迎泽区 476 | 477 | 140107 杏花岭区 478 | 479 | 140108 尖草坪区 480 | 481 | 140109 万柏林区 482 | 483 | 140110 晋源区 484 | 485 | 140121 清徐县 486 | 487 | 140122 阳曲县 488 | 489 | 140123 娄烦县 490 | 491 | 140181 古交市 492 | 493 | 140200 大同市 494 | 495 | 140201 市辖区 496 | 497 | 140202 城区 498 | 499 | 140203 矿区 500 | 501 | 140211 南郊区 502 | 503 | 140212 新荣区 504 | 505 | 140221 阳高县 506 | 507 | 140222 天镇县 508 | 509 | 140223 广灵县 510 | 511 | 140224 灵丘县 512 | 513 | 140225 浑源县 514 | 515 | 140226 左云县 516 | 517 | 140227 大同县 518 | 519 | 140300 阳泉市 520 | 521 | 140301 市辖区 522 | 523 | 140302 城区 524 | 525 | 140303 矿区 526 | 527 | 140311 郊区 528 | 529 | 140321 平定县 530 | 531 | 140322 盂县 532 | 533 | 140400 长治市 534 | 535 | 140401 市辖区 536 | 537 | 140402 城区 538 | 539 | 140411 郊区 540 | 541 | 140421 长治县 542 | 543 | 140423 襄垣县 544 | 545 | 140424 屯留县 546 | 547 | 140425 平顺县 548 | 549 | 140426 黎城县 550 | 551 | 140427 壶关县 552 | 553 | 140428 长子县 554 | 555 | 140429 武乡县 556 | 557 | 140430 沁县 558 | 559 | 140431 沁源县 560 | 561 | 140481 潞城市 562 | 563 | 140500 晋城市 564 | 565 | 140501 市辖区 566 | 567 | 140502 城区 568 | 569 | 140521 沁水县 570 | 571 | 140522 阳城县 572 | 573 | 140524 陵川县 574 | 575 | 140525 泽州县 576 | 577 | 140581 高平市 578 | 579 | 140600 朔州市 580 | 581 | 140601 市辖区 582 | 583 | 140602 朔城区 584 | 585 | 140603 平鲁区 586 | 587 | 140621 山阴县 588 | 589 | 140622 应县 590 | 591 | 140623 右玉县 592 | 593 | 140624 怀仁县 594 | 595 | 140700 晋中市 596 | 597 | 140701 市辖区 598 | 599 | 140702 榆次区 600 | 601 | 140721 榆社县 602 | 603 | 140722 左权县 604 | 605 | 140723 和顺县 606 | 607 | 140724 昔阳县 608 | 609 | 140725 寿阳县 610 | 611 | 140726 太谷县 612 | 613 | 140727 祁县 614 | 615 | 140728 平遥县 616 | 617 | 140729 灵石县 618 | 619 | 140781 介休市 620 | 621 | 140800 运城市 622 | 623 | 140801 市辖区 624 | 625 | 140802 盐湖区 626 | 627 | 140821 临猗县 628 | 629 | 140822 万荣县 630 | 631 | 140823 闻喜县 632 | 633 | 140824 稷山县 634 | 635 | 140825 新绛县 636 | 637 | 140826 绛县 638 | 639 | 140827 垣曲县 640 | 641 | 140828 夏县 642 | 643 | 140829 平陆县 644 | 645 | 140830 芮城县 646 | 647 | 140881 永济市 648 | 649 | 140882 河津市 650 | 651 | 140900 忻州市 652 | 653 | 140901 市辖区 654 | 655 | 140902 忻府区 656 | 657 | 140921 定襄县 658 | 659 | 140922 五台县 660 | 661 | 140923 代县 662 | 663 | 140924 繁峙县 664 | 665 | 140925 宁武县 666 | 667 | 140926 静乐县 668 | 669 | 140927 神池县 670 | 671 | 140928 五寨县 672 | 673 | 140929 岢岚县 674 | 675 | 140930 河曲县 676 | 677 | 140931 保德县 678 | 679 | 140932 偏关县 680 | 681 | 140981 原平市 682 | 683 | 141000 临汾市 684 | 685 | 141001 市辖区 686 | 687 | 141002 尧都区 688 | 689 | 141021 曲沃县 690 | 691 | 141022 翼城县 692 | 693 | 141023 襄汾县 694 | 695 | 141024 洪洞县 696 | 697 | 141025 古县 698 | 699 | 141026 安泽县 700 | 701 | 141027 浮山县 702 | 703 | 141028 吉县 704 | 705 | 141029 乡宁县 706 | 707 | 141030 大宁县 708 | 709 | 141031 隰县 710 | 711 | 141032 永和县 712 | 713 | 141033 蒲县 714 | 715 | 141034 汾西县 716 | 717 | 141081 侯马市 718 | 719 | 141082 霍州市 720 | 721 | 141100 吕梁市 722 | 723 | 141101 市辖区 724 | 725 | 141102 离石区 726 | 727 | 141121 文水县 728 | 729 | 141122 交城县 730 | 731 | 141123 兴县 732 | 733 | 141124 临县 734 | 735 | 141125 柳林县 736 | 737 | 141126 石楼县 738 | 739 | 141127 岚县 740 | 741 | 141128 方山县 742 | 743 | 141129 中阳县 744 | 745 | 141130 交口县 746 | 747 | 141181 孝义市 748 | 749 | 141182 汾阳市 750 | 751 | 150000 内蒙古自治区 752 | 753 | 150100 呼和浩特市 754 | 755 | 150101 市辖区 756 | 757 | 150102 新城区 758 | 759 | 150103 回民区 760 | 761 | 150104 玉泉区 762 | 763 | 150105 赛罕区 764 | 765 | 150121 土默特左旗 766 | 767 | 150122 托克托县 768 | 769 | 150123 和林格尔县 770 | 771 | 150124 清水河县 772 | 773 | 150125 武川县 774 | 775 | 150200 包头市 776 | 777 | 150201 市辖区 778 | 779 | 150202 东河区 780 | 781 | 150203 昆都仑区 782 | 783 | 150204 青山区 784 | 785 | 150205 石拐区 786 | 787 | 150206 白云鄂博矿区 788 | 789 | 150207 九原区 790 | 791 | 150221 土默特右旗 792 | 793 | 150222 固阳县 794 | 795 | 150223 达尔罕茂明安联合旗 796 | 797 | 150300 乌海市 798 | 799 | 150301 市辖区 800 | 801 | 150302 海勃湾区 802 | 803 | 150303 海南区 804 | 805 | 150304 乌达区 806 | 807 | 150400 赤峰市 808 | 809 | 150401 市辖区 810 | 811 | 150402 红山区 812 | 813 | 150403 元宝山区 814 | 815 | 150404 松山区 816 | 817 | 150421 阿鲁科尔沁旗 818 | 819 | 150422 巴林左旗 820 | 821 | 150423 巴林右旗 822 | 823 | 150424 林西县 824 | 825 | 150425 克什克腾旗 826 | 827 | 150426 翁牛特旗 828 | 829 | 150428 喀喇沁旗 830 | 831 | 150429 宁城县 832 | 833 | 150430 敖汉旗 834 | 835 | 150500 通辽市 836 | 837 | 150501 市辖区 838 | 839 | 150502 科尔沁区 840 | 841 | 150521 科尔沁左翼中旗 842 | 843 | 150522 科尔沁左翼后旗 844 | 845 | 150523 开鲁县 846 | 847 | 150524 库伦旗 848 | 849 | 150525 奈曼旗 850 | 851 | 150526 扎鲁特旗 852 | 853 | 150581 霍林郭勒市 854 | 855 | 150600 鄂尔多斯市 856 | 857 | 150601 市辖区 858 | 859 | 150602 东胜区 860 | 861 | 150621 达拉特旗 862 | 863 | 150622 准格尔旗 864 | 865 | 150623 鄂托克前旗 866 | 867 | 150624 鄂托克旗 868 | 869 | 150625 杭锦旗 870 | 871 | 150626 乌审旗 872 | 873 | 150627 伊金霍洛旗 874 | 875 | 150700 呼伦贝尔市 876 | 877 | 150701 市辖区 878 | 879 | 150702 海拉尔区 880 | 881 | 150703 扎赉诺尔区 882 | 883 | 150721 阿荣旗 884 | 885 | 150722 莫力达瓦达斡尔族自治旗 886 | 887 | 150723 鄂伦春自治旗 888 | 889 | 150724 鄂温克族自治旗 890 | 891 | 150725 陈巴尔虎旗 892 | 893 | 150726 新巴尔虎左旗 894 | 895 | 150727 新巴尔虎右旗 896 | 897 | 150781 满洲里市 898 | 899 | 150782 牙克石市 900 | 901 | 150783 扎兰屯市 902 | 903 | 150784 额尔古纳市 904 | 905 | 150785 根河市 906 | 907 | 150800 巴彦淖尔市 908 | 909 | 150801 市辖区 910 | 911 | 150802 临河区 912 | 913 | 150821 五原县 914 | 915 | 150822 磴口县 916 | 917 | 150823 乌拉特前旗 918 | 919 | 150824 乌拉特中旗 920 | 921 | 150825 乌拉特后旗 922 | 923 | 150826 杭锦后旗 924 | 925 | 150900 乌兰察布市 926 | 927 | 150901 市辖区 928 | 929 | 150902 集宁区 930 | 931 | 150921 卓资县 932 | 933 | 150922 化德县 934 | 935 | 150923 商都县 936 | 937 | 150924 兴和县 938 | 939 | 150925 凉城县 940 | 941 | 150926 察哈尔右翼前旗 942 | 943 | 150927 察哈尔右翼中旗 944 | 945 | 150928 察哈尔右翼后旗 946 | 947 | 150929 四子王旗 948 | 949 | 150981 丰镇市 950 | 951 | 152200 兴安盟 952 | 953 | 152201 乌兰浩特市 954 | 955 | 152202 阿尔山市 956 | 957 | 152221 科尔沁右翼前旗 958 | 959 | 152222 科尔沁右翼中旗 960 | 961 | 152223 扎赉特旗 962 | 963 | 152224 突泉县 964 | 965 | 152500 锡林郭勒盟 966 | 967 | 152501 二连浩特市 968 | 969 | 152502 锡林浩特市 970 | 971 | 152522 阿巴嘎旗 972 | 973 | 152523 苏尼特左旗 974 | 975 | 152524 苏尼特右旗 976 | 977 | 152525 东乌珠穆沁旗 978 | 979 | 152526 西乌珠穆沁旗 980 | 981 | 152527 太仆寺旗 982 | 983 | 152528 镶黄旗 984 | 985 | 152529 正镶白旗 986 | 987 | 152530 正蓝旗 988 | 989 | 152531 多伦县 990 | 991 | 152900 阿拉善盟 992 | 993 | 152921 阿拉善左旗 994 | 995 | 152922 阿拉善右旗 996 | 997 | 152923 额济纳旗 998 | 999 | 210000 辽宁省 1000 | 1001 | 210100 沈阳市 1002 | 1003 | 210101 市辖区 1004 | 1005 | 210102 和平区 1006 | 1007 | 210103 沈河区 1008 | 1009 | 210104 大东区 1010 | 1011 | 210105 皇姑区 1012 | 1013 | 210106 铁西区 1014 | 1015 | 210111 苏家屯区 1016 | 1017 | 210112 东陵区 1018 | 1019 | 210113 沈北新区 1020 | 1021 | 210114 于洪区 1022 | 1023 | 210122 辽中县 1024 | 1025 | 210123 康平县 1026 | 1027 | 210124 法库县 1028 | 1029 | 210181 新民市 1030 | 1031 | 210200 大连市 1032 | 1033 | 210201 市辖区 1034 | 1035 | 210202 中山区 1036 | 1037 | 210203 西岗区 1038 | 1039 | 210204 沙河口区 1040 | 1041 | 210211 甘井子区 1042 | 1043 | 210212 旅顺口区 1044 | 1045 | 210213 金州区 1046 | 1047 | 210224 长海县 1048 | 1049 | 210281 瓦房店市 1050 | 1051 | 210282 普兰店市 1052 | 1053 | 210283 庄河市 1054 | 1055 | 210300 鞍山市 1056 | 1057 | 210301 市辖区 1058 | 1059 | 210302 铁东区 1060 | 1061 | 210303 铁西区 1062 | 1063 | 210304 立山区 1064 | 1065 | 210311 千山区 1066 | 1067 | 210321 台安县 1068 | 1069 | 210323 岫岩满族自治县 1070 | 1071 | 210381 海城市 1072 | 1073 | 210400 抚顺市 1074 | 1075 | 210401 市辖区 1076 | 1077 | 210402 新抚区 1078 | 1079 | 210403 东洲区 1080 | 1081 | 210404 望花区 1082 | 1083 | 210411 顺城区 1084 | 1085 | 210421 抚顺县 1086 | 1087 | 210422 新宾满族自治县 1088 | 1089 | 210423 清原满族自治县 1090 | 1091 | 210500 本溪市 1092 | 1093 | 210501 市辖区 1094 | 1095 | 210502 平山区 1096 | 1097 | 210503 溪湖区 1098 | 1099 | 210504 明山区 1100 | 1101 | 210505 南芬区 1102 | 1103 | 210521 本溪满族自治县 1104 | 1105 | 210522 桓仁满族自治县 1106 | 1107 | 210600 丹东市 1108 | 1109 | 210601 市辖区 1110 | 1111 | 210602 元宝区 1112 | 1113 | 210603 振兴区 1114 | 1115 | 210604 振安区 1116 | 1117 | 210624 宽甸满族自治县 1118 | 1119 | 210681 东港市 1120 | 1121 | 210682 凤城市 1122 | 1123 | 210700 锦州市 1124 | 1125 | 210701 市辖区 1126 | 1127 | 210702 古塔区 1128 | 1129 | 210703 凌河区 1130 | 1131 | 210711 太和区 1132 | 1133 | 210726 黑山县 1134 | 1135 | 210727 义县 1136 | 1137 | 210781 凌海市 1138 | 1139 | 210782 北镇市 1140 | 1141 | 210800 营口市 1142 | 1143 | 210801 市辖区 1144 | 1145 | 210802 站前区 1146 | 1147 | 210803 西市区 1148 | 1149 | 210804 鲅鱼圈区 1150 | 1151 | 210811 老边区 1152 | 1153 | 210881 盖州市 1154 | 1155 | 210882 大石桥市 1156 | 1157 | 210900 阜新市 1158 | 1159 | 210901 市辖区 1160 | 1161 | 210902 海州区 1162 | 1163 | 210903 新邱区 1164 | 1165 | 210904 太平区 1166 | 1167 | 210905 清河门区 1168 | 1169 | 210911 细河区 1170 | 1171 | 210921 阜新蒙古族自治县 1172 | 1173 | 210922 彰武县 1174 | 1175 | 211000 辽阳市 1176 | 1177 | 211001 市辖区 1178 | 1179 | 211002 白塔区 1180 | 1181 | 211003 文圣区 1182 | 1183 | 211004 宏伟区 1184 | 1185 | 211005 弓长岭区 1186 | 1187 | 211011 太子河区 1188 | 1189 | 211021 辽阳县 1190 | 1191 | 211081 灯塔市 1192 | 1193 | 211100 盘锦市 1194 | 1195 | 211101 市辖区 1196 | 1197 | 211102 双台子区 1198 | 1199 | 211103 兴隆台区 1200 | 1201 | 211121 大洼县 1202 | 1203 | 211122 盘山县 1204 | 1205 | 211200 铁岭市 1206 | 1207 | 211201 市辖区 1208 | 1209 | 211202 银州区 1210 | 1211 | 211204 清河区 1212 | 1213 | 211221 铁岭县 1214 | 1215 | 211223 西丰县 1216 | 1217 | 211224 昌图县 1218 | 1219 | 211281 调兵山市 1220 | 1221 | 211282 开原市 1222 | 1223 | 211300 朝阳市 1224 | 1225 | 211301 市辖区 1226 | 1227 | 211302 双塔区 1228 | 1229 | 211303 龙城区 1230 | 1231 | 211321 朝阳县 1232 | 1233 | 211322 建平县 1234 | 1235 | 211324 喀喇沁左翼蒙古族自治县 1236 | 1237 | 211381 北票市 1238 | 1239 | 211382 凌源市 1240 | 1241 | 211400 葫芦岛市 1242 | 1243 | 211401 市辖区 1244 | 1245 | 211402 连山区 1246 | 1247 | 211403 龙港区 1248 | 1249 | 211404 南票区 1250 | 1251 | 211421 绥中县 1252 | 1253 | 211422 建昌县 1254 | 1255 | 211481 兴城市 1256 | 1257 | 220000 吉林省 1258 | 1259 | 220100 长春市 1260 | 1261 | 220101 市辖区 1262 | 1263 | 220102 南关区 1264 | 1265 | 220103 宽城区 1266 | 1267 | 220104 朝阳区 1268 | 1269 | 220105 二道区 1270 | 1271 | 220106 绿园区 1272 | 1273 | 220112 双阳区 1274 | 1275 | 220122 农安县 1276 | 1277 | 220181 九台市 1278 | 1279 | 220182 榆树市 1280 | 1281 | 220183 德惠市 1282 | 1283 | 220200 吉林市 1284 | 1285 | 220201 市辖区 1286 | 1287 | 220202 昌邑区 1288 | 1289 | 220203 龙潭区 1290 | 1291 | 220204 船营区 1292 | 1293 | 220211 丰满区 1294 | 1295 | 220221 永吉县 1296 | 1297 | 220281 蛟河市 1298 | 1299 | 220282 桦甸市 1300 | 1301 | 220283 舒兰市 1302 | 1303 | 220284 磐石市 1304 | 1305 | 220300 四平市 1306 | 1307 | 220301 市辖区 1308 | 1309 | 220302 铁西区 1310 | 1311 | 220303 铁东区 1312 | 1313 | 220322 梨树县 1314 | 1315 | 220323 伊通满族自治县 1316 | 1317 | 220381 公主岭市 1318 | 1319 | 220382 双辽市 1320 | 1321 | 220400 辽源市 1322 | 1323 | 220401 市辖区 1324 | 1325 | 220402 龙山区 1326 | 1327 | 220403 西安区 1328 | 1329 | 220421 东丰县 1330 | 1331 | 220422 东辽县 1332 | 1333 | 220500 通化市 1334 | 1335 | 220501 市辖区 1336 | 1337 | 220502 东昌区 1338 | 1339 | 220503 二道江区 1340 | 1341 | 220521 通化县 1342 | 1343 | 220523 辉南县 1344 | 1345 | 220524 柳河县 1346 | 1347 | 220581 梅河口市 1348 | 1349 | 220582 集安市 1350 | 1351 | 220600 白山市 1352 | 1353 | 220601 市辖区 1354 | 1355 | 220602 浑江区 1356 | 1357 | 220605 江源区 1358 | 1359 | 220621 抚松县 1360 | 1361 | 220622 靖宇县 1362 | 1363 | 220623 长白朝鲜族自治县 1364 | 1365 | 220681 临江市 1366 | 1367 | 220700 松原市 1368 | 1369 | 220701 市辖区 1370 | 1371 | 220702 宁江区 1372 | 1373 | 220721 前郭尔罗斯蒙古族自治县 1374 | 1375 | 220722 长岭县 1376 | 1377 | 220723 乾安县 1378 | 1379 | 220781 扶余市 1380 | 1381 | 220800 白城市 1382 | 1383 | 220801 市辖区 1384 | 1385 | 220802 洮北区 1386 | 1387 | 220821 镇赉县 1388 | 1389 | 220822 通榆县 1390 | 1391 | 220881 洮南市 1392 | 1393 | 220882 大安市 1394 | 1395 | 222400 延边朝鲜族自治州 1396 | 1397 | 222401 延吉市 1398 | 1399 | 222402 图们市 1400 | 1401 | 222403 敦化市 1402 | 1403 | 222404 珲春市 1404 | 1405 | 222405 龙井市 1406 | 1407 | 222406 和龙市 1408 | 1409 | 222424 汪清县 1410 | 1411 | 222426 安图县 1412 | 1413 | 230000 黑龙江省 1414 | 1415 | 230100 哈尔滨市 1416 | 1417 | 230101 市辖区 1418 | 1419 | 230102 道里区 1420 | 1421 | 230103 南岗区 1422 | 1423 | 230104 道外区 1424 | 1425 | 230108 平房区 1426 | 1427 | 230109 松北区 1428 | 1429 | 230110 香坊区 1430 | 1431 | 230111 呼兰区 1432 | 1433 | 230112 阿城区 1434 | 1435 | 230123 依兰县 1436 | 1437 | 230124 方正县 1438 | 1439 | 230125 宾县 1440 | 1441 | 230126 巴彦县 1442 | 1443 | 230127 木兰县 1444 | 1445 | 230128 通河县 1446 | 1447 | 230129 延寿县 1448 | 1449 | 230182 双城市 1450 | 1451 | 230183 尚志市 1452 | 1453 | 230184 五常市 1454 | 1455 | 230200 齐齐哈尔市 1456 | 1457 | 230201 市辖区 1458 | 1459 | 230202 龙沙区 1460 | 1461 | 230203 建华区 1462 | 1463 | 230204 铁锋区 1464 | 1465 | 230205 昂昂溪区 1466 | 1467 | 230206 富拉尔基区 1468 | 1469 | 230207 碾子山区 1470 | 1471 | 230208 梅里斯达斡尔族区 1472 | 1473 | 230221 龙江县 1474 | 1475 | 230223 依安县 1476 | 1477 | 230224 泰来县 1478 | 1479 | 230225 甘南县 1480 | 1481 | 230227 富裕县 1482 | 1483 | 230229 克山县 1484 | 1485 | 230230 克东县 1486 | 1487 | 230231 拜泉县 1488 | 1489 | 230281 讷河市 1490 | 1491 | 230300 鸡西市 1492 | 1493 | 230301 市辖区 1494 | 1495 | 230302 鸡冠区 1496 | 1497 | 230303 恒山区 1498 | 1499 | 230304 滴道区 1500 | 1501 | 230305 梨树区 1502 | 1503 | 230306 城子河区 1504 | 1505 | 230307 麻山区 1506 | 1507 | 230321 鸡东县 1508 | 1509 | 230381 虎林市 1510 | 1511 | 230382 密山市 1512 | 1513 | 230400 鹤岗市 1514 | 1515 | 230401 市辖区 1516 | 1517 | 230402 向阳区 1518 | 1519 | 230403 工农区 1520 | 1521 | 230404 南山区 1522 | 1523 | 230405 兴安区 1524 | 1525 | 230406 东山区 1526 | 1527 | 230407 兴山区 1528 | 1529 | 230421 萝北县 1530 | 1531 | 230422 绥滨县 1532 | 1533 | 230500 双鸭山市 1534 | 1535 | 230501 市辖区 1536 | 1537 | 230502 尖山区 1538 | 1539 | 230503 岭东区 1540 | 1541 | 230505 四方台区 1542 | 1543 | 230506 宝山区 1544 | 1545 | 230521 集贤县 1546 | 1547 | 230522 友谊县 1548 | 1549 | 230523 宝清县 1550 | 1551 | 230524 饶河县 1552 | 1553 | 230600 大庆市 1554 | 1555 | 230601 市辖区 1556 | 1557 | 230602 萨尔图区 1558 | 1559 | 230603 龙凤区 1560 | 1561 | 230604 让胡路区 1562 | 1563 | 230605 红岗区 1564 | 1565 | 230606 大同区 1566 | 1567 | 230621 肇州县 1568 | 1569 | 230622 肇源县 1570 | 1571 | 230623 林甸县 1572 | 1573 | 230624 杜尔伯特蒙古族自治县 1574 | 1575 | 230700 伊春市 1576 | 1577 | 230701 市辖区 1578 | 1579 | 230702 伊春区 1580 | 1581 | 230703 南岔区 1582 | 1583 | 230704 友好区 1584 | 1585 | 230705 西林区 1586 | 1587 | 230706 翠峦区 1588 | 1589 | 230707 新青区 1590 | 1591 | 230708 美溪区 1592 | 1593 | 230709 金山屯区 1594 | 1595 | 230710 五营区 1596 | 1597 | 230711 乌马河区 1598 | 1599 | 230712 汤旺河区 1600 | 1601 | 230713 带岭区 1602 | 1603 | 230714 乌伊岭区 1604 | 1605 | 230715 红星区 1606 | 1607 | 230716 上甘岭区 1608 | 1609 | 230722 嘉荫县 1610 | 1611 | 230781 铁力市 1612 | 1613 | 230800 佳木斯市 1614 | 1615 | 230801 市辖区 1616 | 1617 | 230803 向阳区 1618 | 1619 | 230804 前进区 1620 | 1621 | 230805 东风区 1622 | 1623 | 230811 郊区 1624 | 1625 | 230822 桦南县 1626 | 1627 | 230826 桦川县 1628 | 1629 | 230828 汤原县 1630 | 1631 | 230833 抚远县 1632 | 1633 | 230881 同江市 1634 | 1635 | 230882 富锦市 1636 | 1637 | 230900 七台河市 1638 | 1639 | 230901 市辖区 1640 | 1641 | 230902 新兴区 1642 | 1643 | 230903 桃山区 1644 | 1645 | 230904 茄子河区 1646 | 1647 | 230921 勃利县 1648 | 1649 | 231000 牡丹江市 1650 | 1651 | 231001 市辖区 1652 | 1653 | 231002 东安区 1654 | 1655 | 231003 阳明区 1656 | 1657 | 231004 爱民区 1658 | 1659 | 231005 西安区 1660 | 1661 | 231024 东宁县 1662 | 1663 | 231025 林口县 1664 | 1665 | 231081 绥芬河市 1666 | 1667 | 231083 海林市 1668 | 1669 | 231084 宁安市 1670 | 1671 | 231085 穆棱市 1672 | 1673 | 231100 黑河市 1674 | 1675 | 231101 市辖区 1676 | 1677 | 231102 爱辉区 1678 | 1679 | 231121 嫩江县 1680 | 1681 | 231123 逊克县 1682 | 1683 | 231124 孙吴县 1684 | 1685 | 231181 北安市 1686 | 1687 | 231182 五大连池市 1688 | 1689 | 231200 绥化市 1690 | 1691 | 231201 市辖区 1692 | 1693 | 231202 北林区 1694 | 1695 | 231221 望奎县 1696 | 1697 | 231222 兰西县 1698 | 1699 | 231223 青冈县 1700 | 1701 | 231224 庆安县 1702 | 1703 | 231225 明水县 1704 | 1705 | 231226 绥棱县 1706 | 1707 | 231281 安达市 1708 | 1709 | 231282 肇东市 1710 | 1711 | 231283 海伦市 1712 | 1713 | 232700 大兴安岭地区 1714 | 1715 | 232721 呼玛县 1716 | 1717 | 232722 塔河县 1718 | 1719 | 232723 漠河县 1720 | 1721 | 310000 上海市 1722 | 1723 | 310100 市辖区 1724 | 1725 | 310101 黄浦区 1726 | 1727 | 310104 徐汇区 1728 | 1729 | 310105 长宁区 1730 | 1731 | 310106 静安区 1732 | 1733 | 310107 普陀区 1734 | 1735 | 310108 闸北区 1736 | 1737 | 310109 虹口区 1738 | 1739 | 310110 杨浦区 1740 | 1741 | 310112 闵行区 1742 | 1743 | 310113 宝山区 1744 | 1745 | 310114 嘉定区 1746 | 1747 | 310115 浦东新区 1748 | 1749 | 310116 金山区 1750 | 1751 | 310117 松江区 1752 | 1753 | 310118 青浦区 1754 | 1755 | 310120 奉贤区 1756 | 1757 | 310200 县 1758 | 1759 | 310230 崇明县 1760 | 1761 | 320000 江苏省 1762 | 1763 | 320100 南京市 1764 | 1765 | 320101 市辖区 1766 | 1767 | 320102 玄武区 1768 | 1769 | 320104 秦淮区 1770 | 1771 | 320105 建邺区 1772 | 1773 | 320106 鼓楼区 1774 | 1775 | 320111 浦口区 1776 | 1777 | 320113 栖霞区 1778 | 1779 | 320114 雨花台区 1780 | 1781 | 320115 江宁区 1782 | 1783 | 320116 六合区 1784 | 1785 | 320117 溧水区 1786 | 1787 | 320118 高淳区 1788 | 1789 | 320200 无锡市 1790 | 1791 | 320201 市辖区 1792 | 1793 | 320202 崇安区 1794 | 1795 | 320203 南长区 1796 | 1797 | 320204 北塘区 1798 | 1799 | 320205 锡山区 1800 | 1801 | 320206 惠山区 1802 | 1803 | 320211 滨湖区 1804 | 1805 | 320281 江阴市 1806 | 1807 | 320282 宜兴市 1808 | 1809 | 320300 徐州市 1810 | 1811 | 320301 市辖区 1812 | 1813 | 320302 鼓楼区 1814 | 1815 | 320303 云龙区 1816 | 1817 | 320305 贾汪区 1818 | 1819 | 320311 泉山区 1820 | 1821 | 320312 铜山区 1822 | 1823 | 320321 丰县 1824 | 1825 | 320322 沛县 1826 | 1827 | 320324 睢宁县 1828 | 1829 | 320381 新沂市 1830 | 1831 | 320382 邳州市 1832 | 1833 | 320400 常州市 1834 | 1835 | 320401 市辖区 1836 | 1837 | 320402 天宁区 1838 | 1839 | 320404 钟楼区 1840 | 1841 | 320405 戚墅堰区 1842 | 1843 | 320411 新北区 1844 | 1845 | 320412 武进区 1846 | 1847 | 320481 溧阳市 1848 | 1849 | 320482 金坛市 1850 | 1851 | 320500 苏州市 1852 | 1853 | 320501 市辖区 1854 | 1855 | 320505 虎丘区 1856 | 1857 | 320506 吴中区 1858 | 1859 | 320507 相城区 1860 | 1861 | 320508 姑苏区 1862 | 1863 | 320509 吴江区 1864 | 1865 | 320581 常熟市 1866 | 1867 | 320582 张家港市 1868 | 1869 | 320583 昆山市 1870 | 1871 | 320585 太仓市 1872 | 1873 | 320600 南通市 1874 | 1875 | 320601 市辖区 1876 | 1877 | 320602 崇川区 1878 | 1879 | 320611 港闸区 1880 | 1881 | 320612 通州区 1882 | 1883 | 320621 海安县 1884 | 1885 | 320623 如东县 1886 | 1887 | 320681 启东市 1888 | 1889 | 320682 如皋市 1890 | 1891 | 320684 海门市 1892 | 1893 | 320700 连云港市 1894 | 1895 | 320701 市辖区 1896 | 1897 | 320703 连云区 1898 | 1899 | 320705 新浦区 1900 | 1901 | 320706 海州区 1902 | 1903 | 320721 赣榆县 1904 | 1905 | 320722 东海县 1906 | 1907 | 320723 灌云县 1908 | 1909 | 320724 灌南县 1910 | 1911 | 320800 淮安市 1912 | 1913 | 320801 市辖区 1914 | 1915 | 320802 清河区 1916 | 1917 | 320803 淮安区 1918 | 1919 | 320804 淮阴区 1920 | 1921 | 320811 清浦区 1922 | 1923 | 320826 涟水县 1924 | 1925 | 320829 洪泽县 1926 | 1927 | 320830 盱眙县 1928 | 1929 | 320831 金湖县 1930 | 1931 | 320900 盐城市 1932 | 1933 | 320901 市辖区 1934 | 1935 | 320902 亭湖区 1936 | 1937 | 320903 盐都区 1938 | 1939 | 320921 响水县 1940 | 1941 | 320922 滨海县 1942 | 1943 | 320923 阜宁县 1944 | 1945 | 320924 射阳县 1946 | 1947 | 320925 建湖县 1948 | 1949 | 320981 东台市 1950 | 1951 | 320982 大丰市 1952 | 1953 | 321000 扬州市 1954 | 1955 | 321001 市辖区 1956 | 1957 | 321002 广陵区 1958 | 1959 | 321003 邗江区 1960 | 1961 | 321012 江都区 1962 | 1963 | 321023 宝应县 1964 | 1965 | 321081 仪征市 1966 | 1967 | 321084 高邮市 1968 | 1969 | 321100 镇江市 1970 | 1971 | 321101 市辖区 1972 | 1973 | 321102 京口区 1974 | 1975 | 321111 润州区 1976 | 1977 | 321112 丹徒区 1978 | 1979 | 321181 丹阳市 1980 | 1981 | 321182 扬中市 1982 | 1983 | 321183 句容市 1984 | 1985 | 321200 泰州市 1986 | 1987 | 321201 市辖区 1988 | 1989 | 321202 海陵区 1990 | 1991 | 321203 高港区 1992 | 1993 | 321204 姜堰区 1994 | 1995 | 321281 兴化市 1996 | 1997 | 321282 靖江市 1998 | 1999 | 321283 泰兴市 2000 | 2001 | 321300 宿迁市 2002 | 2003 | 321301 市辖区 2004 | 2005 | 321302 宿城区 2006 | 2007 | 321311 宿豫区 2008 | 2009 | 321322 沭阳县 2010 | 2011 | 321323 泗阳县 2012 | 2013 | 321324 泗洪县 2014 | 2015 | 330000 浙江省 2016 | 2017 | 330100 杭州市 2018 | 2019 | 330101 市辖区 2020 | 2021 | 330102 上城区 2022 | 2023 | 330103 下城区 2024 | 2025 | 330104 江干区 2026 | 2027 | 330105 拱墅区 2028 | 2029 | 330106 西湖区 2030 | 2031 | 330108 滨江区 2032 | 2033 | 330109 萧山区 2034 | 2035 | 330110 余杭区 2036 | 2037 | 330122 桐庐县 2038 | 2039 | 330127 淳安县 2040 | 2041 | 330182 建德市 2042 | 2043 | 330183 富阳市 2044 | 2045 | 330185 临安市 2046 | 2047 | 330200 宁波市 2048 | 2049 | 330201 市辖区 2050 | 2051 | 330203 海曙区 2052 | 2053 | 330204 江东区 2054 | 2055 | 330205 江北区 2056 | 2057 | 330206 北仑区 2058 | 2059 | 330211 镇海区 2060 | 2061 | 330212 鄞州区 2062 | 2063 | 330225 象山县 2064 | 2065 | 330226 宁海县 2066 | 2067 | 330281 余姚市 2068 | 2069 | 330282 慈溪市 2070 | 2071 | 330283 奉化市 2072 | 2073 | 330300 温州市 2074 | 2075 | 330301 市辖区 2076 | 2077 | 330302 鹿城区 2078 | 2079 | 330303 龙湾区 2080 | 2081 | 330304 瓯海区 2082 | 2083 | 330322 洞头县 2084 | 2085 | 330324 永嘉县 2086 | 2087 | 330326 平阳县 2088 | 2089 | 330327 苍南县 2090 | 2091 | 330328 文成县 2092 | 2093 | 330329 泰顺县 2094 | 2095 | 330381 瑞安市 2096 | 2097 | 330382 乐清市 2098 | 2099 | 330400 嘉兴市 2100 | 2101 | 330401 市辖区 2102 | 2103 | 330402 南湖区 2104 | 2105 | 330411 秀洲区 2106 | 2107 | 330421 嘉善县 2108 | 2109 | 330424 海盐县 2110 | 2111 | 330481 海宁市 2112 | 2113 | 330482 平湖市 2114 | 2115 | 330483 桐乡市 2116 | 2117 | 330500 湖州市 2118 | 2119 | 330501 市辖区 2120 | 2121 | 330502 吴兴区 2122 | 2123 | 330503 南浔区 2124 | 2125 | 330521 德清县 2126 | 2127 | 330522 长兴县 2128 | 2129 | 330523 安吉县 2130 | 2131 | 330600 绍兴市 2132 | 2133 | 330601 市辖区 2134 | 2135 | 330602 越城区 2136 | 2137 | 330621 绍兴县 2138 | 2139 | 330624 新昌县 2140 | 2141 | 330681 诸暨市 2142 | 2143 | 330682 上虞市 2144 | 2145 | 330683 嵊州市 2146 | 2147 | 330700 金华市 2148 | 2149 | 330701 市辖区 2150 | 2151 | 330702 婺城区 2152 | 2153 | 330703 金东区 2154 | 2155 | 330723 武义县 2156 | 2157 | 330726 浦江县 2158 | 2159 | 330727 磐安县 2160 | 2161 | 330781 兰溪市 2162 | 2163 | 330782 义乌市 2164 | 2165 | 330783 东阳市 2166 | 2167 | 330784 永康市 2168 | 2169 | 330800 衢州市 2170 | 2171 | 330801 市辖区 2172 | 2173 | 330802 柯城区 2174 | 2175 | 330803 衢江区 2176 | 2177 | 330822 常山县 2178 | 2179 | 330824 开化县 2180 | 2181 | 330825 龙游县 2182 | 2183 | 330881 江山市 2184 | 2185 | 330900 舟山市 2186 | 2187 | 330901 市辖区 2188 | 2189 | 330902 定海区 2190 | 2191 | 330903 普陀区 2192 | 2193 | 330921 岱山县 2194 | 2195 | 330922 嵊泗县 2196 | 2197 | 331000 台州市 2198 | 2199 | 331001 市辖区 2200 | 2201 | 331002 椒江区 2202 | 2203 | 331003 黄岩区 2204 | 2205 | 331004 路桥区 2206 | 2207 | 331021 玉环县 2208 | 2209 | 331022 三门县 2210 | 2211 | 331023 天台县 2212 | 2213 | 331024 仙居县 2214 | 2215 | 331081 温岭市 2216 | 2217 | 331082 临海市 2218 | 2219 | 331100 丽水市 2220 | 2221 | 331101 市辖区 2222 | 2223 | 331102 莲都区 2224 | 2225 | 331121 青田县 2226 | 2227 | 331122 缙云县 2228 | 2229 | 331123 遂昌县 2230 | 2231 | 331124 松阳县 2232 | 2233 | 331125 云和县 2234 | 2235 | 331126 庆元县 2236 | 2237 | 331127 景宁畲族自治县 2238 | 2239 | 331181 龙泉市 2240 | 2241 | 340000 安徽省 2242 | 2243 | 340100 合肥市 2244 | 2245 | 340101 市辖区 2246 | 2247 | 340102 瑶海区 2248 | 2249 | 340103 庐阳区 2250 | 2251 | 340104 蜀山区 2252 | 2253 | 340111 包河区 2254 | 2255 | 340121 长丰县 2256 | 2257 | 340122 肥东县 2258 | 2259 | 340123 肥西县 2260 | 2261 | 340124 庐江县 2262 | 2263 | 340181 巢湖市 2264 | 2265 | 340200 芜湖市 2266 | 2267 | 340201 市辖区 2268 | 2269 | 340202 镜湖区 2270 | 2271 | 340203 弋江区 2272 | 2273 | 340207 鸠江区 2274 | 2275 | 340208 三山区 2276 | 2277 | 340221 芜湖县 2278 | 2279 | 340222 繁昌县 2280 | 2281 | 340223 南陵县 2282 | 2283 | 340225 无为县 2284 | 2285 | 340300 蚌埠市 2286 | 2287 | 340301 市辖区 2288 | 2289 | 340302 龙子湖区 2290 | 2291 | 340303 蚌山区 2292 | 2293 | 340304 禹会区 2294 | 2295 | 340311 淮上区 2296 | 2297 | 340321 怀远县 2298 | 2299 | 340322 五河县 2300 | 2301 | 340323 固镇县 2302 | 2303 | 340400 淮南市 2304 | 2305 | 340401 市辖区 2306 | 2307 | 340402 大通区 2308 | 2309 | 340403 田家庵区 2310 | 2311 | 340404 谢家集区 2312 | 2313 | 340405 八公山区 2314 | 2315 | 340406 潘集区 2316 | 2317 | 340421 凤台县 2318 | 2319 | 340500 马鞍山市 2320 | 2321 | 340501 市辖区 2322 | 2323 | 340503 花山区 2324 | 2325 | 340504 雨山区 2326 | 2327 | 340506 博望区 2328 | 2329 | 340521 当涂县 2330 | 2331 | 340522 含山县 2332 | 2333 | 340523 和县 2334 | 2335 | 340600 淮北市 2336 | 2337 | 340601 市辖区 2338 | 2339 | 340602 杜集区 2340 | 2341 | 340603 相山区 2342 | 2343 | 340604 烈山区 2344 | 2345 | 340621 濉溪县 2346 | 2347 | 340700 铜陵市 2348 | 2349 | 340701 市辖区 2350 | 2351 | 340702 铜官山区 2352 | 2353 | 340703 狮子山区 2354 | 2355 | 340711 郊区 2356 | 2357 | 340721 铜陵县 2358 | 2359 | 340800 安庆市 2360 | 2361 | 340801 市辖区 2362 | 2363 | 340802 迎江区 2364 | 2365 | 340803 大观区 2366 | 2367 | 340811 宜秀区 2368 | 2369 | 340822 怀宁县 2370 | 2371 | 340823 枞阳县 2372 | 2373 | 340824 潜山县 2374 | 2375 | 340825 太湖县 2376 | 2377 | 340826 宿松县 2378 | 2379 | 340827 望江县 2380 | 2381 | 340828 岳西县 2382 | 2383 | 340881 桐城市 2384 | 2385 | 341000 黄山市 2386 | 2387 | 341001 市辖区 2388 | 2389 | 341002 屯溪区 2390 | 2391 | 341003 黄山区 2392 | 2393 | 341004 徽州区 2394 | 2395 | 341021 歙县 2396 | 2397 | 341022 休宁县 2398 | 2399 | 341023 黟县 2400 | 2401 | 341024 祁门县 2402 | 2403 | 341100 滁州市 2404 | 2405 | 341101 市辖区 2406 | 2407 | 341102 琅琊区 2408 | 2409 | 341103 南谯区 2410 | 2411 | 341122 来安县 2412 | 2413 | 341124 全椒县 2414 | 2415 | 341125 定远县 2416 | 2417 | 341126 凤阳县 2418 | 2419 | 341181 天长市 2420 | 2421 | 341182 明光市 2422 | 2423 | 341200 阜阳市 2424 | 2425 | 341201 市辖区 2426 | 2427 | 341202 颍州区 2428 | 2429 | 341203 颍东区 2430 | 2431 | 341204 颍泉区 2432 | 2433 | 341221 临泉县 2434 | 2435 | 341222 太和县 2436 | 2437 | 341225 阜南县 2438 | 2439 | 341226 颍上县 2440 | 2441 | 341282 界首市 2442 | 2443 | 341300 宿州市 2444 | 2445 | 341301 市辖区 2446 | 2447 | 341302 埇桥区 2448 | 2449 | 341321 砀山县 2450 | 2451 | 341322 萧县 2452 | 2453 | 341323 灵璧县 2454 | 2455 | 341324 泗县 2456 | 2457 | 341500 六安市 2458 | 2459 | 341501 市辖区 2460 | 2461 | 341502 金安区 2462 | 2463 | 341503 裕安区 2464 | 2465 | 341521 寿县 2466 | 2467 | 341522 霍邱县 2468 | 2469 | 341523 舒城县 2470 | 2471 | 341524 金寨县 2472 | 2473 | 341525 霍山县 2474 | 2475 | 341600 亳州市 2476 | 2477 | 341601 市辖区 2478 | 2479 | 341602 谯城区 2480 | 2481 | 341621 涡阳县 2482 | 2483 | 341622 蒙城县 2484 | 2485 | 341623 利辛县 2486 | 2487 | 341700 池州市 2488 | 2489 | 341701 市辖区 2490 | 2491 | 341702 贵池区 2492 | 2493 | 341721 东至县 2494 | 2495 | 341722 石台县 2496 | 2497 | 341723 青阳县 2498 | 2499 | 341800 宣城市 2500 | 2501 | 341801 市辖区 2502 | 2503 | 341802 宣州区 2504 | 2505 | 341821 郎溪县 2506 | 2507 | 341822 广德县 2508 | 2509 | 341823 泾县 2510 | 2511 | 341824 绩溪县 2512 | 2513 | 341825 旌德县 2514 | 2515 | 341881 宁国市 2516 | 2517 | 350000 福建省 2518 | 2519 | 350100 福州市 2520 | 2521 | 350101 市辖区 2522 | 2523 | 350102 鼓楼区 2524 | 2525 | 350103 台江区 2526 | 2527 | 350104 仓山区 2528 | 2529 | 350105 马尾区 2530 | 2531 | 350111 晋安区 2532 | 2533 | 350121 闽侯县 2534 | 2535 | 350122 连江县 2536 | 2537 | 350123 罗源县 2538 | 2539 | 350124 闽清县 2540 | 2541 | 350125 永泰县 2542 | 2543 | 350128 平潭县 2544 | 2545 | 350181 福清市 2546 | 2547 | 350182 长乐市 2548 | 2549 | 350200 厦门市 2550 | 2551 | 350201 市辖区 2552 | 2553 | 350203 思明区 2554 | 2555 | 350205 海沧区 2556 | 2557 | 350206 湖里区 2558 | 2559 | 350211 集美区 2560 | 2561 | 350212 同安区 2562 | 2563 | 350213 翔安区 2564 | 2565 | 350300 莆田市 2566 | 2567 | 350301 市辖区 2568 | 2569 | 350302 城厢区 2570 | 2571 | 350303 涵江区 2572 | 2573 | 350304 荔城区 2574 | 2575 | 350305 秀屿区 2576 | 2577 | 350322 仙游县 2578 | 2579 | 350400 三明市 2580 | 2581 | 350401 市辖区 2582 | 2583 | 350402 梅列区 2584 | 2585 | 350403 三元区 2586 | 2587 | 350421 明溪县 2588 | 2589 | 350423 清流县 2590 | 2591 | 350424 宁化县 2592 | 2593 | 350425 大田县 2594 | 2595 | 350426 尤溪县 2596 | 2597 | 350427 沙县 2598 | 2599 | 350428 将乐县 2600 | 2601 | 350429 泰宁县 2602 | 2603 | 350430 建宁县 2604 | 2605 | 350481 永安市 2606 | 2607 | 350500 泉州市 2608 | 2609 | 350501 市辖区 2610 | 2611 | 350502 鲤城区 2612 | 2613 | 350503 丰泽区 2614 | 2615 | 350504 洛江区 2616 | 2617 | 350505 泉港区 2618 | 2619 | 350521 惠安县 2620 | 2621 | 350524 安溪县 2622 | 2623 | 350525 永春县 2624 | 2625 | 350526 德化县 2626 | 2627 | 350527 金门县 2628 | 2629 | 350581 石狮市 2630 | 2631 | 350582 晋江市 2632 | 2633 | 350583 南安市 2634 | 2635 | 350600 漳州市 2636 | 2637 | 350601 市辖区 2638 | 2639 | 350602 芗城区 2640 | 2641 | 350603 龙文区 2642 | 2643 | 350622 云霄县 2644 | 2645 | 350623 漳浦县 2646 | 2647 | 350624 诏安县 2648 | 2649 | 350625 长泰县 2650 | 2651 | 350626 东山县 2652 | 2653 | 350627 南靖县 2654 | 2655 | 350628 平和县 2656 | 2657 | 350629 华安县 2658 | 2659 | 350681 龙海市 2660 | 2661 | 350700 南平市 2662 | 2663 | 350701 市辖区 2664 | 2665 | 350702 延平区 2666 | 2667 | 350721 顺昌县 2668 | 2669 | 350722 浦城县 2670 | 2671 | 350723 光泽县 2672 | 2673 | 350724 松溪县 2674 | 2675 | 350725 政和县 2676 | 2677 | 350781 邵武市 2678 | 2679 | 350782 武夷山市 2680 | 2681 | 350783 建瓯市 2682 | 2683 | 350784 建阳市 2684 | 2685 | 350800 龙岩市 2686 | 2687 | 350801 市辖区 2688 | 2689 | 350802 新罗区 2690 | 2691 | 350821 长汀县 2692 | 2693 | 350822 永定县 2694 | 2695 | 350823 上杭县 2696 | 2697 | 350824 武平县 2698 | 2699 | 350825 连城县 2700 | 2701 | 350881 漳平市 2702 | 2703 | 350900 宁德市 2704 | 2705 | 350901 市辖区 2706 | 2707 | 350902 蕉城区 2708 | 2709 | 350921 霞浦县 2710 | 2711 | 350922 古田县 2712 | 2713 | 350923 屏南县 2714 | 2715 | 350924 寿宁县 2716 | 2717 | 350925 周宁县 2718 | 2719 | 350926 柘荣县 2720 | 2721 | 350981 福安市 2722 | 2723 | 350982 福鼎市 2724 | 2725 | 360000 江西省 2726 | 2727 | 360100 南昌市 2728 | 2729 | 360101 市辖区 2730 | 2731 | 360102 东湖区 2732 | 2733 | 360103 西湖区 2734 | 2735 | 360104 青云谱区 2736 | 2737 | 360105 湾里区 2738 | 2739 | 360111 青山湖区 2740 | 2741 | 360121 南昌县 2742 | 2743 | 360122 新建县 2744 | 2745 | 360123 安义县 2746 | 2747 | 360124 进贤县 2748 | 2749 | 360200 景德镇市 2750 | 2751 | 360201 市辖区 2752 | 2753 | 360202 昌江区 2754 | 2755 | 360203 珠山区 2756 | 2757 | 360222 浮梁县 2758 | 2759 | 360281 乐平市 2760 | 2761 | 360300 萍乡市 2762 | 2763 | 360301 市辖区 2764 | 2765 | 360302 安源区 2766 | 2767 | 360313 湘东区 2768 | 2769 | 360321 莲花县 2770 | 2771 | 360322 上栗县 2772 | 2773 | 360323 芦溪县 2774 | 2775 | 360400 九江市 2776 | 2777 | 360401 市辖区 2778 | 2779 | 360402 庐山区 2780 | 2781 | 360403 浔阳区 2782 | 2783 | 360421 九江县 2784 | 2785 | 360423 武宁县 2786 | 2787 | 360424 修水县 2788 | 2789 | 360425 永修县 2790 | 2791 | 360426 德安县 2792 | 2793 | 360427 星子县 2794 | 2795 | 360428 都昌县 2796 | 2797 | 360429 湖口县 2798 | 2799 | 360430 彭泽县 2800 | 2801 | 360481 瑞昌市 2802 | 2803 | 360482 共青城市 2804 | 2805 | 360500 新余市 2806 | 2807 | 360501 市辖区 2808 | 2809 | 360502 渝水区 2810 | 2811 | 360521 分宜县 2812 | 2813 | 360600 鹰潭市 2814 | 2815 | 360601 市辖区 2816 | 2817 | 360602 月湖区 2818 | 2819 | 360622 余江县 2820 | 2821 | 360681 贵溪市 2822 | 2823 | 360700 赣州市 2824 | 2825 | 360701 市辖区 2826 | 2827 | 360702 章贡区 2828 | 2829 | 360721 赣县 2830 | 2831 | 360722 信丰县 2832 | 2833 | 360723 大余县 2834 | 2835 | 360724 上犹县 2836 | 2837 | 360725 崇义县 2838 | 2839 | 360726 安远县 2840 | 2841 | 360727 龙南县 2842 | 2843 | 360728 定南县 2844 | 2845 | 360729 全南县 2846 | 2847 | 360730 宁都县 2848 | 2849 | 360731 于都县 2850 | 2851 | 360732 兴国县 2852 | 2853 | 360733 会昌县 2854 | 2855 | 360734 寻乌县 2856 | 2857 | 360735 石城县 2858 | 2859 | 360781 瑞金市 2860 | 2861 | 360782 南康市 2862 | 2863 | 360800 吉安市 2864 | 2865 | 360801 市辖区 2866 | 2867 | 360802 吉州区 2868 | 2869 | 360803 青原区 2870 | 2871 | 360821 吉安县 2872 | 2873 | 360822 吉水县 2874 | 2875 | 360823 峡江县 2876 | 2877 | 360824 新干县 2878 | 2879 | 360825 永丰县 2880 | 2881 | 360826 泰和县 2882 | 2883 | 360827 遂川县 2884 | 2885 | 360828 万安县 2886 | 2887 | 360829 安福县 2888 | 2889 | 360830 永新县 2890 | 2891 | 360881 井冈山市 2892 | 2893 | 360900 宜春市 2894 | 2895 | 360901 市辖区 2896 | 2897 | 360902 袁州区 2898 | 2899 | 360921 奉新县 2900 | 2901 | 360922 万载县 2902 | 2903 | 360923 上高县 2904 | 2905 | 360924 宜丰县 2906 | 2907 | 360925 靖安县 2908 | 2909 | 360926 铜鼓县 2910 | 2911 | 360981 丰城市 2912 | 2913 | 360982 樟树市 2914 | 2915 | 360983 高安市 2916 | 2917 | 361000 抚州市 2918 | 2919 | 361001 市辖区 2920 | 2921 | 361002 临川区 2922 | 2923 | 361021 南城县 2924 | 2925 | 361022 黎川县 2926 | 2927 | 361023 南丰县 2928 | 2929 | 361024 崇仁县 2930 | 2931 | 361025 乐安县 2932 | 2933 | 361026 宜黄县 2934 | 2935 | 361027 金溪县 2936 | 2937 | 361028 资溪县 2938 | 2939 | 361029 东乡县 2940 | 2941 | 361030 广昌县 2942 | 2943 | 361100 上饶市 2944 | 2945 | 361101 市辖区 2946 | 2947 | 361102 信州区 2948 | 2949 | 361121 上饶县 2950 | 2951 | 361122 广丰县 2952 | 2953 | 361123 玉山县 2954 | 2955 | 361124 铅山县 2956 | 2957 | 361125 横峰县 2958 | 2959 | 361126 弋阳县 2960 | 2961 | 361127 余干县 2962 | 2963 | 361128 鄱阳县 2964 | 2965 | 361129 万年县 2966 | 2967 | 361130 婺源县 2968 | 2969 | 361181 德兴市 2970 | 2971 | 370000 山东省 2972 | 2973 | 370100 济南市 2974 | 2975 | 370101 市辖区 2976 | 2977 | 370102 历下区 2978 | 2979 | 370103 市中区 2980 | 2981 | 370104 槐荫区 2982 | 2983 | 370105 天桥区 2984 | 2985 | 370112 历城区 2986 | 2987 | 370113 长清区 2988 | 2989 | 370124 平阴县 2990 | 2991 | 370125 济阳县 2992 | 2993 | 370126 商河县 2994 | 2995 | 370181 章丘市 2996 | 2997 | 370200 青岛市 2998 | 2999 | 370201 市辖区 3000 | 3001 | 370202 市南区 3002 | 3003 | 370203 市北区 3004 | 3005 | 370211 黄岛区 3006 | 3007 | 370212 崂山区 3008 | 3009 | 370213 李沧区 3010 | 3011 | 370214 城阳区 3012 | 3013 | 370281 胶州市 3014 | 3015 | 370282 即墨市 3016 | 3017 | 370283 平度市 3018 | 3019 | 370285 莱西市 3020 | 3021 | 370300 淄博市 3022 | 3023 | 370301 市辖区 3024 | 3025 | 370302 淄川区 3026 | 3027 | 370303 张店区 3028 | 3029 | 370304 博山区 3030 | 3031 | 370305 临淄区 3032 | 3033 | 370306 周村区 3034 | 3035 | 370321 桓台县 3036 | 3037 | 370322 高青县 3038 | 3039 | 370323 沂源县 3040 | 3041 | 370400 枣庄市 3042 | 3043 | 370401 市辖区 3044 | 3045 | 370402 市中区 3046 | 3047 | 370403 薛城区 3048 | 3049 | 370404 峄城区 3050 | 3051 | 370405 台儿庄区 3052 | 3053 | 370406 山亭区 3054 | 3055 | 370481 滕州市 3056 | 3057 | 370500 东营市 3058 | 3059 | 370501 市辖区 3060 | 3061 | 370502 东营区 3062 | 3063 | 370503 河口区 3064 | 3065 | 370521 垦利县 3066 | 3067 | 370522 利津县 3068 | 3069 | 370523 广饶县 3070 | 3071 | 370600 烟台市 3072 | 3073 | 370601 市辖区 3074 | 3075 | 370602 芝罘区 3076 | 3077 | 370611 福山区 3078 | 3079 | 370612 牟平区 3080 | 3081 | 370613 莱山区 3082 | 3083 | 370634 长岛县 3084 | 3085 | 370681 龙口市 3086 | 3087 | 370682 莱阳市 3088 | 3089 | 370683 莱州市 3090 | 3091 | 370684 蓬莱市 3092 | 3093 | 370685 招远市 3094 | 3095 | 370686 栖霞市 3096 | 3097 | 370687 海阳市 3098 | 3099 | 370700 潍坊市 3100 | 3101 | 370701 市辖区 3102 | 3103 | 370702 潍城区 3104 | 3105 | 370703 寒亭区 3106 | 3107 | 370704 坊子区 3108 | 3109 | 370705 奎文区 3110 | 3111 | 370724 临朐县 3112 | 3113 | 370725 昌乐县 3114 | 3115 | 370781 青州市 3116 | 3117 | 370782 诸城市 3118 | 3119 | 370783 寿光市 3120 | 3121 | 370784 安丘市 3122 | 3123 | 370785 高密市 3124 | 3125 | 370786 昌邑市 3126 | 3127 | 370800 济宁市 3128 | 3129 | 370801 市辖区 3130 | 3131 | 370802 市中区 3132 | 3133 | 370811 任城区 3134 | 3135 | 370826 微山县 3136 | 3137 | 370827 鱼台县 3138 | 3139 | 370828 金乡县 3140 | 3141 | 370829 嘉祥县 3142 | 3143 | 370830 汶上县 3144 | 3145 | 370831 泗水县 3146 | 3147 | 370832 梁山县 3148 | 3149 | 370881 曲阜市 3150 | 3151 | 370882 兖州市 3152 | 3153 | 370883 邹城市 3154 | 3155 | 370900 泰安市 3156 | 3157 | 370901 市辖区 3158 | 3159 | 370902 泰山区 3160 | 3161 | 370911 岱岳区 3162 | 3163 | 370921 宁阳县 3164 | 3165 | 370923 东平县 3166 | 3167 | 370982 新泰市 3168 | 3169 | 370983 肥城市 3170 | 3171 | 371000 威海市 3172 | 3173 | 371001 市辖区 3174 | 3175 | 371002 环翠区 3176 | 3177 | 371081 文登市 3178 | 3179 | 371082 荣成市 3180 | 3181 | 371083 乳山市 3182 | 3183 | 371100 日照市 3184 | 3185 | 371101 市辖区 3186 | 3187 | 371102 东港区 3188 | 3189 | 371103 岚山区 3190 | 3191 | 371121 五莲县 3192 | 3193 | 371122 莒县 3194 | 3195 | 371200 莱芜市 3196 | 3197 | 371201 市辖区 3198 | 3199 | 371202 莱城区 3200 | 3201 | 371203 钢城区 3202 | 3203 | 371300 临沂市 3204 | 3205 | 371301 市辖区 3206 | 3207 | 371302 兰山区 3208 | 3209 | 371311 罗庄区 3210 | 3211 | 371312 河东区 3212 | 3213 | 371321 沂南县 3214 | 3215 | 371322 郯城县 3216 | 3217 | 371323 沂水县 3218 | 3219 | 371324 苍山县 3220 | 3221 | 371325 费县 3222 | 3223 | 371326 平邑县 3224 | 3225 | 371327 莒南县 3226 | 3227 | 371328 蒙阴县 3228 | 3229 | 371329 临沭县 3230 | 3231 | 371400 德州市 3232 | 3233 | 371401 市辖区 3234 | 3235 | 371402 德城区 3236 | 3237 | 371421 陵县 3238 | 3239 | 371422 宁津县 3240 | 3241 | 371423 庆云县 3242 | 3243 | 371424 临邑县 3244 | 3245 | 371425 齐河县 3246 | 3247 | 371426 平原县 3248 | 3249 | 371427 夏津县 3250 | 3251 | 371428 武城县 3252 | 3253 | 371481 乐陵市 3254 | 3255 | 371482 禹城市 3256 | 3257 | 371500 聊城市 3258 | 3259 | 371501 市辖区 3260 | 3261 | 371502 东昌府区 3262 | 3263 | 371521 阳谷县 3264 | 3265 | 371522 莘县 3266 | 3267 | 371523 茌平县 3268 | 3269 | 371524 东阿县 3270 | 3271 | 371525 冠县 3272 | 3273 | 371526 高唐县 3274 | 3275 | 371581 临清市 3276 | 3277 | 371600 滨州市 3278 | 3279 | 371601 市辖区 3280 | 3281 | 371602 滨城区 3282 | 3283 | 371621 惠民县 3284 | 3285 | 371622 阳信县 3286 | 3287 | 371623 无棣县 3288 | 3289 | 371624 沾化县 3290 | 3291 | 371625 博兴县 3292 | 3293 | 371626 邹平县 3294 | 3295 | 371700 菏泽市 3296 | 3297 | 371701 市辖区 3298 | 3299 | 371702 牡丹区 3300 | 3301 | 371721 曹县 3302 | 3303 | 371722 单县 3304 | 3305 | 371723 成武县 3306 | 3307 | 371724 巨野县 3308 | 3309 | 371725 郓城县 3310 | 3311 | 371726 鄄城县 3312 | 3313 | 371727 定陶县 3314 | 3315 | 371728 东明县 3316 | 3317 | 410000 河南省 3318 | 3319 | 410100 郑州市 3320 | 3321 | 410101 市辖区 3322 | 3323 | 410102 中原区 3324 | 3325 | 410103 二七区 3326 | 3327 | 410104 管城回族区 3328 | 3329 | 410105 金水区 3330 | 3331 | 410106 上街区 3332 | 3333 | 410108 惠济区 3334 | 3335 | 410122 中牟县 3336 | 3337 | 410181 巩义市 3338 | 3339 | 410182 荥阳市 3340 | 3341 | 410183 新密市 3342 | 3343 | 410184 新郑市 3344 | 3345 | 410185 登封市 3346 | 3347 | 410200 开封市 3348 | 3349 | 410201 市辖区 3350 | 3351 | 410202 龙亭区 3352 | 3353 | 410203 顺河回族区 3354 | 3355 | 410204 鼓楼区 3356 | 3357 | 410205 禹王台区 3358 | 3359 | 410211 金明区 3360 | 3361 | 410221 杞县 3362 | 3363 | 410222 通许县 3364 | 3365 | 410223 尉氏县 3366 | 3367 | 410224 开封县 3368 | 3369 | 410225 兰考县 3370 | 3371 | 410300 洛阳市 3372 | 3373 | 410301 市辖区 3374 | 3375 | 410302 老城区 3376 | 3377 | 410303 西工区 3378 | 3379 | 410304 瀍河回族区 3380 | 3381 | 410305 涧西区 3382 | 3383 | 410306 吉利区 3384 | 3385 | 410311 洛龙区 3386 | 3387 | 410322 孟津县 3388 | 3389 | 410323 新安县 3390 | 3391 | 410324 栾川县 3392 | 3393 | 410325 嵩县 3394 | 3395 | 410326 汝阳县 3396 | 3397 | 410327 宜阳县 3398 | 3399 | 410328 洛宁县 3400 | 3401 | 410329 伊川县 3402 | 3403 | 410381 偃师市 3404 | 3405 | 410400 平顶山市 3406 | 3407 | 410401 市辖区 3408 | 3409 | 410402 新华区 3410 | 3411 | 410403 卫东区 3412 | 3413 | 410404 石龙区 3414 | 3415 | 410411 湛河区 3416 | 3417 | 410421 宝丰县 3418 | 3419 | 410422 叶县 3420 | 3421 | 410423 鲁山县 3422 | 3423 | 410425 郏县 3424 | 3425 | 410481 舞钢市 3426 | 3427 | 410482 汝州市 3428 | 3429 | 410500 安阳市 3430 | 3431 | 410501 市辖区 3432 | 3433 | 410502 文峰区 3434 | 3435 | 410503 北关区 3436 | 3437 | 410505 殷都区 3438 | 3439 | 410506 龙安区 3440 | 3441 | 410522 安阳县 3442 | 3443 | 410523 汤阴县 3444 | 3445 | 410526 滑县 3446 | 3447 | 410527 内黄县 3448 | 3449 | 410581 林州市 3450 | 3451 | 410600 鹤壁市 3452 | 3453 | 410601 市辖区 3454 | 3455 | 410602 鹤山区 3456 | 3457 | 410603 山城区 3458 | 3459 | 410611 淇滨区 3460 | 3461 | 410621 浚县 3462 | 3463 | 410622 淇县 3464 | 3465 | 410700 新乡市 3466 | 3467 | 410701 市辖区 3468 | 3469 | 410702 红旗区 3470 | 3471 | 410703 卫滨区 3472 | 3473 | 410704 凤泉区 3474 | 3475 | 410711 牧野区 3476 | 3477 | 410721 新乡县 3478 | 3479 | 410724 获嘉县 3480 | 3481 | 410725 原阳县 3482 | 3483 | 410726 延津县 3484 | 3485 | 410727 封丘县 3486 | 3487 | 410728 长垣县 3488 | 3489 | 410781 卫辉市 3490 | 3491 | 410782 辉县市 3492 | 3493 | 410800 焦作市 3494 | 3495 | 410801 市辖区 3496 | 3497 | 410802 解放区 3498 | 3499 | 410803 中站区 3500 | 3501 | 410804 马村区 3502 | 3503 | 410811 山阳区 3504 | 3505 | 410821 修武县 3506 | 3507 | 410822 博爱县 3508 | 3509 | 410823 武陟县 3510 | 3511 | 410825 温县 3512 | 3513 | 410882 沁阳市 3514 | 3515 | 410883 孟州市 3516 | 3517 | 410900 濮阳市 3518 | 3519 | 410901 市辖区 3520 | 3521 | 410902 华龙区 3522 | 3523 | 410922 清丰县 3524 | 3525 | 410923 南乐县 3526 | 3527 | 410926 范县 3528 | 3529 | 410927 台前县 3530 | 3531 | 410928 濮阳县 3532 | 3533 | 411000 许昌市 3534 | 3535 | 411001 市辖区 3536 | 3537 | 411002 魏都区 3538 | 3539 | 411023 许昌县 3540 | 3541 | 411024 鄢陵县 3542 | 3543 | 411025 襄城县 3544 | 3545 | 411081 禹州市 3546 | 3547 | 411082 长葛市 3548 | 3549 | 411100 漯河市 3550 | 3551 | 411101 市辖区 3552 | 3553 | 411102 源汇区 3554 | 3555 | 411103 郾城区 3556 | 3557 | 411104 召陵区 3558 | 3559 | 411121 舞阳县 3560 | 3561 | 411122 临颍县 3562 | 3563 | 411200 三门峡市 3564 | 3565 | 411201 市辖区 3566 | 3567 | 411202 湖滨区 3568 | 3569 | 411221 渑池县 3570 | 3571 | 411222 陕县 3572 | 3573 | 411224 卢氏县 3574 | 3575 | 411281 义马市 3576 | 3577 | 411282 灵宝市 3578 | 3579 | 411300 南阳市 3580 | 3581 | 411301 市辖区 3582 | 3583 | 411302 宛城区 3584 | 3585 | 411303 卧龙区 3586 | 3587 | 411321 南召县 3588 | 3589 | 411322 方城县 3590 | 3591 | 411323 西峡县 3592 | 3593 | 411324 镇平县 3594 | 3595 | 411325 内乡县 3596 | 3597 | 411326 淅川县 3598 | 3599 | 411327 社旗县 3600 | 3601 | 411328 唐河县 3602 | 3603 | 411329 新野县 3604 | 3605 | 411330 桐柏县 3606 | 3607 | 411381 邓州市 3608 | 3609 | 411400 商丘市 3610 | 3611 | 411401 市辖区 3612 | 3613 | 411402 梁园区 3614 | 3615 | 411403 睢阳区 3616 | 3617 | 411421 民权县 3618 | 3619 | 411422 睢县 3620 | 3621 | 411423 宁陵县 3622 | 3623 | 411424 柘城县 3624 | 3625 | 411425 虞城县 3626 | 3627 | 411426 夏邑县 3628 | 3629 | 411481 永城市 3630 | 3631 | 411500 信阳市 3632 | 3633 | 411501 市辖区 3634 | 3635 | 411502 浉河区 3636 | 3637 | 411503 平桥区 3638 | 3639 | 411521 罗山县 3640 | 3641 | 411522 光山县 3642 | 3643 | 411523 新县 3644 | 3645 | 411524 商城县 3646 | 3647 | 411525 固始县 3648 | 3649 | 411526 潢川县 3650 | 3651 | 411527 淮滨县 3652 | 3653 | 411528 息县 3654 | 3655 | 411600 周口市 3656 | 3657 | 411601 市辖区 3658 | 3659 | 411602 川汇区 3660 | 3661 | 411621 扶沟县 3662 | 3663 | 411622 西华县 3664 | 3665 | 411623 商水县 3666 | 3667 | 411624 沈丘县 3668 | 3669 | 411625 郸城县 3670 | 3671 | 411626 淮阳县 3672 | 3673 | 411627 太康县 3674 | 3675 | 411628 鹿邑县 3676 | 3677 | 411681 项城市 3678 | 3679 | 411700 驻马店市 3680 | 3681 | 411701 市辖区 3682 | 3683 | 411702 驿城区 3684 | 3685 | 411721 西平县 3686 | 3687 | 411722 上蔡县 3688 | 3689 | 411723 平舆县 3690 | 3691 | 411724 正阳县 3692 | 3693 | 411725 确山县 3694 | 3695 | 411726 泌阳县 3696 | 3697 | 411727 汝南县 3698 | 3699 | 411728 遂平县 3700 | 3701 | 411729 新蔡县 3702 | 3703 | 419000 省直辖县级行政区划 3704 | 3705 | 419001 济源市 3706 | 3707 | 420000 湖北省 3708 | 3709 | 420100 武汉市 3710 | 3711 | 420101 市辖区 3712 | 3713 | 420102 江岸区 3714 | 3715 | 420103 江汉区 3716 | 3717 | 420104 硚口区 3718 | 3719 | 420105 汉阳区 3720 | 3721 | 420106 武昌区 3722 | 3723 | 420107 青山区 3724 | 3725 | 420111 洪山区 3726 | 3727 | 420112 东西湖区 3728 | 3729 | 420113 汉南区 3730 | 3731 | 420114 蔡甸区 3732 | 3733 | 420115 江夏区 3734 | 3735 | 420116 黄陂区 3736 | 3737 | 420117 新洲区 3738 | 3739 | 420200 黄石市 3740 | 3741 | 420201 市辖区 3742 | 3743 | 420202 黄石港区 3744 | 3745 | 420203 西塞山区 3746 | 3747 | 420204 下陆区 3748 | 3749 | 420205 铁山区 3750 | 3751 | 420222 阳新县 3752 | 3753 | 420281 大冶市 3754 | 3755 | 420300 十堰市 3756 | 3757 | 420301 市辖区 3758 | 3759 | 420302 茅箭区 3760 | 3761 | 420303 张湾区 3762 | 3763 | 420321 郧县 3764 | 3765 | 420322 郧西县 3766 | 3767 | 420323 竹山县 3768 | 3769 | 420324 竹溪县 3770 | 3771 | 420325 房县 3772 | 3773 | 420381 丹江口市 3774 | 3775 | 420500 宜昌市 3776 | 3777 | 420501 市辖区 3778 | 3779 | 420502 西陵区 3780 | 3781 | 420503 伍家岗区 3782 | 3783 | 420504 点军区 3784 | 3785 | 420505 猇亭区 3786 | 3787 | 420506 夷陵区 3788 | 3789 | 420525 远安县 3790 | 3791 | 420526 兴山县 3792 | 3793 | 420527 秭归县 3794 | 3795 | 420528 长阳土家族自治县 3796 | 3797 | 420529 五峰土家族自治县 3798 | 3799 | 420581 宜都市 3800 | 3801 | 420582 当阳市 3802 | 3803 | 420583 枝江市 3804 | 3805 | 420600 襄阳市 3806 | 3807 | 420601 市辖区 3808 | 3809 | 420602 襄城区 3810 | 3811 | 420606 樊城区 3812 | 3813 | 420607 襄州区 3814 | 3815 | 420624 南漳县 3816 | 3817 | 420625 谷城县 3818 | 3819 | 420626 保康县 3820 | 3821 | 420682 老河口市 3822 | 3823 | 420683 枣阳市 3824 | 3825 | 420684 宜城市 3826 | 3827 | 420700 鄂州市 3828 | 3829 | 420701 市辖区 3830 | 3831 | 420702 梁子湖区 3832 | 3833 | 420703 华容区 3834 | 3835 | 420704 鄂城区 3836 | 3837 | 420800 荆门市 3838 | 3839 | 420801 市辖区 3840 | 3841 | 420802 东宝区 3842 | 3843 | 420804 掇刀区 3844 | 3845 | 420821 京山县 3846 | 3847 | 420822 沙洋县 3848 | 3849 | 420881 钟祥市 3850 | 3851 | 420900 孝感市 3852 | 3853 | 420901 市辖区 3854 | 3855 | 420902 孝南区 3856 | 3857 | 420921 孝昌县 3858 | 3859 | 420922 大悟县 3860 | 3861 | 420923 云梦县 3862 | 3863 | 420981 应城市 3864 | 3865 | 420982 安陆市 3866 | 3867 | 420984 汉川市 3868 | 3869 | 421000 荆州市 3870 | 3871 | 421001 市辖区 3872 | 3873 | 421002 沙市区 3874 | 3875 | 421003 荆州区 3876 | 3877 | 421022 公安县 3878 | 3879 | 421023 监利县 3880 | 3881 | 421024 江陵县 3882 | 3883 | 421081 石首市 3884 | 3885 | 421083 洪湖市 3886 | 3887 | 421087 松滋市 3888 | 3889 | 421100 黄冈市 3890 | 3891 | 421101 市辖区 3892 | 3893 | 421102 黄州区 3894 | 3895 | 421121 团风县 3896 | 3897 | 421122 红安县 3898 | 3899 | 421123 罗田县 3900 | 3901 | 421124 英山县 3902 | 3903 | 421125 浠水县 3904 | 3905 | 421126 蕲春县 3906 | 3907 | 421127 黄梅县 3908 | 3909 | 421181 麻城市 3910 | 3911 | 421182 武穴市 3912 | 3913 | 421200 咸宁市 3914 | 3915 | 421201 市辖区 3916 | 3917 | 421202 咸安区 3918 | 3919 | 421221 嘉鱼县 3920 | 3921 | 421222 通城县 3922 | 3923 | 421223 崇阳县 3924 | 3925 | 421224 通山县 3926 | 3927 | 421281 赤壁市 3928 | 3929 | 421300 随州市 3930 | 3931 | 421301 市辖区 3932 | 3933 | 421303 曾都区 3934 | 3935 | 421321 随县 3936 | 3937 | 421381 广水市 3938 | 3939 | 422800 恩施土家族苗族自治州 3940 | 3941 | 422801 恩施市 3942 | 3943 | 422802 利川市 3944 | 3945 | 422822 建始县 3946 | 3947 | 422823 巴东县 3948 | 3949 | 422825 宣恩县 3950 | 3951 | 422826 咸丰县 3952 | 3953 | 422827 来凤县 3954 | 3955 | 422828 鹤峰县 3956 | 3957 | 429000 省直辖县级行政区划 3958 | 3959 | 429004 仙桃市 3960 | 3961 | 429005 潜江市 3962 | 3963 | 429006 天门市 3964 | 3965 | 429021 神农架林区 3966 | 3967 | 430000 湖南省 3968 | 3969 | 430100 长沙市 3970 | 3971 | 430101 市辖区 3972 | 3973 | 430102 芙蓉区 3974 | 3975 | 430103 天心区 3976 | 3977 | 430104 岳麓区 3978 | 3979 | 430105 开福区 3980 | 3981 | 430111 雨花区 3982 | 3983 | 430112 望城区 3984 | 3985 | 430121 长沙县 3986 | 3987 | 430124 宁乡县 3988 | 3989 | 430181 浏阳市 3990 | 3991 | 430200 株洲市 3992 | 3993 | 430201 市辖区 3994 | 3995 | 430202 荷塘区 3996 | 3997 | 430203 芦淞区 3998 | 3999 | 430204 石峰区 4000 | 4001 | 430211 天元区 4002 | 4003 | 430221 株洲县 4004 | 4005 | 430223 攸县 4006 | 4007 | 430224 茶陵县 4008 | 4009 | 430225 炎陵县 4010 | 4011 | 430281 醴陵市 4012 | 4013 | 430300 湘潭市 4014 | 4015 | 430301 市辖区 4016 | 4017 | 430302 雨湖区 4018 | 4019 | 430304 岳塘区 4020 | 4021 | 430321 湘潭县 4022 | 4023 | 430381 湘乡市 4024 | 4025 | 430382 韶山市 4026 | 4027 | 430400 衡阳市 4028 | 4029 | 430401 市辖区 4030 | 4031 | 430405 珠晖区 4032 | 4033 | 430406 雁峰区 4034 | 4035 | 430407 石鼓区 4036 | 4037 | 430408 蒸湘区 4038 | 4039 | 430412 南岳区 4040 | 4041 | 430421 衡阳县 4042 | 4043 | 430422 衡南县 4044 | 4045 | 430423 衡山县 4046 | 4047 | 430424 衡东县 4048 | 4049 | 430426 祁东县 4050 | 4051 | 430481 耒阳市 4052 | 4053 | 430482 常宁市 4054 | 4055 | 430500 邵阳市 4056 | 4057 | 430501 市辖区 4058 | 4059 | 430502 双清区 4060 | 4061 | 430503 大祥区 4062 | 4063 | 430511 北塔区 4064 | 4065 | 430521 邵东县 4066 | 4067 | 430522 新邵县 4068 | 4069 | 430523 邵阳县 4070 | 4071 | 430524 隆回县 4072 | 4073 | 430525 洞口县 4074 | 4075 | 430527 绥宁县 4076 | 4077 | 430528 新宁县 4078 | 4079 | 430529 城步苗族自治县 4080 | 4081 | 430581 武冈市 4082 | 4083 | 430600 岳阳市 4084 | 4085 | 430601 市辖区 4086 | 4087 | 430602 岳阳楼区 4088 | 4089 | 430603 云溪区 4090 | 4091 | 430611 君山区 4092 | 4093 | 430621 岳阳县 4094 | 4095 | 430623 华容县 4096 | 4097 | 430624 湘阴县 4098 | 4099 | 430626 平江县 4100 | 4101 | 430681 汨罗市 4102 | 4103 | 430682 临湘市 4104 | 4105 | 430700 常德市 4106 | 4107 | 430701 市辖区 4108 | 4109 | 430702 武陵区 4110 | 4111 | 430703 鼎城区 4112 | 4113 | 430721 安乡县 4114 | 4115 | 430722 汉寿县 4116 | 4117 | 430723 澧县 4118 | 4119 | 430724 临澧县 4120 | 4121 | 430725 桃源县 4122 | 4123 | 430726 石门县 4124 | 4125 | 430781 津市市 4126 | 4127 | 430800 张家界市 4128 | 4129 | 430801 市辖区 4130 | 4131 | 430802 永定区 4132 | 4133 | 430811 武陵源区 4134 | 4135 | 430821 慈利县 4136 | 4137 | 430822 桑植县 4138 | 4139 | 430900 益阳市 4140 | 4141 | 430901 市辖区 4142 | 4143 | 430902 资阳区 4144 | 4145 | 430903 赫山区 4146 | 4147 | 430921 南县 4148 | 4149 | 430922 桃江县 4150 | 4151 | 430923 安化县 4152 | 4153 | 430981 沅江市 4154 | 4155 | 431000 郴州市 4156 | 4157 | 431001 市辖区 4158 | 4159 | 431002 北湖区 4160 | 4161 | 431003 苏仙区 4162 | 4163 | 431021 桂阳县 4164 | 4165 | 431022 宜章县 4166 | 4167 | 431023 永兴县 4168 | 4169 | 431024 嘉禾县 4170 | 4171 | 431025 临武县 4172 | 4173 | 431026 汝城县 4174 | 4175 | 431027 桂东县 4176 | 4177 | 431028 安仁县 4178 | 4179 | 431081 资兴市 4180 | 4181 | 431100 永州市 4182 | 4183 | 431101 市辖区 4184 | 4185 | 431102 零陵区 4186 | 4187 | 431103 冷水滩区 4188 | 4189 | 431121 祁阳县 4190 | 4191 | 431122 东安县 4192 | 4193 | 431123 双牌县 4194 | 4195 | 431124 道县 4196 | 4197 | 431125 江永县 4198 | 4199 | 431126 宁远县 4200 | 4201 | 431127 蓝山县 4202 | 4203 | 431128 新田县 4204 | 4205 | 431129 江华瑶族自治县 4206 | 4207 | 431200 怀化市 4208 | 4209 | 431201 市辖区 4210 | 4211 | 431202 鹤城区 4212 | 4213 | 431221 中方县 4214 | 4215 | 431222 沅陵县 4216 | 4217 | 431223 辰溪县 4218 | 4219 | 431224 溆浦县 4220 | 4221 | 431225 会同县 4222 | 4223 | 431226 麻阳苗族自治县 4224 | 4225 | 431227 新晃侗族自治县 4226 | 4227 | 431228 芷江侗族自治县 4228 | 4229 | 431229 靖州苗族侗族自治县 4230 | 4231 | 431230 通道侗族自治县 4232 | 4233 | 431281 洪江市 4234 | 4235 | 431300 娄底市 4236 | 4237 | 431301 市辖区 4238 | 4239 | 431302 娄星区 4240 | 4241 | 431321 双峰县 4242 | 4243 | 431322 新化县 4244 | 4245 | 431381 冷水江市 4246 | 4247 | 431382 涟源市 4248 | 4249 | 433100 湘西土家族苗族自治州 4250 | 4251 | 433101 吉首市 4252 | 4253 | 433122 泸溪县 4254 | 4255 | 433123 凤凰县 4256 | 4257 | 433124 花垣县 4258 | 4259 | 433125 保靖县 4260 | 4261 | 433126 古丈县 4262 | 4263 | 433127 永顺县 4264 | 4265 | 433130 龙山县 4266 | 4267 | 440000 广东省 4268 | 4269 | 440100 广州市 4270 | 4271 | 440101 市辖区 4272 | 4273 | 440103 荔湾区 4274 | 4275 | 440104 越秀区 4276 | 4277 | 440105 海珠区 4278 | 4279 | 440106 天河区 4280 | 4281 | 440111 白云区 4282 | 4283 | 440112 黄埔区 4284 | 4285 | 440113 番禺区 4286 | 4287 | 440114 花都区 4288 | 4289 | 440115 南沙区 4290 | 4291 | 440116 萝岗区 4292 | 4293 | 440183 增城市 4294 | 4295 | 440184 从化市 4296 | 4297 | 440200 韶关市 4298 | 4299 | 440201 市辖区 4300 | 4301 | 440203 武江区 4302 | 4303 | 440204 浈江区 4304 | 4305 | 440205 曲江区 4306 | 4307 | 440222 始兴县 4308 | 4309 | 440224 仁化县 4310 | 4311 | 440229 翁源县 4312 | 4313 | 440232 乳源瑶族自治县 4314 | 4315 | 440233 新丰县 4316 | 4317 | 440281 乐昌市 4318 | 4319 | 440282 南雄市 4320 | 4321 | 440300 深圳市 4322 | 4323 | 440301 市辖区 4324 | 4325 | 440303 罗湖区 4326 | 4327 | 440304 福田区 4328 | 4329 | 440305 南山区 4330 | 4331 | 440306 宝安区 4332 | 4333 | 440307 龙岗区 4334 | 4335 | 440308 盐田区 4336 | 4337 | 440400 珠海市 4338 | 4339 | 440401 市辖区 4340 | 4341 | 440402 香洲区 4342 | 4343 | 440403 斗门区 4344 | 4345 | 440404 金湾区 4346 | 4347 | 440500 汕头市 4348 | 4349 | 440501 市辖区 4350 | 4351 | 440507 龙湖区 4352 | 4353 | 440511 金平区 4354 | 4355 | 440512 濠江区 4356 | 4357 | 440513 潮阳区 4358 | 4359 | 440514 潮南区 4360 | 4361 | 440515 澄海区 4362 | 4363 | 440523 南澳县 4364 | 4365 | 440600 佛山市 4366 | 4367 | 440601 市辖区 4368 | 4369 | 440604 禅城区 4370 | 4371 | 440605 南海区 4372 | 4373 | 440606 顺德区 4374 | 4375 | 440607 三水区 4376 | 4377 | 440608 高明区 4378 | 4379 | 440700 江门市 4380 | 4381 | 440701 市辖区 4382 | 4383 | 440703 蓬江区 4384 | 4385 | 440704 江海区 4386 | 4387 | 440705 新会区 4388 | 4389 | 440781 台山市 4390 | 4391 | 440783 开平市 4392 | 4393 | 440784 鹤山市 4394 | 4395 | 440785 恩平市 4396 | 4397 | 440800 湛江市 4398 | 4399 | 440801 市辖区 4400 | 4401 | 440802 赤坎区 4402 | 4403 | 440803 霞山区 4404 | 4405 | 440804 坡头区 4406 | 4407 | 440811 麻章区 4408 | 4409 | 440823 遂溪县 4410 | 4411 | 440825 徐闻县 4412 | 4413 | 440881 廉江市 4414 | 4415 | 440882 雷州市 4416 | 4417 | 440883 吴川市 4418 | 4419 | 440900 茂名市 4420 | 4421 | 440901 市辖区 4422 | 4423 | 440902 茂南区 4424 | 4425 | 440903 茂港区 4426 | 4427 | 440923 电白县 4428 | 4429 | 440981 高州市 4430 | 4431 | 440982 化州市 4432 | 4433 | 440983 信宜市 4434 | 4435 | 441200 肇庆市 4436 | 4437 | 441201 市辖区 4438 | 4439 | 441202 端州区 4440 | 4441 | 441203 鼎湖区 4442 | 4443 | 441223 广宁县 4444 | 4445 | 441224 怀集县 4446 | 4447 | 441225 封开县 4448 | 4449 | 441226 德庆县 4450 | 4451 | 441283 高要市 4452 | 4453 | 441284 四会市 4454 | 4455 | 441300 惠州市 4456 | 4457 | 441301 市辖区 4458 | 4459 | 441302 惠城区 4460 | 4461 | 441303 惠阳区 4462 | 4463 | 441322 博罗县 4464 | 4465 | 441323 惠东县 4466 | 4467 | 441324 龙门县 4468 | 4469 | 441400 梅州市 4470 | 4471 | 441401 市辖区 4472 | 4473 | 441402 梅江区 4474 | 4475 | 441421 梅县 4476 | 4477 | 441422 大埔县 4478 | 4479 | 441423 丰顺县 4480 | 4481 | 441424 五华县 4482 | 4483 | 441426 平远县 4484 | 4485 | 441427 蕉岭县 4486 | 4487 | 441481 兴宁市 4488 | 4489 | 441500 汕尾市 4490 | 4491 | 441501 市辖区 4492 | 4493 | 441502 城区 4494 | 4495 | 441521 海丰县 4496 | 4497 | 441523 陆河县 4498 | 4499 | 441581 陆丰市 4500 | 4501 | 441600 河源市 4502 | 4503 | 441601 市辖区 4504 | 4505 | 441602 源城区 4506 | 4507 | 441621 紫金县 4508 | 4509 | 441622 龙川县 4510 | 4511 | 441623 连平县 4512 | 4513 | 441624 和平县 4514 | 4515 | 441625 东源县 4516 | 4517 | 441700 阳江市 4518 | 4519 | 441701 市辖区 4520 | 4521 | 441702 江城区 4522 | 4523 | 441721 阳西县 4524 | 4525 | 441723 阳东县 4526 | 4527 | 441781 阳春市 4528 | 4529 | 441800 清远市 4530 | 4531 | 441801 市辖区 4532 | 4533 | 441802 清城区 4534 | 4535 | 441803 清新区 4536 | 4537 | 441821 佛冈县 4538 | 4539 | 441823 阳山县 4540 | 4541 | 441825 连山壮族瑶族自治县 4542 | 4543 | 441826 连南瑶族自治县 4544 | 4545 | 441881 英德市 4546 | 4547 | 441882 连州市 4548 | 4549 | 441900 东莞市 4550 | 4551 | 442000 中山市 4552 | 4553 | 445100 潮州市 4554 | 4555 | 445101 市辖区 4556 | 4557 | 445102 湘桥区 4558 | 4559 | 445103 潮安区 4560 | 4561 | 445122 饶平县 4562 | 4563 | 445200 揭阳市 4564 | 4565 | 445201 市辖区 4566 | 4567 | 445202 榕城区 4568 | 4569 | 445203 揭东区 4570 | 4571 | 445222 揭西县 4572 | 4573 | 445224 惠来县 4574 | 4575 | 445281 普宁市 4576 | 4577 | 445300 云浮市 4578 | 4579 | 445301 市辖区 4580 | 4581 | 445302 云城区 4582 | 4583 | 445321 新兴县 4584 | 4585 | 445322 郁南县 4586 | 4587 | 445323 云安县 4588 | 4589 | 445381 罗定市 4590 | 4591 | 450000 广西壮族自治区 4592 | 4593 | 450100 南宁市 4594 | 4595 | 450101 市辖区 4596 | 4597 | 450102 兴宁区 4598 | 4599 | 450103 青秀区 4600 | 4601 | 450105 江南区 4602 | 4603 | 450107 西乡塘区 4604 | 4605 | 450108 良庆区 4606 | 4607 | 450109 邕宁区 4608 | 4609 | 450122 武鸣县 4610 | 4611 | 450123 隆安县 4612 | 4613 | 450124 马山县 4614 | 4615 | 450125 上林县 4616 | 4617 | 450126 宾阳县 4618 | 4619 | 450127 横县 4620 | 4621 | 450200 柳州市 4622 | 4623 | 450201 市辖区 4624 | 4625 | 450202 城中区 4626 | 4627 | 450203 鱼峰区 4628 | 4629 | 450204 柳南区 4630 | 4631 | 450205 柳北区 4632 | 4633 | 450221 柳江县 4634 | 4635 | 450222 柳城县 4636 | 4637 | 450223 鹿寨县 4638 | 4639 | 450224 融安县 4640 | 4641 | 450225 融水苗族自治县 4642 | 4643 | 450226 三江侗族自治县 4644 | 4645 | 450300 桂林市 4646 | 4647 | 450301 市辖区 4648 | 4649 | 450302 秀峰区 4650 | 4651 | 450303 叠彩区 4652 | 4653 | 450304 象山区 4654 | 4655 | 450305 七星区 4656 | 4657 | 450311 雁山区 4658 | 4659 | 450312 临桂区 4660 | 4661 | 450321 阳朔县 4662 | 4663 | 450323 灵川县 4664 | 4665 | 450324 全州县 4666 | 4667 | 450325 兴安县 4668 | 4669 | 450326 永福县 4670 | 4671 | 450327 灌阳县 4672 | 4673 | 450328 龙胜各族自治县 4674 | 4675 | 450329 资源县 4676 | 4677 | 450330 平乐县 4678 | 4679 | 450331 荔浦县 4680 | 4681 | 450332 恭城瑶族自治县 4682 | 4683 | 450400 梧州市 4684 | 4685 | 450401 市辖区 4686 | 4687 | 450403 万秀区 4688 | 4689 | 450405 长洲区 4690 | 4691 | 450406 龙圩区 4692 | 4693 | 450421 苍梧县 4694 | 4695 | 450422 藤县 4696 | 4697 | 450423 蒙山县 4698 | 4699 | 450481 岑溪市 4700 | 4701 | 450500 北海市 4702 | 4703 | 450501 市辖区 4704 | 4705 | 450502 海城区 4706 | 4707 | 450503 银海区 4708 | 4709 | 450512 铁山港区 4710 | 4711 | 450521 合浦县 4712 | 4713 | 450600 防城港市 4714 | 4715 | 450601 市辖区 4716 | 4717 | 450602 港口区 4718 | 4719 | 450603 防城区 4720 | 4721 | 450621 上思县 4722 | 4723 | 450681 东兴市 4724 | 4725 | 450700 钦州市 4726 | 4727 | 450701 市辖区 4728 | 4729 | 450702 钦南区 4730 | 4731 | 450703 钦北区 4732 | 4733 | 450721 灵山县 4734 | 4735 | 450722 浦北县 4736 | 4737 | 450800 贵港市 4738 | 4739 | 450801 市辖区 4740 | 4741 | 450802 港北区 4742 | 4743 | 450803 港南区 4744 | 4745 | 450804 覃塘区 4746 | 4747 | 450821 平南县 4748 | 4749 | 450881 桂平市 4750 | 4751 | 450900 玉林市 4752 | 4753 | 450901 市辖区 4754 | 4755 | 450902 玉州区 4756 | 4757 | 450903 福绵区 4758 | 4759 | 450921 容县 4760 | 4761 | 450922 陆川县 4762 | 4763 | 450923 博白县 4764 | 4765 | 450924 兴业县 4766 | 4767 | 450981 北流市 4768 | 4769 | 451000 百色市 4770 | 4771 | 451001 市辖区 4772 | 4773 | 451002 右江区 4774 | 4775 | 451021 田阳县 4776 | 4777 | 451022 田东县 4778 | 4779 | 451023 平果县 4780 | 4781 | 451024 德保县 4782 | 4783 | 451025 靖西县 4784 | 4785 | 451026 那坡县 4786 | 4787 | 451027 凌云县 4788 | 4789 | 451028 乐业县 4790 | 4791 | 451029 田林县 4792 | 4793 | 451030 西林县 4794 | 4795 | 451031 隆林各族自治县 4796 | 4797 | 451100 贺州市 4798 | 4799 | 451101 市辖区 4800 | 4801 | 451102 八步区 4802 | 4803 | 451121 昭平县 4804 | 4805 | 451122 钟山县 4806 | 4807 | 451123 富川瑶族自治县 4808 | 4809 | 451200 河池市 4810 | 4811 | 451201 市辖区 4812 | 4813 | 451202 金城江区 4814 | 4815 | 451221 南丹县 4816 | 4817 | 451222 天峨县 4818 | 4819 | 451223 凤山县 4820 | 4821 | 451224 东兰县 4822 | 4823 | 451225 罗城仫佬族自治县 4824 | 4825 | 451226 环江毛南族自治县 4826 | 4827 | 451227 巴马瑶族自治县 4828 | 4829 | 451228 都安瑶族自治县 4830 | 4831 | 451229 大化瑶族自治县 4832 | 4833 | 451281 宜州市 4834 | 4835 | 451300 来宾市 4836 | 4837 | 451301 市辖区 4838 | 4839 | 451302 兴宾区 4840 | 4841 | 451321 忻城县 4842 | 4843 | 451322 象州县 4844 | 4845 | 451323 武宣县 4846 | 4847 | 451324 金秀瑶族自治县 4848 | 4849 | 451381 合山市 4850 | 4851 | 451400 崇左市 4852 | 4853 | 451401 市辖区 4854 | 4855 | 451402 江州区 4856 | 4857 | 451421 扶绥县 4858 | 4859 | 451422 宁明县 4860 | 4861 | 451423 龙州县 4862 | 4863 | 451424 大新县 4864 | 4865 | 451425 天等县 4866 | 4867 | 451481 凭祥市 4868 | 4869 | 460000 海南省 4870 | 4871 | 460100 海口市 4872 | 4873 | 460101 市辖区 4874 | 4875 | 460105 秀英区 4876 | 4877 | 460106 龙华区 4878 | 4879 | 460107 琼山区 4880 | 4881 | 460108 美兰区 4882 | 4883 | 460200 三亚市 4884 | 4885 | 460201 市辖区 4886 | 4887 | 460300 三沙市 4888 | 4889 | 460321 西沙群岛 4890 | 4891 | 460322 南沙群岛 4892 | 4893 | 460323 中沙群岛的岛礁及其海域 4894 | 4895 | 469000 省直辖县级行政区划 4896 | 4897 | 469001 五指山市 4898 | 4899 | 469002 琼海市 4900 | 4901 | 469003 儋州市 4902 | 4903 | 469005 文昌市 4904 | 4905 | 469006 万宁市 4906 | 4907 | 469007 东方市 4908 | 4909 | 469021 定安县 4910 | 4911 | 469022 屯昌县 4912 | 4913 | 469023 澄迈县 4914 | 4915 | 469024 临高县 4916 | 4917 | 469025 白沙黎族自治县 4918 | 4919 | 469026 昌江黎族自治县 4920 | 4921 | 469027 乐东黎族自治县 4922 | 4923 | 469028 陵水黎族自治县 4924 | 4925 | 469029 保亭黎族苗族自治县 4926 | 4927 | 469030 琼中黎族苗族自治县 4928 | 4929 | 500000 重庆市 4930 | 4931 | 500100 市辖区 4932 | 4933 | 500101 万州区 4934 | 4935 | 500102 涪陵区 4936 | 4937 | 500103 渝中区 4938 | 4939 | 500104 大渡口区 4940 | 4941 | 500105 江北区 4942 | 4943 | 500106 沙坪坝区 4944 | 4945 | 500107 九龙坡区 4946 | 4947 | 500108 南岸区 4948 | 4949 | 500109 北碚区 4950 | 4951 | 500110 綦江区 4952 | 4953 | 500111 大足区 4954 | 4955 | 500112 渝北区 4956 | 4957 | 500113 巴南区 4958 | 4959 | 500114 黔江区 4960 | 4961 | 500115 长寿区 4962 | 4963 | 500116 江津区 4964 | 4965 | 500117 合川区 4966 | 4967 | 500118 永川区 4968 | 4969 | 500119 南川区 4970 | 4971 | 500200 县 4972 | 4973 | 500223 潼南县 4974 | 4975 | 500224 铜梁县 4976 | 4977 | 500226 荣昌县 4978 | 4979 | 500227 璧山县 4980 | 4981 | 500228 梁平县 4982 | 4983 | 500229 城口县 4984 | 4985 | 500230 丰都县 4986 | 4987 | 500231 垫江县 4988 | 4989 | 500232 武隆县 4990 | 4991 | 500233 忠县 4992 | 4993 | 500234 开县 4994 | 4995 | 500235 云阳县 4996 | 4997 | 500236 奉节县 4998 | 4999 | 500237 巫山县 5000 | 5001 | 500238 巫溪县 5002 | 5003 | 500240 石柱土家族自治县 5004 | 5005 | 500241 秀山土家族苗族自治县 5006 | 5007 | 500242 酉阳土家族苗族自治县 5008 | 5009 | 500243 彭水苗族土家族自治县 5010 | 5011 | 510000 四川省 5012 | 5013 | 510100 成都市 5014 | 5015 | 510101 市辖区 5016 | 5017 | 510104 锦江区 5018 | 5019 | 510105 青羊区 5020 | 5021 | 510106 金牛区 5022 | 5023 | 510107 武侯区 5024 | 5025 | 510108 成华区 5026 | 5027 | 510112 龙泉驿区 5028 | 5029 | 510113 青白江区 5030 | 5031 | 510114 新都区 5032 | 5033 | 510115 温江区 5034 | 5035 | 510121 金堂县 5036 | 5037 | 510122 双流县 5038 | 5039 | 510124 郫县 5040 | 5041 | 510129 大邑县 5042 | 5043 | 510131 蒲江县 5044 | 5045 | 510132 新津县 5046 | 5047 | 510181 都江堰市 5048 | 5049 | 510182 彭州市 5050 | 5051 | 510183 邛崃市 5052 | 5053 | 510184 崇州市 5054 | 5055 | 510300 自贡市 5056 | 5057 | 510301 市辖区 5058 | 5059 | 510302 自流井区 5060 | 5061 | 510303 贡井区 5062 | 5063 | 510304 大安区 5064 | 5065 | 510311 沿滩区 5066 | 5067 | 510321 荣县 5068 | 5069 | 510322 富顺县 5070 | 5071 | 510400 攀枝花市 5072 | 5073 | 510401 市辖区 5074 | 5075 | 510402 东区 5076 | 5077 | 510403 西区 5078 | 5079 | 510411 仁和区 5080 | 5081 | 510421 米易县 5082 | 5083 | 510422 盐边县 5084 | 5085 | 510500 泸州市 5086 | 5087 | 510501 市辖区 5088 | 5089 | 510502 江阳区 5090 | 5091 | 510503 纳溪区 5092 | 5093 | 510504 龙马潭区 5094 | 5095 | 510521 泸县 5096 | 5097 | 510522 合江县 5098 | 5099 | 510524 叙永县 5100 | 5101 | 510525 古蔺县 5102 | 5103 | 510600 德阳市 5104 | 5105 | 510601 市辖区 5106 | 5107 | 510603 旌阳区 5108 | 5109 | 510623 中江县 5110 | 5111 | 510626 罗江县 5112 | 5113 | 510681 广汉市 5114 | 5115 | 510682 什邡市 5116 | 5117 | 510683 绵竹市 5118 | 5119 | 510700 绵阳市 5120 | 5121 | 510701 市辖区 5122 | 5123 | 510703 涪城区 5124 | 5125 | 510704 游仙区 5126 | 5127 | 510722 三台县 5128 | 5129 | 510723 盐亭县 5130 | 5131 | 510724 安县 5132 | 5133 | 510725 梓潼县 5134 | 5135 | 510726 北川羌族自治县 5136 | 5137 | 510727 平武县 5138 | 5139 | 510781 江油市 5140 | 5141 | 510800 广元市 5142 | 5143 | 510801 市辖区 5144 | 5145 | 510802 利州区 5146 | 5147 | 510811 元坝区 5148 | 5149 | 510812 朝天区 5150 | 5151 | 510821 旺苍县 5152 | 5153 | 510822 青川县 5154 | 5155 | 510823 剑阁县 5156 | 5157 | 510824 苍溪县 5158 | 5159 | 510900 遂宁市 5160 | 5161 | 510901 市辖区 5162 | 5163 | 510903 船山区 5164 | 5165 | 510904 安居区 5166 | 5167 | 510921 蓬溪县 5168 | 5169 | 510922 射洪县 5170 | 5171 | 510923 大英县 5172 | 5173 | 511000 内江市 5174 | 5175 | 511001 市辖区 5176 | 5177 | 511002 市中区 5178 | 5179 | 511011 东兴区 5180 | 5181 | 511024 威远县 5182 | 5183 | 511025 资中县 5184 | 5185 | 511028 隆昌县 5186 | 5187 | 511100 乐山市 5188 | 5189 | 511101 市辖区 5190 | 5191 | 511102 市中区 5192 | 5193 | 511111 沙湾区 5194 | 5195 | 511112 五通桥区 5196 | 5197 | 511113 金口河区 5198 | 5199 | 511123 犍为县 5200 | 5201 | 511124 井研县 5202 | 5203 | 511126 夹江县 5204 | 5205 | 511129 沐川县 5206 | 5207 | 511132 峨边彝族自治县 5208 | 5209 | 511133 马边彝族自治县 5210 | 5211 | 511181 峨眉山市 5212 | 5213 | 511300 南充市 5214 | 5215 | 511301 市辖区 5216 | 5217 | 511302 顺庆区 5218 | 5219 | 511303 高坪区 5220 | 5221 | 511304 嘉陵区 5222 | 5223 | 511321 南部县 5224 | 5225 | 511322 营山县 5226 | 5227 | 511323 蓬安县 5228 | 5229 | 511324 仪陇县 5230 | 5231 | 511325 西充县 5232 | 5233 | 511381 阆中市 5234 | 5235 | 511400 眉山市 5236 | 5237 | 511401 市辖区 5238 | 5239 | 511402 东坡区 5240 | 5241 | 511421 仁寿县 5242 | 5243 | 511422 彭山县 5244 | 5245 | 511423 洪雅县 5246 | 5247 | 511424 丹棱县 5248 | 5249 | 511425 青神县 5250 | 5251 | 511500 宜宾市 5252 | 5253 | 511501 市辖区 5254 | 5255 | 511502 翠屏区 5256 | 5257 | 511503 南溪区 5258 | 5259 | 511521 宜宾县 5260 | 5261 | 511523 江安县 5262 | 5263 | 511524 长宁县 5264 | 5265 | 511525 高县 5266 | 5267 | 511526 珙县 5268 | 5269 | 511527 筠连县 5270 | 5271 | 511528 兴文县 5272 | 5273 | 511529 屏山县 5274 | 5275 | 511600 广安市 5276 | 5277 | 511601 市辖区 5278 | 5279 | 511602 广安区 5280 | 5281 | 511603 前锋区 5282 | 5283 | 511621 岳池县 5284 | 5285 | 511622 武胜县 5286 | 5287 | 511623 邻水县 5288 | 5289 | 511681 华蓥市 5290 | 5291 | 511700 达州市 5292 | 5293 | 511701 市辖区 5294 | 5295 | 511702 通川区 5296 | 5297 | 511703 达川区 5298 | 5299 | 511722 宣汉县 5300 | 5301 | 511723 开江县 5302 | 5303 | 511724 大竹县 5304 | 5305 | 511725 渠县 5306 | 5307 | 511781 万源市 5308 | 5309 | 511800 雅安市 5310 | 5311 | 511801 市辖区 5312 | 5313 | 511802 雨城区 5314 | 5315 | 511803 名山区 5316 | 5317 | 511822 荥经县 5318 | 5319 | 511823 汉源县 5320 | 5321 | 511824 石棉县 5322 | 5323 | 511825 天全县 5324 | 5325 | 511826 芦山县 5326 | 5327 | 511827 宝兴县 5328 | 5329 | 511900 巴中市 5330 | 5331 | 511901 市辖区 5332 | 5333 | 511902 巴州区 5334 | 5335 | 511903 恩阳区 5336 | 5337 | 511921 通江县 5338 | 5339 | 511922 南江县 5340 | 5341 | 511923 平昌县 5342 | 5343 | 512000 资阳市 5344 | 5345 | 512001 市辖区 5346 | 5347 | 512002 雁江区 5348 | 5349 | 512021 安岳县 5350 | 5351 | 512022 乐至县 5352 | 5353 | 512081 简阳市 5354 | 5355 | 513200 阿坝藏族羌族自治州 5356 | 5357 | 513221 汶川县 5358 | 5359 | 513222 理县 5360 | 5361 | 513223 茂县 5362 | 5363 | 513224 松潘县 5364 | 5365 | 513225 九寨沟县 5366 | 5367 | 513226 金川县 5368 | 5369 | 513227 小金县 5370 | 5371 | 513228 黑水县 5372 | 5373 | 513229 马尔康县 5374 | 5375 | 513230 壤塘县 5376 | 5377 | 513231 阿坝县 5378 | 5379 | 513232 若尔盖县 5380 | 5381 | 513233 红原县 5382 | 5383 | 513300 甘孜藏族自治州 5384 | 5385 | 513321 康定县 5386 | 5387 | 513322 泸定县 5388 | 5389 | 513323 丹巴县 5390 | 5391 | 513324 九龙县 5392 | 5393 | 513325 雅江县 5394 | 5395 | 513326 道孚县 5396 | 5397 | 513327 炉霍县 5398 | 5399 | 513328 甘孜县 5400 | 5401 | 513329 新龙县 5402 | 5403 | 513330 德格县 5404 | 5405 | 513331 白玉县 5406 | 5407 | 513332 石渠县 5408 | 5409 | 513333 色达县 5410 | 5411 | 513334 理塘县 5412 | 5413 | 513335 巴塘县 5414 | 5415 | 513336 乡城县 5416 | 5417 | 513337 稻城县 5418 | 5419 | 513338 得荣县 5420 | 5421 | 513400 凉山彝族自治州 5422 | 5423 | 513401 西昌市 5424 | 5425 | 513422 木里藏族自治县 5426 | 5427 | 513423 盐源县 5428 | 5429 | 513424 德昌县 5430 | 5431 | 513425 会理县 5432 | 5433 | 513426 会东县 5434 | 5435 | 513427 宁南县 5436 | 5437 | 513428 普格县 5438 | 5439 | 513429 布拖县 5440 | 5441 | 513430 金阳县 5442 | 5443 | 513431 昭觉县 5444 | 5445 | 513432 喜德县 5446 | 5447 | 513433 冕宁县 5448 | 5449 | 513434 越西县 5450 | 5451 | 513435 甘洛县 5452 | 5453 | 513436 美姑县 5454 | 5455 | 513437 雷波县 5456 | 5457 | 520000 贵州省 5458 | 5459 | 520100 贵阳市 5460 | 5461 | 520101 市辖区 5462 | 5463 | 520102 南明区 5464 | 5465 | 520103 云岩区 5466 | 5467 | 520111 花溪区 5468 | 5469 | 520112 乌当区 5470 | 5471 | 520113 白云区 5472 | 5473 | 520115 观山湖区 5474 | 5475 | 520121 开阳县 5476 | 5477 | 520122 息烽县 5478 | 5479 | 520123 修文县 5480 | 5481 | 520181 清镇市 5482 | 5483 | 520200 六盘水市 5484 | 5485 | 520201 钟山区 5486 | 5487 | 520203 六枝特区 5488 | 5489 | 520221 水城县 5490 | 5491 | 520222 盘县 5492 | 5493 | 520300 遵义市 5494 | 5495 | 520301 市辖区 5496 | 5497 | 520302 红花岗区 5498 | 5499 | 520303 汇川区 5500 | 5501 | 520321 遵义县 5502 | 5503 | 520322 桐梓县 5504 | 5505 | 520323 绥阳县 5506 | 5507 | 520324 正安县 5508 | 5509 | 520325 道真仡佬族苗族自治县 5510 | 5511 | 520326 务川仡佬族苗族自治县 5512 | 5513 | 520327 凤冈县 5514 | 5515 | 520328 湄潭县 5516 | 5517 | 520329 余庆县 5518 | 5519 | 520330 习水县 5520 | 5521 | 520381 赤水市 5522 | 5523 | 520382 仁怀市 5524 | 5525 | 520400 安顺市 5526 | 5527 | 520401 市辖区 5528 | 5529 | 520402 西秀区 5530 | 5531 | 520421 平坝县 5532 | 5533 | 520422 普定县 5534 | 5535 | 520423 镇宁布依族苗族自治县 5536 | 5537 | 520424 关岭布依族苗族自治县 5538 | 5539 | 520425 紫云苗族布依族自治县 5540 | 5541 | 520500 毕节市 5542 | 5543 | 520501 市辖区 5544 | 5545 | 520502 七星关区 5546 | 5547 | 520521 大方县 5548 | 5549 | 520522 黔西县 5550 | 5551 | 520523 金沙县 5552 | 5553 | 520524 织金县 5554 | 5555 | 520525 纳雍县 5556 | 5557 | 520526 威宁彝族回族苗族自治县 5558 | 5559 | 520527 赫章县 5560 | 5561 | 520600 铜仁市 5562 | 5563 | 520601 市辖区 5564 | 5565 | 520602 碧江区 5566 | 5567 | 520603 万山区 5568 | 5569 | 520621 江口县 5570 | 5571 | 520622 玉屏侗族自治县 5572 | 5573 | 520623 石阡县 5574 | 5575 | 520624 思南县 5576 | 5577 | 520625 印江土家族苗族自治县 5578 | 5579 | 520626 德江县 5580 | 5581 | 520627 沿河土家族自治县 5582 | 5583 | 520628 松桃苗族自治县 5584 | 5585 | 522300 黔西南布依族苗族自治州 5586 | 5587 | 522301 兴义市 5588 | 5589 | 522322 兴仁县 5590 | 5591 | 522323 普安县 5592 | 5593 | 522324 晴隆县 5594 | 5595 | 522325 贞丰县 5596 | 5597 | 522326 望谟县 5598 | 5599 | 522327 册亨县 5600 | 5601 | 522328 安龙县 5602 | 5603 | 522600 黔东南苗族侗族自治州 5604 | 5605 | 522601 凯里市 5606 | 5607 | 522622 黄平县 5608 | 5609 | 522623 施秉县 5610 | 5611 | 522624 三穗县 5612 | 5613 | 522625 镇远县 5614 | 5615 | 522626 岑巩县 5616 | 5617 | 522627 天柱县 5618 | 5619 | 522628 锦屏县 5620 | 5621 | 522629 剑河县 5622 | 5623 | 522630 台江县 5624 | 5625 | 522631 黎平县 5626 | 5627 | 522632 榕江县 5628 | 5629 | 522633 从江县 5630 | 5631 | 522634 雷山县 5632 | 5633 | 522635 麻江县 5634 | 5635 | 522636 丹寨县 5636 | 5637 | 522700 黔南布依族苗族自治州 5638 | 5639 | 522701 都匀市 5640 | 5641 | 522702 福泉市 5642 | 5643 | 522722 荔波县 5644 | 5645 | 522723 贵定县 5646 | 5647 | 522725 瓮安县 5648 | 5649 | 522726 独山县 5650 | 5651 | 522727 平塘县 5652 | 5653 | 522728 罗甸县 5654 | 5655 | 522729 长顺县 5656 | 5657 | 522730 龙里县 5658 | 5659 | 522731 惠水县 5660 | 5661 | 522732 三都水族自治县 5662 | 5663 | 530000 云南省 5664 | 5665 | 530100 昆明市 5666 | 5667 | 530101 市辖区 5668 | 5669 | 530102 五华区 5670 | 5671 | 530103 盘龙区 5672 | 5673 | 530111 官渡区 5674 | 5675 | 530112 西山区 5676 | 5677 | 530113 东川区 5678 | 5679 | 530114 呈贡区 5680 | 5681 | 530122 晋宁县 5682 | 5683 | 530124 富民县 5684 | 5685 | 530125 宜良县 5686 | 5687 | 530126 石林彝族自治县 5688 | 5689 | 530127 嵩明县 5690 | 5691 | 530128 禄劝彝族苗族自治县 5692 | 5693 | 530129 寻甸回族彝族自治县 5694 | 5695 | 530181 安宁市 5696 | 5697 | 530300 曲靖市 5698 | 5699 | 530301 市辖区 5700 | 5701 | 530302 麒麟区 5702 | 5703 | 530321 马龙县 5704 | 5705 | 530322 陆良县 5706 | 5707 | 530323 师宗县 5708 | 5709 | 530324 罗平县 5710 | 5711 | 530325 富源县 5712 | 5713 | 530326 会泽县 5714 | 5715 | 530328 沾益县 5716 | 5717 | 530381 宣威市 5718 | 5719 | 530400 玉溪市 5720 | 5721 | 530401 市辖区 5722 | 5723 | 530402 红塔区 5724 | 5725 | 530421 江川县 5726 | 5727 | 530422 澄江县 5728 | 5729 | 530423 通海县 5730 | 5731 | 530424 华宁县 5732 | 5733 | 530425 易门县 5734 | 5735 | 530426 峨山彝族自治县 5736 | 5737 | 530427 新平彝族傣族自治县 5738 | 5739 | 530428 元江哈尼族彝族傣族自治县 5740 | 5741 | 530500 保山市 5742 | 5743 | 530501 市辖区 5744 | 5745 | 530502 隆阳区 5746 | 5747 | 530521 施甸县 5748 | 5749 | 530522 腾冲县 5750 | 5751 | 530523 龙陵县 5752 | 5753 | 530524 昌宁县 5754 | 5755 | 530600 昭通市 5756 | 5757 | 530601 市辖区 5758 | 5759 | 530602 昭阳区 5760 | 5761 | 530621 鲁甸县 5762 | 5763 | 530622 巧家县 5764 | 5765 | 530623 盐津县 5766 | 5767 | 530624 大关县 5768 | 5769 | 530625 永善县 5770 | 5771 | 530626 绥江县 5772 | 5773 | 530627 镇雄县 5774 | 5775 | 530628 彝良县 5776 | 5777 | 530629 威信县 5778 | 5779 | 530630 水富县 5780 | 5781 | 530700 丽江市 5782 | 5783 | 530701 市辖区 5784 | 5785 | 530702 古城区 5786 | 5787 | 530721 玉龙纳西族自治县 5788 | 5789 | 530722 永胜县 5790 | 5791 | 530723 华坪县 5792 | 5793 | 530724 宁蒗彝族自治县 5794 | 5795 | 530800 普洱市 5796 | 5797 | 530801 市辖区 5798 | 5799 | 530802 思茅区 5800 | 5801 | 530821 宁洱哈尼族彝族自治县 5802 | 5803 | 530822 墨江哈尼族自治县 5804 | 5805 | 530823 景东彝族自治县 5806 | 5807 | 530824 景谷傣族彝族自治县 5808 | 5809 | 530825 镇沅彝族哈尼族拉祜族自治县 5810 | 5811 | 530826 江城哈尼族彝族自治县 5812 | 5813 | 530827 孟连傣族拉祜族佤族自治县 5814 | 5815 | 530828 澜沧拉祜族自治县 5816 | 5817 | 530829 西盟佤族自治县 5818 | 5819 | 530900 临沧市 5820 | 5821 | 530901 市辖区 5822 | 5823 | 530902 临翔区 5824 | 5825 | 530921 凤庆县 5826 | 5827 | 530922 云县 5828 | 5829 | 530923 永德县 5830 | 5831 | 530924 镇康县 5832 | 5833 | 530925 双江拉祜族佤族布朗族傣族自治县 5834 | 5835 | 530926 耿马傣族佤族自治县 5836 | 5837 | 530927 沧源佤族自治县 5838 | 5839 | 532300 楚雄彝族自治州 5840 | 5841 | 532301 楚雄市 5842 | 5843 | 532322 双柏县 5844 | 5845 | 532323 牟定县 5846 | 5847 | 532324 南华县 5848 | 5849 | 532325 姚安县 5850 | 5851 | 532326 大姚县 5852 | 5853 | 532327 永仁县 5854 | 5855 | 532328 元谋县 5856 | 5857 | 532329 武定县 5858 | 5859 | 532331 禄丰县 5860 | 5861 | 532500 红河哈尼族彝族自治州 5862 | 5863 | 532501 个旧市 5864 | 5865 | 532502 开远市 5866 | 5867 | 532503 蒙自市 5868 | 5869 | 532504 弥勒市 5870 | 5871 | 532523 屏边苗族自治县 5872 | 5873 | 532524 建水县 5874 | 5875 | 532525 石屏县 5876 | 5877 | 532527 泸西县 5878 | 5879 | 532528 元阳县 5880 | 5881 | 532529 红河县 5882 | 5883 | 532530 金平苗族瑶族傣族自治县 5884 | 5885 | 532531 绿春县 5886 | 5887 | 532532 河口瑶族自治县 5888 | 5889 | 532600 文山壮族苗族自治州 5890 | 5891 | 532601 文山市 5892 | 5893 | 532622 砚山县 5894 | 5895 | 532623 西畴县 5896 | 5897 | 532624 麻栗坡县 5898 | 5899 | 532625 马关县 5900 | 5901 | 532626 丘北县 5902 | 5903 | 532627 广南县 5904 | 5905 | 532628 富宁县 5906 | 5907 | 532800 西双版纳傣族自治州 5908 | 5909 | 532801 景洪市 5910 | 5911 | 532822 勐海县 5912 | 5913 | 532823 勐腊县 5914 | 5915 | 532900 大理白族自治州 5916 | 5917 | 532901 大理市 5918 | 5919 | 532922 漾濞彝族自治县 5920 | 5921 | 532923 祥云县 5922 | 5923 | 532924 宾川县 5924 | 5925 | 532925 弥渡县 5926 | 5927 | 532926 南涧彝族自治县 5928 | 5929 | 532927 巍山彝族回族自治县 5930 | 5931 | 532928 永平县 5932 | 5933 | 532929 云龙县 5934 | 5935 | 532930 洱源县 5936 | 5937 | 532931 剑川县 5938 | 5939 | 532932 鹤庆县 5940 | 5941 | 533100 德宏傣族景颇族自治州 5942 | 5943 | 533102 瑞丽市 5944 | 5945 | 533103 芒市 5946 | 5947 | 533122 梁河县 5948 | 5949 | 533123 盈江县 5950 | 5951 | 533124 陇川县 5952 | 5953 | 533300 怒江傈僳族自治州 5954 | 5955 | 533321 泸水县 5956 | 5957 | 533323 福贡县 5958 | 5959 | 533324 贡山独龙族怒族自治县 5960 | 5961 | 533325 兰坪白族普米族自治县 5962 | 5963 | 533400 迪庆藏族自治州 5964 | 5965 | 533421 香格里拉县 5966 | 5967 | 533422 德钦县 5968 | 5969 | 533423 维西傈僳族自治县 5970 | 5971 | 540000 西藏自治区 5972 | 5973 | 540100 拉萨市 5974 | 5975 | 540101 市辖区 5976 | 5977 | 540102 城关区 5978 | 5979 | 540121 林周县 5980 | 5981 | 540122 当雄县 5982 | 5983 | 540123 尼木县 5984 | 5985 | 540124 曲水县 5986 | 5987 | 540125 堆龙德庆县 5988 | 5989 | 540126 达孜县 5990 | 5991 | 540127 墨竹工卡县 5992 | 5993 | 542100 昌都地区 5994 | 5995 | 542121 昌都县 5996 | 5997 | 542122 江达县 5998 | 5999 | 542123 贡觉县 6000 | 6001 | 542124 类乌齐县 6002 | 6003 | 542125 丁青县 6004 | 6005 | 542126 察雅县 6006 | 6007 | 542127 八宿县 6008 | 6009 | 542128 左贡县 6010 | 6011 | 542129 芒康县 6012 | 6013 | 542132 洛隆县 6014 | 6015 | 542133 边坝县 6016 | 6017 | 542200 山南地区 6018 | 6019 | 542221 乃东县 6020 | 6021 | 542222 扎囊县 6022 | 6023 | 542223 贡嘎县 6024 | 6025 | 542224 桑日县 6026 | 6027 | 542225 琼结县 6028 | 6029 | 542226 曲松县 6030 | 6031 | 542227 措美县 6032 | 6033 | 542228 洛扎县 6034 | 6035 | 542229 加查县 6036 | 6037 | 542231 隆子县 6038 | 6039 | 542232 错那县 6040 | 6041 | 542233 浪卡子县 6042 | 6043 | 542300 日喀则地区 6044 | 6045 | 542301 日喀则市 6046 | 6047 | 542322 南木林县 6048 | 6049 | 542323 江孜县 6050 | 6051 | 542324 定日县 6052 | 6053 | 542325 萨迦县 6054 | 6055 | 542326 拉孜县 6056 | 6057 | 542327 昂仁县 6058 | 6059 | 542328 谢通门县 6060 | 6061 | 542329 白朗县 6062 | 6063 | 542330 仁布县 6064 | 6065 | 542331 康马县 6066 | 6067 | 542332 定结县 6068 | 6069 | 542333 仲巴县 6070 | 6071 | 542334 亚东县 6072 | 6073 | 542335 吉隆县 6074 | 6075 | 542336 聂拉木县 6076 | 6077 | 542337 萨嘎县 6078 | 6079 | 542338 岗巴县 6080 | 6081 | 542400 那曲地区 6082 | 6083 | 542421 那曲县 6084 | 6085 | 542422 嘉黎县 6086 | 6087 | 542423 比如县 6088 | 6089 | 542424 聂荣县 6090 | 6091 | 542425 安多县 6092 | 6093 | 542426 申扎县 6094 | 6095 | 542427 索县 6096 | 6097 | 542428 班戈县 6098 | 6099 | 542429 巴青县 6100 | 6101 | 542430 尼玛县 6102 | 6103 | 542431 双湖县 6104 | 6105 | 542500 阿里地区 6106 | 6107 | 542521 普兰县 6108 | 6109 | 542522 札达县 6110 | 6111 | 542523 噶尔县 6112 | 6113 | 542524 日土县 6114 | 6115 | 542525 革吉县 6116 | 6117 | 542526 改则县 6118 | 6119 | 542527 措勤县 6120 | 6121 | 542600 林芝地区 6122 | 6123 | 542621 林芝县 6124 | 6125 | 542622 工布江达县 6126 | 6127 | 542623 米林县 6128 | 6129 | 542624 墨脱县 6130 | 6131 | 542625 波密县 6132 | 6133 | 542626 察隅县 6134 | 6135 | 542627 朗县 6136 | 6137 | 610000 陕西省 6138 | 6139 | 610100 西安市 6140 | 6141 | 610101 市辖区 6142 | 6143 | 610102 新城区 6144 | 6145 | 610103 碑林区 6146 | 6147 | 610104 莲湖区 6148 | 6149 | 610111 灞桥区 6150 | 6151 | 610112 未央区 6152 | 6153 | 610113 雁塔区 6154 | 6155 | 610114 阎良区 6156 | 6157 | 610115 临潼区 6158 | 6159 | 610116 长安区 6160 | 6161 | 610122 蓝田县 6162 | 6163 | 610124 周至县 6164 | 6165 | 610125 户县 6166 | 6167 | 610126 高陵县 6168 | 6169 | 610200 铜川市 6170 | 6171 | 610201 市辖区 6172 | 6173 | 610202 王益区 6174 | 6175 | 610203 印台区 6176 | 6177 | 610204 耀州区 6178 | 6179 | 610222 宜君县 6180 | 6181 | 610300 宝鸡市 6182 | 6183 | 610301 市辖区 6184 | 6185 | 610302 渭滨区 6186 | 6187 | 610303 金台区 6188 | 6189 | 610304 陈仓区 6190 | 6191 | 610322 凤翔县 6192 | 6193 | 610323 岐山县 6194 | 6195 | 610324 扶风县 6196 | 6197 | 610326 眉县 6198 | 6199 | 610327 陇县 6200 | 6201 | 610328 千阳县 6202 | 6203 | 610329 麟游县 6204 | 6205 | 610330 凤县 6206 | 6207 | 610331 太白县 6208 | 6209 | 610400 咸阳市 6210 | 6211 | 610401 市辖区 6212 | 6213 | 610402 秦都区 6214 | 6215 | 610403 杨陵区 6216 | 6217 | 610404 渭城区 6218 | 6219 | 610422 三原县 6220 | 6221 | 610423 泾阳县 6222 | 6223 | 610424 乾县 6224 | 6225 | 610425 礼泉县 6226 | 6227 | 610426 永寿县 6228 | 6229 | 610427 彬县 6230 | 6231 | 610428 长武县 6232 | 6233 | 610429 旬邑县 6234 | 6235 | 610430 淳化县 6236 | 6237 | 610431 武功县 6238 | 6239 | 610481 兴平市 6240 | 6241 | 610500 渭南市 6242 | 6243 | 610501 市辖区 6244 | 6245 | 610502 临渭区 6246 | 6247 | 610521 华县 6248 | 6249 | 610522 潼关县 6250 | 6251 | 610523 大荔县 6252 | 6253 | 610524 合阳县 6254 | 6255 | 610525 澄城县 6256 | 6257 | 610526 蒲城县 6258 | 6259 | 610527 白水县 6260 | 6261 | 610528 富平县 6262 | 6263 | 610581 韩城市 6264 | 6265 | 610582 华阴市 6266 | 6267 | 610600 延安市 6268 | 6269 | 610601 市辖区 6270 | 6271 | 610602 宝塔区 6272 | 6273 | 610621 延长县 6274 | 6275 | 610622 延川县 6276 | 6277 | 610623 子长县 6278 | 6279 | 610624 安塞县 6280 | 6281 | 610625 志丹县 6282 | 6283 | 610626 吴起县 6284 | 6285 | 610627 甘泉县 6286 | 6287 | 610628 富县 6288 | 6289 | 610629 洛川县 6290 | 6291 | 610630 宜川县 6292 | 6293 | 610631 黄龙县 6294 | 6295 | 610632 黄陵县 6296 | 6297 | 610700 汉中市 6298 | 6299 | 610701 市辖区 6300 | 6301 | 610702 汉台区 6302 | 6303 | 610721 南郑县 6304 | 6305 | 610722 城固县 6306 | 6307 | 610723 洋县 6308 | 6309 | 610724 西乡县 6310 | 6311 | 610725 勉县 6312 | 6313 | 610726 宁强县 6314 | 6315 | 610727 略阳县 6316 | 6317 | 610728 镇巴县 6318 | 6319 | 610729 留坝县 6320 | 6321 | 610730 佛坪县 6322 | 6323 | 610800 榆林市 6324 | 6325 | 610801 市辖区 6326 | 6327 | 610802 榆阳区 6328 | 6329 | 610821 神木县 6330 | 6331 | 610822 府谷县 6332 | 6333 | 610823 横山县 6334 | 6335 | 610824 靖边县 6336 | 6337 | 610825 定边县 6338 | 6339 | 610826 绥德县 6340 | 6341 | 610827 米脂县 6342 | 6343 | 610828 佳县 6344 | 6345 | 610829 吴堡县 6346 | 6347 | 610830 清涧县 6348 | 6349 | 610831 子洲县 6350 | 6351 | 610900 安康市 6352 | 6353 | 610901 市辖区 6354 | 6355 | 610902 汉滨区 6356 | 6357 | 610921 汉阴县 6358 | 6359 | 610922 石泉县 6360 | 6361 | 610923 宁陕县 6362 | 6363 | 610924 紫阳县 6364 | 6365 | 610925 岚皋县 6366 | 6367 | 610926 平利县 6368 | 6369 | 610927 镇坪县 6370 | 6371 | 610928 旬阳县 6372 | 6373 | 610929 白河县 6374 | 6375 | 611000 商洛市 6376 | 6377 | 611001 市辖区 6378 | 6379 | 611002 商州区 6380 | 6381 | 611021 洛南县 6382 | 6383 | 611022 丹凤县 6384 | 6385 | 611023 商南县 6386 | 6387 | 611024 山阳县 6388 | 6389 | 611025 镇安县 6390 | 6391 | 611026 柞水县 6392 | 6393 | 620000 甘肃省 6394 | 6395 | 620100 兰州市 6396 | 6397 | 620101 市辖区 6398 | 6399 | 620102 城关区 6400 | 6401 | 620103 七里河区 6402 | 6403 | 620104 西固区 6404 | 6405 | 620105 安宁区 6406 | 6407 | 620111 红古区 6408 | 6409 | 620121 永登县 6410 | 6411 | 620122 皋兰县 6412 | 6413 | 620123 榆中县 6414 | 6415 | 620200 嘉峪关市 6416 | 6417 | 620201 市辖区 6418 | 6419 | 620300 金昌市 6420 | 6421 | 620301 市辖区 6422 | 6423 | 620302 金川区 6424 | 6425 | 620321 永昌县 6426 | 6427 | 620400 白银市 6428 | 6429 | 620401 市辖区 6430 | 6431 | 620402 白银区 6432 | 6433 | 620403 平川区 6434 | 6435 | 620421 靖远县 6436 | 6437 | 620422 会宁县 6438 | 6439 | 620423 景泰县 6440 | 6441 | 620500 天水市 6442 | 6443 | 620501 市辖区 6444 | 6445 | 620502 秦州区 6446 | 6447 | 620503 麦积区 6448 | 6449 | 620521 清水县 6450 | 6451 | 620522 秦安县 6452 | 6453 | 620523 甘谷县 6454 | 6455 | 620524 武山县 6456 | 6457 | 620525 张家川回族自治县 6458 | 6459 | 620600 武威市 6460 | 6461 | 620601 市辖区 6462 | 6463 | 620602 凉州区 6464 | 6465 | 620621 民勤县 6466 | 6467 | 620622 古浪县 6468 | 6469 | 620623 天祝藏族自治县 6470 | 6471 | 620700 张掖市 6472 | 6473 | 620701 市辖区 6474 | 6475 | 620702 甘州区 6476 | 6477 | 620721 肃南裕固族自治县 6478 | 6479 | 620722 民乐县 6480 | 6481 | 620723 临泽县 6482 | 6483 | 620724 高台县 6484 | 6485 | 620725 山丹县 6486 | 6487 | 620800 平凉市 6488 | 6489 | 620801 市辖区 6490 | 6491 | 620802 崆峒区 6492 | 6493 | 620821 泾川县 6494 | 6495 | 620822 灵台县 6496 | 6497 | 620823 崇信县 6498 | 6499 | 620824 华亭县 6500 | 6501 | 620825 庄浪县 6502 | 6503 | 620826 静宁县 6504 | 6505 | 620900 酒泉市 6506 | 6507 | 620901 市辖区 6508 | 6509 | 620902 肃州区 6510 | 6511 | 620921 金塔县 6512 | 6513 | 620922 瓜州县 6514 | 6515 | 620923 肃北蒙古族自治县 6516 | 6517 | 620924 阿克塞哈萨克族自治县 6518 | 6519 | 620981 玉门市 6520 | 6521 | 620982 敦煌市 6522 | 6523 | 621000 庆阳市 6524 | 6525 | 621001 市辖区 6526 | 6527 | 621002 西峰区 6528 | 6529 | 621021 庆城县 6530 | 6531 | 621022 环县 6532 | 6533 | 621023 华池县 6534 | 6535 | 621024 合水县 6536 | 6537 | 621025 正宁县 6538 | 6539 | 621026 宁县 6540 | 6541 | 621027 镇原县 6542 | 6543 | 621100 定西市 6544 | 6545 | 621101 市辖区 6546 | 6547 | 621102 安定区 6548 | 6549 | 621121 通渭县 6550 | 6551 | 621122 陇西县 6552 | 6553 | 621123 渭源县 6554 | 6555 | 621124 临洮县 6556 | 6557 | 621125 漳县 6558 | 6559 | 621126 岷县 6560 | 6561 | 621200 陇南市 6562 | 6563 | 621201 市辖区 6564 | 6565 | 621202 武都区 6566 | 6567 | 621221 成县 6568 | 6569 | 621222 文县 6570 | 6571 | 621223 宕昌县 6572 | 6573 | 621224 康县 6574 | 6575 | 621225 西和县 6576 | 6577 | 621226 礼县 6578 | 6579 | 621227 徽县 6580 | 6581 | 621228 两当县 6582 | 6583 | 622900 临夏回族自治州 6584 | 6585 | 622901 临夏市 6586 | 6587 | 622921 临夏县 6588 | 6589 | 622922 康乐县 6590 | 6591 | 622923 永靖县 6592 | 6593 | 622924 广河县 6594 | 6595 | 622925 和政县 6596 | 6597 | 622926 东乡族自治县 6598 | 6599 | 622927 积石山保安族东乡族撒拉族自治县 6600 | 6601 | 623000 甘南藏族自治州 6602 | 6603 | 623001 合作市 6604 | 6605 | 623021 临潭县 6606 | 6607 | 623022 卓尼县 6608 | 6609 | 623023 舟曲县 6610 | 6611 | 623024 迭部县 6612 | 6613 | 623025 玛曲县 6614 | 6615 | 623026 碌曲县 6616 | 6617 | 623027 夏河县 6618 | 6619 | 630000 青海省 6620 | 6621 | 630100 西宁市 6622 | 6623 | 630101 市辖区 6624 | 6625 | 630102 城东区 6626 | 6627 | 630103 城中区 6628 | 6629 | 630104 城西区 6630 | 6631 | 630105 城北区 6632 | 6633 | 630121 大通回族土族自治县 6634 | 6635 | 630122 湟中县 6636 | 6637 | 630123 湟源县 6638 | 6639 | 630200 海东市 6640 | 6641 | 630202 乐都区 6642 | 6643 | 630221 平安县 6644 | 6645 | 630222 民和回族土族自治县 6646 | 6647 | 630223 互助土族自治县 6648 | 6649 | 630224 化隆回族自治县 6650 | 6651 | 630225 循化撒拉族自治县 6652 | 6653 | 632200 海北藏族自治州 6654 | 6655 | 632221 门源回族自治县 6656 | 6657 | 632222 祁连县 6658 | 6659 | 632223 海晏县 6660 | 6661 | 632224 刚察县 6662 | 6663 | 632300 黄南藏族自治州 6664 | 6665 | 632321 同仁县 6666 | 6667 | 632322 尖扎县 6668 | 6669 | 632323 泽库县 6670 | 6671 | 632324 河南蒙古族自治县 6672 | 6673 | 632500 海南藏族自治州 6674 | 6675 | 632521 共和县 6676 | 6677 | 632522 同德县 6678 | 6679 | 632523 贵德县 6680 | 6681 | 632524 兴海县 6682 | 6683 | 632525 贵南县 6684 | 6685 | 632600 果洛藏族自治州 6686 | 6687 | 632621 玛沁县 6688 | 6689 | 632622 班玛县 6690 | 6691 | 632623 甘德县 6692 | 6693 | 632624 达日县 6694 | 6695 | 632625 久治县 6696 | 6697 | 632626 玛多县 6698 | 6699 | 632700 玉树藏族自治州 6700 | 6701 | 632701 玉树市 6702 | 6703 | 632722 杂多县 6704 | 6705 | 632723 称多县 6706 | 6707 | 632724 治多县 6708 | 6709 | 632725 囊谦县 6710 | 6711 | 632726 曲麻莱县 6712 | 6713 | 632800 海西蒙古族藏族自治州 6714 | 6715 | 632801 格尔木市 6716 | 6717 | 632802 德令哈市 6718 | 6719 | 632821 乌兰县 6720 | 6721 | 632822 都兰县 6722 | 6723 | 632823 天峻县 6724 | 6725 | 640000 宁夏回族自治区 6726 | 6727 | 640100 银川市 6728 | 6729 | 640101 市辖区 6730 | 6731 | 640104 兴庆区 6732 | 6733 | 640105 西夏区 6734 | 6735 | 640106 金凤区 6736 | 6737 | 640121 永宁县 6738 | 6739 | 640122 贺兰县 6740 | 6741 | 640181 灵武市 6742 | 6743 | 640200 石嘴山市 6744 | 6745 | 640201 市辖区 6746 | 6747 | 640202 大武口区 6748 | 6749 | 640205 惠农区 6750 | 6751 | 640221 平罗县 6752 | 6753 | 640300 吴忠市 6754 | 6755 | 640301 市辖区 6756 | 6757 | 640302 利通区 6758 | 6759 | 640303 红寺堡区 6760 | 6761 | 640323 盐池县 6762 | 6763 | 640324 同心县 6764 | 6765 | 640381 青铜峡市 6766 | 6767 | 640400 固原市 6768 | 6769 | 640401 市辖区 6770 | 6771 | 640402 原州区 6772 | 6773 | 640422 西吉县 6774 | 6775 | 640423 隆德县 6776 | 6777 | 640424 泾源县 6778 | 6779 | 640425 彭阳县 6780 | 6781 | 640500 中卫市 6782 | 6783 | 640501 市辖区 6784 | 6785 | 640502 沙坡头区 6786 | 6787 | 640521 中宁县 6788 | 6789 | 640522 海原县 6790 | 6791 | 650000 新疆维吾尔自治区 6792 | 6793 | 650100 乌鲁木齐市 6794 | 6795 | 650101 市辖区 6796 | 6797 | 650102 天山区 6798 | 6799 | 650103 沙依巴克区 6800 | 6801 | 650104 新市区 6802 | 6803 | 650105 水磨沟区 6804 | 6805 | 650106 头屯河区 6806 | 6807 | 650107 达坂城区 6808 | 6809 | 650109 米东区 6810 | 6811 | 650121 乌鲁木齐县 6812 | 6813 | 650200 克拉玛依市 6814 | 6815 | 650201 市辖区 6816 | 6817 | 650202 独山子区 6818 | 6819 | 650203 克拉玛依区 6820 | 6821 | 650204 白碱滩区 6822 | 6823 | 650205 乌尔禾区 6824 | 6825 | 652100 吐鲁番地区 6826 | 6827 | 652101 吐鲁番市 6828 | 6829 | 652122 鄯善县 6830 | 6831 | 652123 托克逊县 6832 | 6833 | 652200 哈密地区 6834 | 6835 | 652201 哈密市 6836 | 6837 | 652222 巴里坤哈萨克自治县 6838 | 6839 | 652223 伊吾县 6840 | 6841 | 652300 昌吉回族自治州 6842 | 6843 | 652301 昌吉市 6844 | 6845 | 652302 阜康市 6846 | 6847 | 652323 呼图壁县 6848 | 6849 | 652324 玛纳斯县 6850 | 6851 | 652325 奇台县 6852 | 6853 | 652327 吉木萨尔县 6854 | 6855 | 652328 木垒哈萨克自治县 6856 | 6857 | 652700 博尔塔拉蒙古自治州 6858 | 6859 | 652701 博乐市 6860 | 6861 | 652702 阿拉山口市 6862 | 6863 | 652722 精河县 6864 | 6865 | 652723 温泉县 6866 | 6867 | 652800 巴音郭楞蒙古自治州 6868 | 6869 | 652801 库尔勒市 6870 | 6871 | 652822 轮台县 6872 | 6873 | 652823 尉犁县 6874 | 6875 | 652824 若羌县 6876 | 6877 | 652825 且末县 6878 | 6879 | 652826 焉耆回族自治县 6880 | 6881 | 652827 和静县 6882 | 6883 | 652828 和硕县 6884 | 6885 | 652829 博湖县 6886 | 6887 | 652900 阿克苏地区 6888 | 6889 | 652901 阿克苏市 6890 | 6891 | 652922 温宿县 6892 | 6893 | 652923 库车县 6894 | 6895 | 652924 沙雅县 6896 | 6897 | 652925 新和县 6898 | 6899 | 652926 拜城县 6900 | 6901 | 652927 乌什县 6902 | 6903 | 652928 阿瓦提县 6904 | 6905 | 652929 柯坪县 6906 | 6907 | 653000 克孜勒苏柯尔克孜自治州 6908 | 6909 | 653001 阿图什市 6910 | 6911 | 653022 阿克陶县 6912 | 6913 | 653023 阿合奇县 6914 | 6915 | 653024 乌恰县 6916 | 6917 | 653100 喀什地区 6918 | 6919 | 653101 喀什市 6920 | 6921 | 653121 疏附县 6922 | 6923 | 653122 疏勒县 6924 | 6925 | 653123 英吉沙县 6926 | 6927 | 653124 泽普县 6928 | 6929 | 653125 莎车县 6930 | 6931 | 653126 叶城县 6932 | 6933 | 653127 麦盖提县 6934 | 6935 | 653128 岳普湖县 6936 | 6937 | 653129 伽师县 6938 | 6939 | 653130 巴楚县 6940 | 6941 | 653131 塔什库尔干塔吉克自治县 6942 | 6943 | 653200 和田地区 6944 | 6945 | 653201 和田市 6946 | 6947 | 653221 和田县 6948 | 6949 | 653222 墨玉县 6950 | 6951 | 653223 皮山县 6952 | 6953 | 653224 洛浦县 6954 | 6955 | 653225 策勒县 6956 | 6957 | 653226 于田县 6958 | 6959 | 653227 民丰县 6960 | 6961 | 654000 伊犁哈萨克自治州 6962 | 6963 | 654002 伊宁市 6964 | 6965 | 654003 奎屯市 6966 | 6967 | 654021 伊宁县 6968 | 6969 | 654022 察布查尔锡伯自治县 6970 | 6971 | 654023 霍城县 6972 | 6973 | 654024 巩留县 6974 | 6975 | 654025 新源县 6976 | 6977 | 654026 昭苏县 6978 | 6979 | 654027 特克斯县 6980 | 6981 | 654028 尼勒克县 6982 | 6983 | 654200 塔城地区 6984 | 6985 | 654201 塔城市 6986 | 6987 | 654202 乌苏市 6988 | 6989 | 654221 额敏县 6990 | 6991 | 654223 沙湾县 6992 | 6993 | 654224 托里县 6994 | 6995 | 654225 裕民县 6996 | 6997 | 654226 和布克赛尔蒙古自治县 6998 | 6999 | 654300 阿勒泰地区 7000 | 7001 | 654301 阿勒泰市 7002 | 7003 | 654321 布尔津县 7004 | 7005 | 654322 富蕴县 7006 | 7007 | 654323 福海县 7008 | 7009 | 654324 哈巴河县 7010 | 7011 | 654325 青河县 7012 | 7013 | 654326 吉木乃县 7014 | 7015 | 659000 自治区直辖县级行政区划 7016 | 7017 | 659001 石河子市 7018 | 7019 | 659002 阿拉尔市 7020 | 7021 | 659003 图木舒克市 7022 | 7023 | 659004 五家渠市 7024 | 7025 | 710000 台湾省 7026 | 7027 | 810000 香港特别行政区 7028 | 7029 | 820000 澳门特别行政区 -------------------------------------------------------------------------------- /main/emailReceive.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import imaplib, email,os,re 3 | import sys 4 | import traceback 5 | 6 | """ 7 | 邮件获取类 8 | """ 9 | 10 | class EmailService(object): 11 | EMAIL_SERVER={ 12 | "QQ":{"SMTP":["smtp.qq.com",465,True],"POP3":["pop.qq.com",995,True],"IMAP":["imap.qq.com",993,True]}, 13 | "GMAIL":{"SMTP":["smtp.gmail.com",465,True],"POP3":["pop.gmail.com",995,True],"IMAP":["imap.gmail.com",993,True]}, 14 | "FOXMAIL":{"SMTP":["SMTP.foxmail.com",465,True],"POP3":["POP3.foxmail.com",995,True],"IMAP":["imap.foxmail.com",993,True]}, 15 | "SINA":{"SMTP":["smtp.sina.com.cn",465,True],"POP3":["pop3.sina.com.cn",995,True],"IMAP":["imap.sina.com",993,True]}, 16 | "163":{"SMTP":["smtp.163.com",465,True],"POP3":["pop.163.com",995,True],"IMAP":["imap.163.com",993,True]}, 17 | "HOTMAIL":{"SMTP":["smtp.live.com",25,False],"POP3":["pop.live.com",995,True],"IMAP":["imap.live.com",993,True]}, 18 | "OUTLOOK":{"SMTP":["smtp-mail.outlook.com",25,False],"POP3":["pop-mail.outlook.com",995,True],"IMAP":["imap-mail.outlook.com",993,True]}, 19 | "AOL":{"SMTP":["smtp.aol.com",25,False],"POP3":["pop.aol.com",110,False],"IMAP":["imap.aol.com",993,True]}, 20 | "YAHOO":{"SMTP":["smtp.mail.yahoo.com",465,True],"POP3":["pop.mail.yahoo.com",995,True],"IMAP":["imap.mail.yahoo.com",993,True]}, 21 | "21CN": {"SMTP": ["smtp.21cn.com", 465, True], "POP3": ["pop.21cn.com", 995, True],"IMAP": ["imap.21cn.com", 143, False]}, 22 | "MAIL": {"SMTP": ["smtp.mail.ru", 465, True], "POP3": ["pop.mail.ru", 995, True],"IMAP": ["imap.mail.ru", 993, True]}, 23 | } 24 | 25 | @staticmethod 26 | def __getEmailServer(emailtype,servertype): 27 | return EmailService.EMAIL_SERVER.get(emailtype.upper()).get(servertype) 28 | 29 | @staticmethod 30 | def getSMTPServer(emailtype): 31 | return EmailService.__getEmailServer(emailtype.upper(),'SMTP') 32 | 33 | @staticmethod 34 | def getPOPServer(emailtype): 35 | return EmailService.__getEmailServer(emailtype.upper(),'POP3') 36 | 37 | @staticmethod 38 | def getIMAPServer(emailtype): 39 | return EmailService.__getEmailServer(emailtype.upper(),'IMAP') 40 | 41 | class EmailReceive(object): 42 | def __init__(self,emailAddress,authorityCode): 43 | self.imap_mail = None 44 | self.__login(emailAddress,authorityCode) 45 | 46 | def __login(self,address,password): 47 | try: 48 | serverInfo=EmailService.getIMAPServer(address.split('@')[-1].split('.')[0]) 49 | if serverInfo[2]: 50 | self.imap_mail = imaplib.IMAP4_SSL(serverInfo[0],serverInfo[1]) 51 | else: 52 | self.imap_mail = imaplib.IMAP4(serverInfo[0], serverInfo[1]) 53 | self.imap_mail.login(address,password) 54 | except Exception as e: 55 | print(e) 56 | 57 | def close(self): 58 | self.imap_mail.close() 59 | self.imap_mail.logout() 60 | 61 | def getEmail(self,keyword=None,onlyUnsee=True,findAll=False,getAttach=False): 62 | result=[] 63 | try: 64 | self.imap_mail.select() 65 | except Exception as e: 66 | print(e) 67 | return result 68 | num_index = 0 69 | for item in self.imap_mail.list()[1]: 70 | box = item.decode().split(' \"/\" ')[-1] 71 | if re.match(r'.*?(Sent|Delete|Trash|Draft).*?',box,re.M|re.I): 72 | continue 73 | try: 74 | if num_index != 0: 75 | self.imap_mail.select(box) 76 | num_index += 1 77 | if onlyUnsee: 78 | try: 79 | state, en = self.imap_mail.search(None, 'UNSEE') 80 | except Exception as e: 81 | state, en = self.imap_mail.search(None, 'ALL') 82 | else: 83 | state, en = self.imap_mail.search(None,'ALL') 84 | for num in en[0].split()[::-1]: 85 | typ, data = self.imap_mail.fetch(num, '(RFC822)') 86 | header = EmailReceive.getMailHeader(data) 87 | print(header) 88 | if header is None: 89 | continue 90 | if keyword is None: 91 | result.append(EmailReceive.getOneMail(data, getAttach)) 92 | else: 93 | for keyItem in keyword: 94 | if keyItem in header[0] or keyItem in header[1] or keyItem in header[2]: 95 | result.append(EmailReceive.getOneMail(data,getAttach)) 96 | if not findAll: 97 | self.close() 98 | return result 99 | except Exception as e: 100 | traceback.print_exc() 101 | print('getEmail',e) 102 | self.close() 103 | return result 104 | 105 | @staticmethod 106 | def getMailHeader(data): 107 | if data is None or data[0] is None or data[0][1] is None: 108 | return None 109 | try: 110 | message = email.message_from_bytes(data[0][1]) 111 | return EmailReceive.__parseHeader(message) 112 | except Exception as e: 113 | print('getMailHeader',e) 114 | return None 115 | 116 | @staticmethod 117 | def getMailBody(data,getAttach=False): 118 | if data is None or data[0] is None or data[0][1] is None: 119 | return None 120 | try: 121 | message = email.message_from_bytes(data[0][1]) 122 | return EmailReceive.__parseBody(message,getAttach) 123 | except Exception as e: 124 | print('getMailBody',e) 125 | return None 126 | 127 | @staticmethod 128 | def getOneMail(data,getAttach=False): 129 | if data is None or data[0] is None or data[0][1] is None: 130 | return None,None 131 | try: 132 | message = email.message_from_bytes(data[0][1]) 133 | header = EmailReceive.__parseHeader(message) 134 | body = EmailReceive.__parseBody(message,getAttach) 135 | return header,body 136 | except Exception as e: 137 | print('getOneMail',e) 138 | return None,None 139 | 140 | @staticmethod 141 | def __parseHeader(message): 142 | """ 解析邮件首部 """ 143 | try: 144 | if not message.get('Subject'): 145 | title='' 146 | else: 147 | title = email.header.decode_header(message.get('Subject')) 148 | if title[0][1] is not None: 149 | encodetype = title[0][1] 150 | if 'unknow' in encodetype: 151 | # encodetype='GBK' 152 | encodetype='utf-8' 153 | title = title[0][0].decode(encodetype) 154 | else: 155 | title = title[0][0] 156 | try: 157 | fromAddr = email.utils.parseaddr(message.get('from'))[1] 158 | except Exception as e: 159 | fromAddr = '' 160 | toAddr = email.utils.parseaddr(message.get('to'))[1] 161 | receiveDate = email.utils.parsedate(message.get('Date')) 162 | receiveDate=str(receiveDate[0])+'-'+str(receiveDate[1]).zfill(2)+'-'+str(receiveDate[2]).zfill(2) 163 | result = (title,fromAddr,toAddr,receiveDate) 164 | return result 165 | except Exception as e: 166 | # traceback.print_exc() 167 | print('__parseHeader',e) 168 | return None 169 | 170 | @staticmethod 171 | def __parseBody(msg,getAttach=False): 172 | context=[] 173 | try: 174 | for par in msg.walk(): 175 | if par.is_multipart(): 176 | continue 177 | patch = par.get_param("name") # 如果是附件,这里就会取出附件的文件名 178 | if patch:# 有附件 179 | print(patch) 180 | else: 181 | try: 182 | context.append(par.get_payload(decode=True).decode('utf-8')) 183 | except Exception as e: 184 | print(e) 185 | context.append(par.get_payload(decode=True).decode('gbk')) 186 | return context 187 | except Exception as e: 188 | print('__parseBody',e) 189 | return None 190 | 191 | 192 | 193 | -------------------------------------------------------------------------------- /main/hex_handle.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import math 3 | import re 4 | 5 | def get_hex_data(path): 6 | with open(path, 'rb') as f: 7 | hexdata = hexdata = f.read().hex() 8 | return hexdata 9 | 10 | def hex2rgb(tmp): 11 | tmp = tmp.replace('#','') 12 | opt = re.findall(r'(.{2})',tmp) 13 | arr = [] 14 | for i in range (0, len(opt)): 15 | arr.append(int(opt[i], 16)) 16 | return arr 17 | 18 | def colour_distance(hex_1, hex_2): 19 | rgb_1 = hex2rgb(hex_1) 20 | rgb_2 = hex2rgb(hex_2) 21 | R_1,G_1,B_1 = rgb_1 22 | R_2,G_2,B_2 = rgb_2 23 | rmean = (R_1 +R_2 ) / 2 24 | R = R_1 - R_2 25 | G = G_1 -G_2 26 | B = B_1 - B_2 27 | rx = 1 - int(math.sqrt((2+rmean/256)*(R**2)+4*(G**2)+(2+(255-rmean)/256)*(B**2)))/764 28 | return rx 29 | 30 | def get_start_t(hexbase,x,y): 31 | return hexbase + ((x+1+y*960)-1)*4*2 32 | 33 | def get_end_t(hexbase,x,y): 34 | return hexbase + (x+1+y*960)*4*2 35 | 36 | def get_hex_str(hex_data,hexbase,x,y): 37 | start_t = get_start_t(hexbase,x,y) 38 | end_t = get_end_t(hexbase,x,y) 39 | target_hex = hex_data[start_t:end_t-2] 40 | return '#%s'%(target_hex) 41 | 42 | def hex_compare(hex_data, item,target): 43 | x = item['dot'][0] 44 | y = item['dot'][1] 45 | if(x < 0): 46 | x = 0 47 | if(x > 959): 48 | x = 959 49 | if(y < 0): 50 | y = 0 51 | if(y > 539): 52 | y = 539 53 | hexbase = 12*2 54 | hex_str = get_hex_str(hex_data,hexbase,x,y) 55 | cp = colour_distance(item['color'],hex_str) 56 | if(cp >= item['confidence']): 57 | return True 58 | else: 59 | return False 60 | 61 | def compare_only(hex_data,x,y,color,sim): 62 | hexbase = 12*2 63 | hex_str = get_hex_str(hex_data,hexbase,x,y) 64 | cp = colour_distance(color,hex_str) 65 | if(cp >= sim): 66 | return True 67 | else: 68 | return False 69 | 70 | def color_compare(path, arr,target): 71 | if(arr and len(arr) > 0): 72 | hex_data = get_hex_data(path) 73 | all_same = True 74 | for i in arr: 75 | same_cam = hex_compare(hex_data, i,target) 76 | if(not same_cam): 77 | all_same = False 78 | return all_same 79 | else: 80 | return False 81 | 82 | def compare_offset(hex_data,area,aim_color,confidence,offset_dot): 83 | for x_p in range(area[0],area[2]): 84 | for y_p in range(area[1],area[3]): 85 | result = compare_only(hex_data,x_p,y_p,aim_color,confidence) 86 | if result: 87 | all_same_judge = True 88 | for item in offset_dot: 89 | ofset_result = compare_only(hex_data,x_p+item["offset"][0],y_p+item["offset"][1],item["color"],confidence) 90 | if not ofset_result: 91 | all_same_judge = False 92 | break 93 | if all_same_judge: 94 | return [x_p,y_p] 95 | return None 96 | 97 | def offset_compare(path,area,aim_color,confidence,offset_dot): 98 | if(offset_dot and len(offset_dot) > 0): 99 | hex_data = get_hex_data(path) 100 | if int(area[0]) > int(area[2]): 101 | trans_val = area[0] 102 | area[0] = area[2] 103 | area[2] = trans_val 104 | if int(area[1]) > int(area[3]): 105 | trans_val = area[1] 106 | area[1] = area[3] 107 | area[3] = trans_val 108 | return compare_offset(hex_data,area,aim_color,confidence,offset_dot) 109 | else: 110 | return None -------------------------------------------------------------------------------- /main/ident_card.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | import datetime 4 | import json 5 | import os 6 | import random 7 | from datetime import date 8 | from datetime import timedelta 9 | import string 10 | 11 | 12 | ARR = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2] 13 | LAST = ('1', '0', 'x', '9', '8', '7', '6', '5', '4', '3', '2') 14 | 15 | PATH = lambda p: os.path.abspath( 16 | os.path.join(os.path.dirname(__file__), p) 17 | ) 18 | districtcode_path = PATH('./districtcode.txt') 19 | d = datetime.datetime.now() 20 | 21 | 22 | def get_random_phonenumber(): 23 | number = random.choice(['133', '151', '187', '170']) + "".join(random.choice("0123456789") for i in range(8)) 24 | return number 25 | 26 | 27 | def intersection_of_path(file_path): 28 | relative_file_path = os.path.normpath(file_path) 29 | relative_list = relative_file_path.split(os.sep) 30 | sys_path_now_list = os.path.dirname(__file__).split(os.sep)[1:] 31 | for i in range(len(sys_path_now_list)): 32 | if (relative_list[0] == sys_path_now_list[i]): 33 | intersection = i 34 | prepose_path = ''.join(['/%s' % y for y in sys_path_now_list[:intersection]]) 35 | return os.path.join(prepose_path, file_path) 36 | 37 | 38 | def _getDistrictCode(): 39 | with open(districtcode_path, "r",encoding="utf-8") as file: 40 | data = file.read() 41 | 42 | district_list = data.split('\n') 43 | code_list = [] 44 | for node in district_list: 45 | # print node 46 | if node[10:11] != ' ': 47 | state = node[10:].strip() 48 | if node[10:11] == ' ' and node[12:13] != ' ': 49 | city = node[12:].strip() 50 | if node[10:11] == ' ' and node[12:13] == ' ': 51 | district = node[14:].strip() 52 | code = node[0:6] 53 | code_list.append( 54 | {"state": state, "city": city, "district": district, "code": code}) 55 | return code_list 56 | 57 | def create_realname_and_id_number(): 58 | real_name = random.choice(['赵','张','孙','刘','徐','王','李','陈','杨','黄','吴','周','徐','孙','邓','曹','彭','曾']) + "".join( 59 | random.choice(['成', '小', '家', '洋', '钱', '广', '利','依','紫','萱','涵','易','忆','之','幻','巧','水','风','安','寒','白','亦','惜','玉','碧','春','怜','雪','听','南','念','蕾','夏']) for i in range(2)) 60 | '''生成身份证号''' 61 | code_list = _getDistrictCode() 62 | id = code_list[random.randint(0, len(code_list))]['code'] # 地区项 63 | id = id + str(random.randint(1960, 1999)) # 年份项 64 | da = date.today() + timedelta(days=random.randint(1, 366)) # 月份和日期项 65 | id = id + da.strftime('%m%d') 66 | id = id + str(random.randint(100, 999)) # ,顺序号简单处理 67 | 68 | i = 0 69 | count = 0 70 | weight = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2] # 权重项 71 | checkcode = {'0': '1', '1': '0', '2': 'X', '3': '9', '4': '8', 72 | '5': '7', '6': '6', '7': '5', '8': '5', '9': '3', '10': '2'} # 校验码映射 73 | for i in range(0, len(id)): 74 | count = count + int(id[i]) * weight[i] 75 | id = id + checkcode[str(count % 11)] # 算出校验码 76 | return real_name, id 77 | 78 | 79 | def generate_bank_card_number(): 80 | bank_card = random.choice(['62122653']) + "".join(random.choice("0123456789") for i in range(11)) 81 | return bank_card 82 | 83 | 84 | def now_time(): 85 | now = datetime.datetime.now() 86 | strdatetime = now.strftime("%Y%m%d%H%M%S") 87 | return strdatetime 88 | 89 | 90 | def string_to_dict(s): 91 | import ast 92 | result = ast.literal_eval(s) 93 | return result 94 | 95 | 96 | def dict_to_string(d): 97 | return json.dumps(d) 98 | 99 | 100 | def gen_random_string(str_len): 101 | return ''.join( 102 | random.choice(string.ascii_letters + string.digits) for _ in range(str_len)) -------------------------------------------------------------------------------- /main/ld_control.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import os 3 | import shutil 4 | import time 5 | from xml.dom.minidom import parseString 6 | import configparser 7 | import traceback 8 | 9 | FILE_FOLDER_PATH = os.path.dirname(os.path.realpath(__file__)) + '\\' 10 | 11 | cf = configparser.ConfigParser() 12 | cf.read(FILE_FOLDER_PATH+"config.ini", encoding='utf-8') 13 | secs = cf.sections() 14 | 15 | dn_ld = None 16 | dn_console = None 17 | dn_share_path = None 18 | 19 | disk_in = ('C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q') 20 | try: 21 | for path_li in disk_in: 22 | if os.path.exists(path_li+':\\ChangZhi\\dnplayer2\\dnconsole.exe'): 23 | dn_console = path_li+':\\ChangZhi\\dnplayer2\\dnconsole.exe ' 24 | dn_ld = path_li+':\\ChangZhi\\dnplayer2\\ld.exe ' 25 | dn_share_path = path_li+':\\ChangZhi\\dnplayer2\\ldshare' 26 | break 27 | if(not dn_ld or not dn_console or not dn_share_path): 28 | raise ValueError('path not exist') 29 | except Exception as e: 30 | print('Exception out of system') 31 | 32 | dn_package_name = cf.get("File-Path", "package_name") 33 | is_column = cf.get("Script-Setting", "IS_COLUMN") 34 | 35 | class DnPlayer(object): 36 | def __init__(self, info: list): 37 | super(DnPlayer, self).__init__() 38 | # 索引,标题,顶层窗口句柄,绑定窗口句柄,是否进入android,进程PID,VBox进程PID 39 | self.index = int(info[0]) 40 | self.name = info[1] 41 | self.top_win_handler = int(info[2]) 42 | self.bind_win_handler = int(info[3]) 43 | self.is_in_android = True if int(info[4]) == 1 else False 44 | self.pid = int(info[5]) 45 | self.vbox_pid = int(info[6]) 46 | 47 | def is_running(self) -> bool: 48 | return self.is_in_android 49 | 50 | def __str__(self): 51 | index = self.index 52 | name = self.name 53 | r = str(self.is_in_android) 54 | twh = self.top_win_handler 55 | bwh = self.bind_win_handler 56 | pid = self.pid 57 | vpid = self.vbox_pid 58 | return "\nindex:%d name:%s top:%08X bind:%08X running:%s pid:%d vbox_pid:%d\n" % ( 59 | index, name, twh, bwh, r, pid, vpid) 60 | 61 | def __repr__(self): 62 | index = self.index 63 | name = self.name 64 | r = str(self.is_in_android) 65 | twh = self.top_win_handler 66 | bwh = self.bind_win_handler 67 | pid = self.pid 68 | vpid = self.vbox_pid 69 | return "\nindex:%d name:%s top:%08X bind:%08X running:%s pid:%d vbox_pid:%d\n" % ( 70 | index, name, twh, bwh, r, pid, vpid) 71 | 72 | class Dnconsole: 73 | console = dn_console 74 | ld = dn_ld 75 | share_path = dn_share_path 76 | 77 | @staticmethod 78 | def get_list(): 79 | cmd = os.popen(Dnconsole.console + 'list2') 80 | text = cmd.read() 81 | cmd.close() 82 | info = text.split('\n') 83 | result = list() 84 | for line in info: 85 | if len(line) > 1: 86 | dnplayer = line.split(',') 87 | result.append(DnPlayer(dnplayer)) 88 | return result 89 | 90 | @staticmethod 91 | def list_running() -> list: 92 | result = list() 93 | all = Dnconsole.get_list() 94 | for dn in all: 95 | if dn.is_running() is True: 96 | result.append(dn) 97 | return result 98 | 99 | @staticmethod 100 | def is_running(index: int) -> bool: 101 | all = Dnconsole.get_list() 102 | if index >= len(all): 103 | raise IndexError('%d is not exist' % index) 104 | return all[index].is_running() 105 | 106 | @staticmethod 107 | def dnld(index: int, command: str, silence: bool = True): 108 | cmd = Dnconsole.ld + '-s %d %s' % (index, command) 109 | if silence: 110 | os.system(cmd) 111 | return '' 112 | process = os.popen(cmd) 113 | result = process.read() 114 | process.close() 115 | return result 116 | 117 | @staticmethod 118 | def adb(index: int, command: str, silence: bool = False) -> str: 119 | cmd = Dnconsole.console + \ 120 | 'adb --index %d --command "%s"' % (index, command) 121 | if silence: 122 | os.system(cmd) 123 | return '' 124 | process = os.popen(cmd) 125 | result = process.read() 126 | process.close() 127 | return result 128 | 129 | @staticmethod 130 | def install(index: int,dn_apk_path): 131 | if not os.path.exists(dn_apk_path): 132 | return 133 | try: 134 | dir_path, apk_name = dn_apk_path.rsplit("/", 1) 135 | path = Dnconsole.share_path + '/' + apk_name 136 | if not os.path.exists(path): 137 | shutil.copy(path, dn_apk_path) 138 | time.sleep(1) 139 | Dnconsole.dnld( 140 | index, 'pm install /sdcard/Pictures/%s' % (apk_name)) 141 | while True: 142 | time.sleep(1) 143 | if Dnconsole.has_install(index): 144 | break 145 | return True 146 | except Exception as e: 147 | traceback.print_exc() 148 | print(e) 149 | return False 150 | 151 | @staticmethod 152 | def uninstall(index: int): 153 | if not Dnconsole.has_install(index): 154 | return 155 | cmd = Dnconsole.console + \ 156 | 'uninstallapp --index %d --packagename %s' % ( 157 | index, dn_package_name) 158 | process = os.popen(cmd) 159 | result = process.read() 160 | process.close() 161 | return result 162 | 163 | @staticmethod 164 | def invokeapp(index: int): 165 | if not Dnconsole.has_install(index): 166 | return 167 | cmd = Dnconsole.console + \ 168 | 'runapp --index %d --packagename %s' % (index, dn_package_name) 169 | process = os.popen(cmd) 170 | result = process.read() 171 | process.close() 172 | # print(result) 173 | return result 174 | 175 | @staticmethod 176 | def stopapp(index: int): 177 | if not Dnconsole.has_install(index): 178 | return 179 | cmd = Dnconsole.console + \ 180 | 'killapp --index %d --packagename %s' % (index, dn_package_name) 181 | process = os.popen(cmd) 182 | result = process.read() 183 | process.close() 184 | return result 185 | 186 | @staticmethod 187 | def input_text(index: int, text: str): 188 | cmd = Dnconsole.console + \ 189 | 'action --index %d --key call.input --value %s' % (index, text) 190 | process = os.popen(cmd) 191 | result = process.read() 192 | process.close() 193 | return result 194 | 195 | @staticmethod 196 | def get_package_list(index: int) -> list: 197 | result = list() 198 | text = Dnconsole.dnld(index, 'pm list packages', silence=False) 199 | info = text.split('\n') 200 | for i in info: 201 | if len(i) > 1: 202 | result.append(i[8:]) 203 | return result 204 | 205 | @staticmethod 206 | def has_install(index: int): 207 | if Dnconsole.is_running(index) is False: 208 | return False 209 | return dn_package_name in Dnconsole.get_package_list(index) 210 | 211 | @staticmethod 212 | def launch(index: int): 213 | cmd = Dnconsole.console + 'launch --index ' + str(index) 214 | process = os.popen(cmd) 215 | result = process.read() 216 | process.close() 217 | return result 218 | 219 | @staticmethod 220 | def quit(index: int): 221 | cmd = Dnconsole.console + 'quit --index ' + str(index) 222 | process = os.popen(cmd) 223 | result = process.read() 224 | process.close() 225 | return result 226 | 227 | @staticmethod 228 | def set_screen_size(index: int): 229 | cmd = Dnconsole.console + 'modify --index %d --resolution 1080,1920,480' % index 230 | process = os.popen(cmd) 231 | result = process.read() 232 | process.close() 233 | return result 234 | 235 | @staticmethod 236 | def touch(index: int, x: int, y: int, delay: int = 0): 237 | if is_column == '1': 238 | cx = x 239 | x = y 240 | y = cx 241 | x = 540 - x 242 | if delay == 0: 243 | print(x, y) 244 | Dnconsole.dnld(index, 'input tap %d %d' % (x, y)) 245 | else: 246 | Dnconsole.dnld(index, 'input swipe %d %d %d %d %d' % 247 | (x, y, x, y, delay)) 248 | 249 | @staticmethod 250 | def swipe(index, coordinate_leftup: tuple, coordinate_rightdown: tuple, delay: int = 0): 251 | x0 = coordinate_leftup[0] 252 | y0 = coordinate_leftup[1] 253 | x1 = coordinate_rightdown[0] 254 | y1 = coordinate_rightdown[1] 255 | if is_column == '1': 256 | c1 = x0 257 | x0 = y0 258 | x0 = 540 - x0 259 | y0 = c1 260 | c2 = x1 261 | x1 = y1 262 | x1 = 540 - x1 263 | y1 = c2 264 | if delay == 0: 265 | Dnconsole.dnld(index, 'input swipe %d %d %d %d' % (x0, y0, x1, y1)) 266 | else: 267 | Dnconsole.dnld(index, 'input swipe %d %d %d %d %d' % 268 | (x0, y0, x1, y1, delay)) 269 | 270 | @staticmethod 271 | def copy(name: str, index: int = 0): 272 | cmd = Dnconsole.console + 'copy --name %s --from %d' % (name, index) 273 | process = os.popen(cmd) 274 | result = process.read() 275 | process.close() 276 | return result 277 | 278 | @staticmethod 279 | def add(name: str): 280 | cmd = Dnconsole.console + 'add --name %s' % name 281 | process = os.popen(cmd) 282 | result = process.read() 283 | process.close() 284 | return result 285 | 286 | @staticmethod 287 | def auto_rate(index: int, auto_rate: bool = False): 288 | rate = 1 if auto_rate else 0 289 | cmd = Dnconsole.console + \ 290 | 'modify --index %d --autorotate %d' % (index, rate) 291 | process = os.popen(cmd) 292 | result = process.read() 293 | process.close() 294 | return result 295 | 296 | @staticmethod 297 | def change_device_data(index: int): 298 | # 改变设备信息 299 | cmd = Dnconsole.console + \ 300 | 'modify --index %d --imei auto --imsi auto --simserial auto --androidid auto --mac auto' % index 301 | process = os.popen(cmd) 302 | result = process.read() 303 | process.close() 304 | return result 305 | 306 | @staticmethod 307 | def reboot_device(index: int): 308 | cmd = Dnconsole.console + \ 309 | 'reboot --index %d' % index 310 | process = os.popen(cmd) 311 | result = process.read() 312 | process.close() 313 | return result 314 | 315 | @staticmethod 316 | def change_cpu_count(index: int, number: int): 317 | cmd = Dnconsole.console + \ 318 | 'modify --index %d --cpu %d' % (index, number) 319 | process = os.popen(cmd) 320 | result = process.read() 321 | process.close() 322 | return result 323 | 324 | @staticmethod 325 | def get_activity_name(index: int): 326 | text = Dnconsole.dnld( 327 | index, '"dumpsys activity top | grep ACTIVITY"', False) 328 | text = text.split(' ') 329 | for i, s in enumerate(text): 330 | if len(s) == 0: 331 | continue 332 | if s == 'ACTIVITY': 333 | return text[i + 1] 334 | return '' 335 | 336 | @staticmethod 337 | def wait_activity(index: int, activity: str, timeout: int) -> bool: 338 | for i in range(timeout): 339 | if Dnconsole.get_activity_name(index) == activity: 340 | return True 341 | time.sleep(1) 342 | return False 343 | 344 | @staticmethod 345 | def screen_snap(index: int, img_name: str = 'screen_snap')->str: 346 | try: 347 | Dnconsole.dnld(index, 'mkdir /sdcard/Pictures/%s' % (index)) 348 | except Exception as e: 349 | pass 350 | Dnconsole.dnld( 351 | index, 'screencap -p /sdcard/Pictures/%s/%s.png' % (index, img_name)) 352 | time.sleep(1) 353 | return Dnconsole.share_path + '/'+str(index)+'/'+img_name+'.png' 354 | 355 | @staticmethod 356 | def key_code_event(index: int, key_num): 357 | Dnconsole.dnld(index, 'input keyevent %s' % (key_num)) 358 | 359 | @staticmethod 360 | def copy_file(index: int, old_path, new_path): 361 | Dnconsole.dnld(index, 'cp %s %s' % (old_path, new_path)) 362 | 363 | @staticmethod 364 | def del_file_libs(index: int, file_folder): 365 | Dnconsole.dnld(index, 'rm -r %s' % (file_folder)) 366 | 367 | @staticmethod 368 | def clear_app(index: int): 369 | if not Dnconsole.has_install(index): 370 | return 371 | try: 372 | Dnconsole.dnld(index, 'pm clear %s' % (dn_package_name)) 373 | time.sleep(2) 374 | return True 375 | except Exception as e: 376 | traceback.print_exc() 377 | print(e) 378 | return False 379 | -------------------------------------------------------------------------------- /main/main.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import os 3 | from main_run import MainThread 4 | from pynput import mouse, keyboard 5 | from v_script import VScript, get_running_emu 6 | import requests 7 | from urllib.parse import urlencode 8 | import threading 9 | import time 10 | import re 11 | import configparser 12 | import shutil 13 | from urllib.request import urlretrieve 14 | 15 | cf = configparser.ConfigParser() 16 | FILE_FOLDER_PATH = os.path.dirname(os.path.realpath(__file__)) + '\\' 17 | cf.read(FILE_FOLDER_PATH+"config.ini",encoding='utf-8') 18 | IS_DEV = int(cf.get("Script-Setting", "IS_DEV")) 19 | IP_NAME = cf.get("Script-Setting", "IP_NAME") 20 | 21 | emu_module_list = {} 22 | 23 | def on_press(key): 24 | if(key == keyboard.Key.esc): 25 | os._exit(0) 26 | if(IS_DEV == 1 and key == keyboard.Key.f2): 27 | try: 28 | target_emu_index = input('please input emulator index:') 29 | new_dir_path = FILE_FOLDER_PATH + "nxlog" 30 | if not os.path.exists(new_dir_path): 31 | os.makedirs(new_dir_path) 32 | target_context = emu_module_list[str(target_emu_index)] 33 | last_target = target_context._target 34 | last_module = target_context.get_run_module() 35 | now_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) 36 | with open(FILE_FOLDER_PATH + "nxlog/log.txt",'a+') as f: 37 | f.write(now_time+' --- module:'+str(last_module)+' --- emulator_index:'+str(last_target)+' \n') 38 | pc_snap_path = target_context.img_push() 39 | shutil.copy(pc_snap_path, FILE_FOLDER_PATH + "nxlog/snapLog.png") 40 | print('log记录成功') 41 | except Exception as e: 42 | print(e) 43 | 44 | listener = keyboard.Listener(on_press=on_press) 45 | listener.start() 46 | 47 | 48 | class MixTread(MainThread): 49 | 50 | def __init__(self, context): 51 | return super().__init__(context) 52 | 53 | def mx_get_account(self): 54 | return 55 | 56 | def mx_upload_account(self, filePath): 57 | return 58 | 59 | def mx_push_account(self,postdata): 60 | return 61 | 62 | def change_config(self,basePath): 63 | return 64 | 65 | # 初始化应用 66 | def set_account(self): 67 | return True 68 | 69 | def round_over(self): 70 | return 71 | 72 | def round_fail(self): 73 | return 74 | 75 | if __name__ == "__main__": 76 | emu_list = get_running_emu() 77 | for emu_item in emu_list: 78 | context = VScript(emu_item.index) 79 | t_line = MixTread(context) 80 | emu_module_list[str(emu_item.index)] = context 81 | t_line.start() -------------------------------------------------------------------------------- /main/main.spec: -------------------------------------------------------------------------------- 1 | # -*- mode: python -*- 2 | 3 | block_cipher = None 4 | 5 | 6 | a = Analysis(['main.py','main_run.py','v_script.py','ld_control.py','ident_card.py','hex_handle.py','emailReceive.py'], 7 | pathex=['D:\\main'], 8 | binaries=[], 9 | datas=[], 10 | hiddenimports=[], 11 | hookspath=[], 12 | runtime_hooks=[], 13 | excludes=[], 14 | win_no_prefer_redirects=False, 15 | win_private_assemblies=False, 16 | cipher=block_cipher, 17 | noarchive=False) 18 | pyz = PYZ(a.pure, a.zipped_data, 19 | cipher=block_cipher) 20 | exe = EXE(pyz, 21 | a.scripts, 22 | [], 23 | exclude_binaries=True, 24 | name='main', 25 | debug=False, 26 | bootloader_ignore_signals=False, 27 | strip=False, 28 | upx=True, 29 | console=True ) 30 | coll = COLLECT(exe, 31 | a.binaries, 32 | a.zipfiles, 33 | a.datas, 34 | strip=False, 35 | upx=True, 36 | name='main') 37 | -------------------------------------------------------------------------------- /main/main_run.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import sys 3 | import time 4 | import os 5 | import uuid 6 | from threading import Thread 7 | 8 | sys.path.append('../') 9 | 10 | from v_script import VScript,get_running_emu 11 | import importlib 12 | import traceback 13 | import json 14 | import random 15 | import configparser 16 | 17 | cf = configparser.ConfigParser() 18 | FILE_FOLDER_PATH = os.path.dirname(os.path.realpath(__file__)) + '\\' 19 | cf.read(FILE_FOLDER_PATH+"config.ini",encoding='utf-8') 20 | RUN_SCRIPT = cf.get("Script-Setting", "RUN_SCRIPT") 21 | ACCOUNT_TYPE = int(cf.get("Script-Setting", "ACCOUNT_TYPE")) 22 | IS_DEV = int(cf.get("Script-Setting", "IS_DEV")) 23 | REPEAT_ERROR = int(cf.get("Script-Setting", "REPEAT_ERROR")) 24 | EMPTY_ERROR = int(cf.get("Script-Setting", "EMPTY_ERROR")) 25 | 26 | path = 'script.'+ RUN_SCRIPT +'.ScriptFunction' 27 | 28 | model_path, class_name = path.rsplit(".", 1) 29 | model = importlib.import_module(model_path) 30 | sf = getattr(model, class_name)() # 反射并实例化 31 | 32 | RES_PATH = FILE_FOLDER_PATH + 'script\\' +RUN_SCRIPT+'\\' 33 | 34 | class MainThread(Thread): 35 | 36 | context = None 37 | 38 | account = '' 39 | password = '' 40 | 41 | MAX_RUN_ROUND = 8 42 | max_count_restart = 0 43 | 44 | mistack_none_count = 0 45 | mistack_repeat_count = 0 46 | 47 | _match_success = False 48 | _repeat_index = 0 49 | _is_closed_app = False 50 | 51 | def __init__(self,context): 52 | Thread.__init__(self) 53 | self.context = context 54 | 55 | def _get_files_account(self,path): 56 | file_count=0 57 | for dirpath, dirnames, filenames in os.walk(path): 58 | for item in filenames: 59 | file_count = file_count+1 60 | return file_count 61 | 62 | def _json_load(self,path): 63 | with open(path,encoding='utf-8') as json_file: 64 | data = json.load(json_file) 65 | return data 66 | 67 | # 空匹配异常处理 68 | def mistack_handle_none(self,event=None): 69 | if EMPTY_ERROR == 0: 70 | return 71 | if(event == 'clean'): 72 | self.mistack_none_count = 0 73 | else: 74 | self.mistack_none_count += 1 75 | if(self.mistack_none_count > EMPTY_ERROR): 76 | self.mistack_none_count = 0 77 | self.reopen_app(self.context) 78 | 79 | # 循环匹配异常处理 80 | def mistack_handle_repeat(self,module_index): 81 | if REPEAT_ERROR == 0: 82 | return 83 | if(module_index != self._repeat_index): 84 | self.mistack_repeat_count = 0 85 | else: 86 | self.mistack_repeat_count += 1 87 | if(self.mistack_repeat_count > REPEAT_ERROR): 88 | self.mistack_repeat_count = 0 89 | self.reopen_app(self.context) 90 | self._repeat_index = module_index 91 | 92 | def _match_reset(self,i): 93 | self.mistack_handle_none('clean') 94 | self.mistack_handle_repeat(i) 95 | self._match_success = True 96 | 97 | def _restart_check(self): 98 | if(self.max_count_restart > self.MAX_RUN_ROUND): 99 | context = self.context 100 | self.max_count_restart = 0 101 | context.change_imei_and_restart() 102 | context.sleep(3000) 103 | return True 104 | return 105 | 106 | # overwrite 107 | def set_account(self): 108 | print('please rewrie this interface') 109 | 110 | # overwrite 111 | def round_over(self): 112 | print('please rewrie this interface') 113 | 114 | # overwrite 115 | def round_fail(self): 116 | print('please rewrie this interface') 117 | 118 | def run(self): 119 | context = self.context 120 | while True: 121 | try: 122 | if(self._restart_check()): 123 | continue 124 | runFlag = False 125 | if IS_DEV == 1: 126 | runFlag = True 127 | else: 128 | self.init_app_state(self.context) 129 | runFlag = self.set_account() 130 | if runFlag: 131 | self._is_closed_app = False 132 | self.max_count_restart += 1 133 | context.sleep(1000) 134 | while True: 135 | context.loop_snap_dump() 136 | running_path = RES_PATH + str(context.get_run_module())+'\\' 137 | # 获取检测模块内的检测数量 138 | if os.path.exists(running_path): 139 | acc_num = self._get_files_account(running_path) 140 | self._match_success = False 141 | index_tag = 0 142 | for i in range(int(acc_num/2)): 143 | # 先获取配置文件 根据配置去匹配 144 | check_json = running_path + str(index_tag) + '.json' 145 | check_png = running_path + str(index_tag) + '.png' 146 | 147 | if not os.path.exists(check_json): 148 | exist_json_flag = True 149 | while exist_json_flag: 150 | index_tag += 1 151 | check_json = running_path + str(index_tag) + '.json' 152 | check_png = running_path + str(index_tag) + '.png' 153 | if os.path.exists(check_json): 154 | exist_json_flag = False 155 | break 156 | 157 | index_tag += 1 158 | 159 | obj = self._json_load(check_json) 160 | 161 | if not obj['pointJudge'] or not len(obj['pointJudge']) > 0: 162 | print('this obj was no pointJudge!!!') 163 | continue 164 | 165 | judge_fn_list = obj['pointJudge'] 166 | if int(obj['handle']['type']) == 3: 167 | result_point = context.muti_color_judge(judge_fn_list) 168 | if result_point: 169 | handle_event = obj["handle"]["event"] 170 | if len(handle_event) == 0: 171 | context.click(int(result_point[0]),int(result_point[1]),80,40) 172 | else: 173 | for ev_fn in handle_event: 174 | getattr(sf,ev_fn)(context,result_point) 175 | 176 | # 如果是匹配到的则break 重新循环当前模块 177 | self._match_reset(i) 178 | break 179 | else: 180 | list_center_point = obj['pointJudge'][0]['dot'] 181 | if context.point_judge(judge_fn_list): 182 | handle_type = obj["handle"]["type"] 183 | handle_event = obj["handle"]["event"] 184 | # 0 1 2 185 | if(int(handle_type) == 0): 186 | if list_center_point: 187 | context.click(list_center_point[0],list_center_point[1],80,40) 188 | elif(int(handle_type) == 1): 189 | for ev in handle_event: 190 | if type(ev) == list: 191 | if len(ev) == 2: 192 | context.click(int(ev[0]),int(ev[1]),80,40) 193 | else: 194 | context.swipe(int(ev[0]),int(ev[1]),int(ev[2]),int(ev[3]),180,40) 195 | else: 196 | if ev == 'next': 197 | context.next_module() 198 | else: 199 | context.sleep(int(ev)) 200 | elif(int(handle_type) == 2): 201 | for ev_fn in handle_event: 202 | getattr(sf,ev_fn)(context) 203 | 204 | # 如果是匹配到的则break 重新循环当前模块 205 | self._match_reset(i) 206 | break 207 | 208 | # 该运行的模块内全部无法匹配时执行的默认行为 209 | if not self._match_success: 210 | text_fn_file = running_path + 'default.txt' 211 | if os.path.exists(text_fn_file): 212 | with open(text_fn_file, 'r',encoding='utf-8') as file_obj: 213 | script_line = file_obj.readlines() 214 | for text_fn in script_line: 215 | exec(text_fn,{'context':context}) 216 | self.mistack_handle_none() 217 | if(self._is_closed_app): 218 | break 219 | else: 220 | if IS_DEV != 1: 221 | self.round_over() 222 | print('next account being run') 223 | context.key_code_press(187) 224 | context.sleep(2000) 225 | context.swipe(564,453,213,455,180,40) 226 | context.sleep(2000) 227 | # 返回主页 228 | context.key_code_press(3) 229 | context.sleep(2000) 230 | break 231 | 232 | # 没有模块时重置回首个模块 233 | context.set_run_module(0) 234 | else: 235 | print('sleep 10s to get account again') 236 | time.sleep(10) 237 | except Exception as e: 238 | traceback.print_exc() 239 | print(e) 240 | 241 | def init_app_state(self,context): 242 | context.key_code_press(187) 243 | context.sleep(2000) 244 | context.swipe(564,453,213,455,180,40) 245 | context.sleep(2000) 246 | # 返回主页 247 | context.key_code_press(3) 248 | context.sleep(2000) 249 | 250 | def reopen_app(self,context): 251 | print("Reopen app and restart script !") 252 | if IS_DEV != 1: 253 | self.round_fail() 254 | # 打开应用清除当前 255 | context.key_code_press(187) 256 | context.sleep(2000) 257 | context.swipe(564,453,213,455,180,40) 258 | context.sleep(2000) 259 | context.key_code_press(3) 260 | context.sleep(2000) 261 | context.set_run_module(999) 262 | self._is_closed_app = True 263 | -------------------------------------------------------------------------------- /main/names.txt: -------------------------------------------------------------------------------- 1 | 札幌 2 | 中央区 3 | 北区 4 | 東区 5 | 南区 6 | 西区 7 | 白石 8 | 豊平 9 | 厚別 10 | 手稲 11 | 清田 12 | 函館 13 | 小樽 14 | 旭川 15 | 室蘭 16 | 釧路 17 | 帯広 18 | 北見 19 | 夕張 20 | 岩見沢 21 | 網走 22 | 留萌 23 | 苫小牧 24 | 稚内 25 | 美唄 26 | 芦別 27 | 江別 28 | 赤平 29 | 紋別 30 | 士別 31 | 名寄 32 | 三笠 33 | 根室 34 | 千歳 35 | 滝川 36 | 砂川 37 | 歌志内 38 | 深川 39 | 富良野 40 | 登別 41 | 恵庭 42 | 伊達 43 | 北広島 44 | 石狩 45 | 北斗 46 | 当別 47 | 新篠津 48 | 松前 49 | 福島 50 | 上磯 51 | 知内 52 | 木古内 53 | 亀田 54 | 七飯 55 | 茅部 56 | 鹿部 57 | 森 58 | 二海 59 | 八雲 60 | 山越 61 | 長万部 62 | 檜山 63 | 江差 64 | 上ノ国 65 | 厚沢部 66 | 爾志 67 | 乙部 68 | 奥尻 69 | 瀬棚 70 | 今金 71 | 久遠 72 | せたな 73 | 島牧 74 | 寿都 75 | 黒松内 76 | 磯谷 77 | 蘭越 78 | 虻田 79 | ニセコ 80 | 真狩 81 | 留寿都 82 | 喜茂別 83 | 京極 84 | 倶知安 85 | 岩内 86 | 共和 87 | 古宇 88 | 泊 89 | 神恵内 90 | 積丹 91 | 古平 92 | 余市 93 | 仁木 94 | 赤井川 95 | 空知 96 | 南幌 97 | 奈井江 98 | 上砂川 99 | 由仁 100 | 長沼 101 | 栗山 102 | 樺戸 103 | 月形 104 | 浦臼 105 | 新十津川 106 | 雨竜 107 | 妹背牛 108 | 秩父別 109 | 北竜 110 | 沼田 111 | 幌加内 112 | 上川 113 | 鷹栖 114 | 東神楽 115 | 当麻 116 | 比布 117 | 愛別 118 | 東川 119 | 美瑛 120 | 上富良野 121 | 中富良野 122 | 南富良野 123 | 勇払 124 | 占冠 125 | 和寒 126 | 剣淵 127 | 下川 128 | 中川 129 | 美深 130 | 音威子府 131 | 増毛 132 | 小平 133 | 苫前 134 | 羽幌 135 | 初山別 136 | 天塩 137 | 遠別 138 | 幌延 139 | 宗谷 140 | 猿払 141 | 枝幸 142 | 浜頓別 143 | 中頓別 144 | 豊富 145 | 礼文 146 | 利尻 147 | 利尻富士 148 | 美幌 149 | 津別 150 | 斜里 151 | 清里 152 | 小清水 153 | 常呂 154 | 訓子府 155 | 置戸 156 | 佐呂間 157 | 遠軽 158 | 上湧別 159 | 湧別 160 | 滝上 161 | 興部 162 | 西興部 163 | 雄武 164 | 大空 165 | 豊浦 166 | 有珠 167 | 壮瞥 168 | 白老 169 | 厚真 170 | 洞爺湖 171 | 安平 172 | むかわ 173 | 沙流 174 | 全高 175 | 平取 176 | 新冠 177 | 浦河 178 | 様似 179 | 幌泉 180 | えりも 181 | 新ひだか 182 | 河東 183 | 音更 184 | 士幌 185 | 上士幌 186 | 鹿追 187 | 新得 188 | 清水 189 | 河西 190 | 芽室 191 | 中札内 192 | 更別 193 | 広尾 194 | 大樹 195 | 幕別 196 | 池田 197 | 豊頃 198 | 本別 199 | 足寄 200 | 陸別 201 | 十勝 202 | 浦幌 203 | 厚岸 204 | 浜中 205 | 川上 206 | 標茶 207 | 弟子屈 208 | 阿寒 209 | 鶴居 210 | 白糠 211 | 野付 212 | 別海 213 | 標津 214 | 中標津 215 | 目梨 216 | 羅臼 217 | 青森 218 | 弘前 219 | 八戸 220 | 黒石 221 | 五所川原 222 | 十和田 223 | 三沢 224 | むつ 225 | つがる 226 | 平川 227 | 東津軽 228 | 平内 229 | 今別 230 | 蓬田 231 | 外ヶ浜 232 | 西津軽 233 | 鰺ヶ沢 234 | 深浦 235 | 中津軽 236 | 西目屋 237 | 南津軽 238 | 藤崎 239 | 大鰐 240 | 田舎館 241 | 北津軽 242 | 板柳 243 | 鶴田 244 | 中泊 245 | 上北 246 | 野辺地 247 | 七戸 248 | 六戸 249 | 横浜 250 | 東北 251 | 六ヶ所 252 | おいらせ 253 | 下北 254 | 大間 255 | 東通 256 | 風間浦 257 | 佐井 258 | 三戸 259 | 五戸 260 | 田子 261 | 南部 262 | 階上 263 | 新郷 264 | 盛岡 265 | 宮古 266 | 大船渡 267 | 花巻 268 | 北上 269 | 久慈 270 | 遠野 271 | 一関 272 | 陸前高田 273 | 釜石 274 | 二戸 275 | 八幡平 276 | 奥州 277 | 岩手 278 | 雫石 279 | 葛巻 280 | 滝沢 281 | 紫波 282 | 矢巾 283 | 和賀 284 | 西和賀 285 | 胆沢 286 | 金ケ崎 287 | 西磐井 288 | 平泉 289 | 東磐井 290 | 藤沢 291 | 気仙 292 | 住田 293 | 上閉伊 294 | 大槌 295 | 下閉伊 296 | 山田 297 | 岩泉 298 | 田野畑 299 | 普代 300 | 川井 301 | 九戸 302 | 軽米 303 | 野田 304 | 洋野 305 | 一戸 306 | 仙台市 307 | 青葉 308 | 宮城野 309 | 若林 310 | 太白 311 | 泉 312 | 石巻 313 | 塩竈 314 | 気仙沼 315 | 名取 316 | 角田 317 | 多賀城 318 | 岩沼 319 | 登米 320 | 栗原 321 | 東松島 322 | 大崎 323 | 刈田 324 | 蔵王 325 | 七ケ宿 326 | 柴田 327 | 大河原 328 | 村田 329 | 川崎 330 | 伊具 331 | 丸森 332 | 亘理 333 | 山元 334 | 宮城 335 | 松島 336 | 七ヶ浜 337 | 利府 338 | 黒川 339 | 大和 340 | 大郷 341 | 富谷 342 | 大衡 343 | 加美 344 | 色麻 345 | 遠田 346 | 涌谷 347 | 美里 348 | 牡鹿 349 | 女川 350 | 本吉 351 | 南三陸 352 | 秋田 353 | 能代 354 | 横手 355 | 大館 356 | 男鹿 357 | 湯沢 358 | 鹿角 359 | 由利本荘 360 | 潟上 361 | 大仙 362 | 北秋田 363 | にかほ 364 | 仙北 365 | 小坂 366 | 上小阿仁 367 | 山本 368 | 藤里 369 | 三種 370 | 八峰 371 | 南秋田 372 | 五城目 373 | 八郎潟 374 | 井川 375 | 大潟 376 | 美郷 377 | 雄勝 378 | 羽後 379 | 東成瀬 380 | 山形 381 | 米沢 382 | 鶴岡 383 | 酒田 384 | 新庄 385 | 寒河江 386 | 上山 387 | 村山 388 | 長井 389 | 天童 390 | 東根 391 | 尾花沢 392 | 南陽 393 | 東村山 394 | 山辺 395 | 中山 396 | 西村山 397 | 河北 398 | 西川 399 | 朝全 400 | 大江 401 | 北村山 402 | 大石田 403 | 最上 404 | 金山 405 | 舟形 406 | 真室川 407 | 大蔵 408 | 鮭川 409 | 戸沢 410 | 東置賜 411 | 高畠 412 | 川西 413 | 西置賜 414 | 小国 415 | 白鷹 416 | 飯豊 417 | 東田川 418 | 三川 419 | 庄内 420 | 飽海 421 | 遊佐 422 | 会津若松 423 | 郡山 424 | いわき 425 | 白河 426 | 須賀川 427 | 喜多方 428 | 相馬 429 | 二本松 430 | 田 431 | 南相馬 432 | 本宮 433 | 桑折 434 | 国見 435 | 川俣 436 | 安達 437 | 大玉 438 | 岩瀬 439 | 鏡石 440 | 天栄 441 | 南会津 442 | 下郷 443 | 檜枝岐 444 | 只見 445 | 耶麻 446 | 北塩原 447 | 西会津 448 | 磐梯 449 | 猪苗代 450 | 河沼 451 | 会津坂下 452 | 湯川 453 | 柳津 454 | 大沼 455 | 三島 456 | 昭和 457 | 会津美里 458 | 西白河 459 | 西郷 460 | 泉崎 461 | 中島 462 | 矢吹 463 | 東白川 464 | 棚倉 465 | 矢祭 466 | 塙 467 | 鮫川 468 | 石川 469 | 玉川 470 | 平田 471 | 浅川 472 | 古殿 473 | 田村 474 | 三春 475 | 小野 476 | 双葉 477 | 広野 478 | 楢葉 479 | 富岡 480 | 川内 481 | 大熊 482 | 浪江 483 | 葛尾 484 | 新地 485 | 飯舘 486 | 水戸 487 | 全立 488 | 土浦 489 | 古河 490 | 石岡 491 | 結城 492 | 龍ケ崎 493 | 下妻 494 | 常総 495 | 常陸太田 496 | 高萩 497 | 北茨城 498 | 笠間 499 | 取手 500 | 牛久 501 | つくば 502 | ひたちな 503 | 鹿嶋 504 | 潮来 505 | 守谷 506 | 常陸大宮 507 | 那珂 508 | 筑西 509 | 坂東 510 | 稲敷 511 | 桜川 512 | 神栖 513 | 行方 514 | 鉾田 515 | 小美玉 516 | 東茨城 517 | 茨城 518 | 大洗 519 | 城里 520 | 東海 521 | 大子 522 | 美浦 523 | 阿見 524 | 河内 525 | 八千代 526 | 猿島 527 | 五霞 528 | 境 529 | 北相馬 530 | 利根 531 | 宇都宮 532 | 足利 533 | 栃木 534 | 佐野 535 | 鹿沼 536 | 全光 537 | 小山 538 | 真岡 539 | 大田原 540 | 矢板 541 | 那須塩原 542 | さくら 543 | 那須烏山 544 | 下野 545 | 上三川 546 | 上都賀 547 | 西方 548 | 芳賀 549 | 益子 550 | 茂木 551 | 市貝 552 | 下都賀 553 | 壬生 554 | 野木 555 | 大平 556 | 藤岡 557 | 岩舟 558 | 都賀 559 | 塩谷 560 | 高根沢 561 | 那須 562 | 那珂川 563 | 前橋 564 | 高崎 565 | 桐生 566 | 伊勢崎 567 | 太田 568 | 館林 569 | 渋川 570 | 安中 571 | みどり 572 | 北群馬 573 | 榛東 574 | 吉岡 575 | 多野 576 | 上野 577 | 神流 578 | 甘楽 579 | 下仁田 580 | 南牧 581 | 吾妻 582 | 中之条 583 | 長野原 584 | 嬬恋 585 | 草津 586 | 六合 587 | 高山 588 | 東吾妻 589 | 片品 590 | 川場 591 | みなかみ 592 | 佐波 593 | 玉村 594 | 邑楽 595 | 板倉 596 | 明和 597 | 千代田 598 | 大泉 599 | さいたま 600 | 大宮 601 | 見沼 602 | 桜区 603 | 浦和 604 | 緑 605 | 岩槻 606 | 川越 607 | 熊谷 608 | 川口 609 | 行田 610 | 秩父 611 | 所沢 612 | 飯能 613 | 加須 614 | 本庄 615 | 東松山 616 | 春全部 617 | 狭山 618 | 羽生 619 | 鴻巣 620 | 深谷 621 | 上尾 622 | 草加 623 | 越谷 624 | 蕨 625 | 戸田 626 | 入間 627 | 鳩ヶ谷 628 | 朝霞 629 | 志木 630 | 和光 631 | 新座 632 | 桶川 633 | 久喜 634 | 北本 635 | 八潮 636 | 富士見 637 | 三郷 638 | 蓮田 639 | 坂戸 640 | 幸手 641 | 鶴ヶ島 642 | 吉川 643 | ふじみ野 644 | 北足立 645 | 伊奈 646 | 三芳 647 | 毛呂山 648 | 越生 649 | 比企 650 | 滑川 651 | 嵐山 652 | 小川 653 | 川島 654 | 吉見 655 | 鳩山 656 | ときがわ 657 | 横瀬 658 | 皆野 659 | 長瀞 660 | 小鹿野 661 | 東秩父 662 | 児玉 663 | 神川 664 | 上里 665 | 大里 666 | 寄居 667 | 北埼玉 668 | 騎西 669 | 北川辺 670 | 大利根 671 | 南埼玉 672 | 宮代 673 | 白岡 674 | 菖蒲 675 | 北葛飾 676 | 栗橋 677 | 鷲宮 678 | 杉戸 679 | 松伏 680 | 千葉市 681 | 花見川 682 | 稲毛 683 | 若葉 684 | 美浜 685 | 銚子 686 | 市川 687 | 船橋 688 | 館山 689 | 木更津 690 | 松戸 691 | 茂原 692 | 成田 693 | 佐倉 694 | 東金 695 | 旭 696 | 習志野 697 | 柏 698 | 勝浦 699 | 市原 700 | 流山 701 | 我孫子 702 | 鴨川 703 | 鎌ケ谷 704 | 君津 705 | 富津 706 | 浦安 707 | 四街道 708 | 袖ケ浦 709 | 八街 710 | 印西 711 | 白井 712 | 富里 713 | 南房総 714 | 匝瑳 715 | 香取 716 | 山武 717 | いすみ 718 | 印旛 719 | 酒々井 720 | 本埜 721 | 栄 722 | 神崎 723 | 多古 724 | 東庄 725 | 大網白里 726 | 九十九里 727 | 芝山 728 | 横芝光 729 | 長生 730 | 一宮 731 | 睦沢 732 | 白子 733 | 長柄 734 | 長南 735 | 夷隅 736 | 大多喜 737 | 御宿 738 | 安房 739 | 鋸南 740 | 港区 741 | 新宿 742 | 文京 743 | 台東 744 | 墨田 745 | 江東 746 | 品川 747 | 目黒 748 | 大田 749 | 世田谷 750 | 渋谷 751 | 中野 752 | 杉並 753 | 豊島 754 | 荒川 755 | 板橋 756 | 練馬 757 | 足立 758 | 葛飾 759 | 江戸川 760 | 八王子 761 | 立川 762 | 武蔵野 763 | 三鷹 764 | 青梅 765 | 府中 766 | 昭島 767 | 調布 768 | 町田 769 | 小金井 770 | 全野 771 | 国分寺 772 | 国立 773 | 福生 774 | 狛江 775 | 東大和 776 | 清瀬 777 | 東久留米 778 | 武蔵村山 779 | 多摩 780 | 稲城 781 | 羽 782 | あきる野 783 | 西東京 784 | 西多摩 785 | 瑞穂 786 | 全の出 787 | 檜原 788 | 奥多摩 789 | 大島 790 | 利島 791 | 新島 792 | 神津島 793 | 三宅島 794 | 御蔵島 795 | 八丈島 796 | 青ヶ島 797 | 小笠原諸 798 | 横浜市 799 | 鶴見 800 | 横浜市神 801 | 中区 802 | 保土ケ谷 803 | 磯子 804 | 金沢 805 | 港北 806 | 戸塚 807 | 港南 808 | 瀬谷 809 | 都筑 810 | 幸 811 | 中原 812 | 高津 813 | 宮前 814 | 麻生 815 | 横須賀 816 | 平塚 817 | 鎌倉 818 | 小田原 819 | 茅ヶ崎 820 | 逗子 821 | 相模原 822 | 三浦 823 | 秦野 824 | 厚木 825 | 伊勢原 826 | 海老名 827 | 座間 828 | 南足柄 829 | 綾瀬 830 | 葉山 831 | 高座 832 | 寒川 833 | 中 834 | 大磯 835 | 二宮 836 | 足柄上 837 | 中井 838 | 大井 839 | 松田 840 | 山北 841 | 開成 842 | 足柄下 843 | 箱根 844 | 真鶴 845 | 湯河原 846 | 愛甲 847 | 愛川 848 | 清川 849 | 新潟 850 | 江南 851 | 秋葉 852 | 西蒲 853 | 長岡 854 | 三条 855 | 柏崎 856 | 新発田 857 | 小千谷 858 | 加茂 859 | 十全 860 | 見附 861 | 村上 862 | 燕 863 | 糸魚川 864 | 妙高 865 | 五泉 866 | 上越 867 | 阿賀野 868 | 佐渡 869 | 魚沼 870 | 南魚沼 871 | 胎内 872 | 北蒲原 873 | 聖籠 874 | 西蒲原 875 | 弥彦 876 | 南蒲原 877 | 田上 878 | 東蒲原 879 | 阿賀 880 | 出雲崎 881 | 北魚沼 882 | 中魚沼 883 | 津南 884 | 刈羽 885 | 岩船 886 | 関川 887 | 粟島浦 888 | 富山 889 | 高岡 890 | 魚津 891 | 氷見 892 | 黒部 893 | 砺波 894 | 小矢部 895 | 南砺 896 | 射水 897 | 中新川 898 | 舟橋 899 | 上市 900 | 立山 901 | 下新川 902 | 入善 903 | 七尾 904 | 小松 905 | 輪島 906 | 珠洲 907 | 加賀 908 | 羽咋 909 | かほく 910 | 白山 911 | 能美 912 | 川北 913 | 野々市 914 | 津幡 915 | 内灘 916 | 志賀 917 | 宝達志水 918 | 鹿島 919 | 中能登 920 | 鳳珠 921 | 穴水 922 | 能登 923 | 福井県 924 | 甲府 925 | 富士吉田 926 | 都留 927 | 山梨 928 | 大月 929 | 韮崎 930 | 南アルプ 931 | 北杜 932 | 甲斐 933 | 笛吹 934 | 上野原 935 | 甲州 936 | 中央 937 | 西八代 938 | 市川三郷 939 | 南巨摩 940 | 増穂 941 | 鰍沢 942 | 早川 943 | 身延 944 | 中巨摩 945 | 南都留 946 | 道志 947 | 西桂 948 | 忍野 949 | 山中湖 950 | 鳴沢 951 | 富士河口 952 | 北都留 953 | 小菅 954 | 丹波山 955 | 長野 956 | 松本 957 | 上田 958 | 岡谷 959 | 飯田 960 | 諏訪 961 | 須坂 962 | 小諸 963 | 伊那 964 | 駒ヶ根 965 | 大 966 | 飯山 967 | 茅野 968 | 塩尻 969 | 佐久 970 | 千曲 971 | 東御 972 | 安曇野 973 | 南佐久 974 | 小海 975 | 南相木 976 | 北相木 977 | 佐久穂 978 | 北佐久 979 | 軽井沢 980 | 御代田 981 | 立科 982 | 小県 983 | 青木 984 | 長和 985 | 下諏訪 986 | 原 987 | 上伊那 988 | 辰野 989 | 箕輪 990 | 飯島 991 | 南箕輪 992 | 宮田 993 | 下伊那 994 | 松川 995 | 高森 996 | 阿南 997 | 阿智 998 | 平谷 999 | 根羽 1000 | 下條 1001 | 売木 1002 | 天龍 1003 | 泰阜 1004 | 喬木 1005 | 豊丘 1006 | 大鹿 1007 | 木曽 1008 | 上松 1009 | 南木曽 1010 | 木祖 1011 | 王滝 1012 | 大桑 1013 | 東筑摩 1014 | 麻績 1015 | 生坂 1016 | 波田 1017 | 筑北 1018 | 北安曇 1019 | 白馬 1020 | 小谷 1021 | 埴科 1022 | 坂城 1023 | 上高井 1024 | 小布施 1025 | 下高井 1026 | 山ノ内 1027 | 木島平 1028 | 野沢温泉 1029 | 上水内 1030 | 信州新 1031 | 信濃 1032 | 中条 1033 | 飯綱 1034 | 下水内 1035 | 岐阜 1036 | 大垣 1037 | 多治見 1038 | 関 1039 | 中津川 1040 | 美濃 1041 | 瑞浪 1042 | 羽島 1043 | 恵那 1044 | 美濃加茂 1045 | 土岐 1046 | 各務原 1047 | 可児 1048 | 山県 1049 | 飛騨 1050 | 本巣 1051 | 郡上 1052 | 下呂 1053 | 海津 1054 | 岐南 1055 | 笠松 1056 | 養老 1057 | 不破 1058 | 垂井 1059 | 関ケ原 1060 | 安八 1061 | 神戸 1062 | 輪之内 1063 | 揖斐 1064 | 揖斐川 1065 | 大野 1066 | 北方 1067 | 坂祝 1068 | 富加 1069 | 川辺 1070 | 七宗 1071 | 八百津 1072 | 白川 1073 | 御嵩 1074 | 静岡 1075 | 葵 1076 | 駿河 1077 | 浜松 1078 | 浜北 1079 | 天竜 1080 | 沼津 1081 | 熱海 1082 | 富士宮 1083 | 伊東 1084 | 島田 1085 | 富士 1086 | 磐田 1087 | 焼津 1088 | 掛川 1089 | 藤枝 1090 | 御殿場 1091 | 袋井 1092 | 下田 1093 | 裾野 1094 | 湖西 1095 | 伊豆 1096 | 御前崎 1097 | 菊川 1098 | 伊豆の国 1099 | 牧之原 1100 | 賀茂 1101 | 東伊豆 1102 | 河津 1103 | 南伊豆 1104 | 松崎 1105 | 西伊豆 1106 | 田方 1107 | 函南 1108 | 駿東 1109 | 長泉 1110 | 芝川 1111 | 榛原 1112 | 吉田 1113 | 川根本 1114 | 周智 1115 | 浜名 1116 | 新居 1117 | 名古屋 1118 | 千種 1119 | 中村 1120 | 熱田 1121 | 守山 1122 | 名東 1123 | 天白 1124 | 豊橋 1125 | 岡崎 1126 | 瀬戸 1127 | 半田 1128 | 春全井 1129 | 豊川 1130 | 津島 1131 | 碧南 1132 | 刈谷 1133 | 豊田 1134 | 安城 1135 | 西尾 1136 | 蒲 1137 | 1138 | 犬山 1139 | 常滑 1140 | 小牧 1141 | 稲沢 1142 | 新城 1143 | 大府 1144 | 知多 1145 | 知立 1146 | 尾張旭 1147 | 高浜 1148 | 岩倉 1149 | 豊明 1150 | 全進 1151 | 田原 1152 | 愛西 1153 | 清須 1154 | 北名古屋 1155 | 弥富 1156 | 愛知 1157 | 東郷 1158 | 長久手 1159 | 西春全井 1160 | 豊山 1161 | 春全 1162 | 丹羽 1163 | 大口 1164 | 扶桑 1165 | 海部 1166 | 七宝 1167 | 美和 1168 | 甚目寺 1169 | 大治 1170 | 蟹江 1171 | 飛島 1172 | 阿久比 1173 | 東浦 1174 | 南知多 1175 | 武豊 1176 | 幡豆 1177 | 一色 1178 | 吉良 1179 | 額田 1180 | 幸田 1181 | 西加茂 1182 | 三好 1183 | 北設楽 1184 | 設楽 1185 | 東栄 1186 | 豊根 1187 | 宝飯 1188 | 小坂井 1189 | 津 1190 | 四全市 1191 | 伊勢 1192 | 松阪 1193 | 桑名 1194 | 鈴鹿 1195 | 名張 1196 | 尾鷲 1197 | 亀山 1198 | 鳥羽 1199 | 熊野 1200 | いなべ 1201 | 志摩 1202 | 伊賀 1203 | 木曽岬 1204 | 員弁 1205 | 東員 1206 | 三重 1207 | 菰野 1208 | 多気 1209 | 大台 1210 | 度会 1211 | 玉城 1212 | 大紀 1213 | 南伊勢 1214 | 北牟婁 1215 | 紀北 1216 | 南牟婁 1217 | 御浜 1218 | 紀宝 1219 | 大津 1220 | 彦根 1221 | 長浜 1222 | 近江八幡 1223 | 栗東 1224 | 甲賀 1225 | 野洲 1226 | 湖南 1227 | 高島 1228 | 東近江 1229 | 米原 1230 | 蒲生 1231 | 安土 1232 | 竜王 1233 | 愛荘 1234 | 犬上 1235 | 豊郷 1236 | 甲良 1237 | 多賀 1238 | 東浅井 1239 | 虎姫 1240 | 湖北 1241 | 伊香 1242 | 高月 1243 | 木之本 1244 | 余呉 1245 | 西浅井 1246 | 京都 1247 | 上京 1248 | 左京 1249 | 中京 1250 | 東山 1251 | 下京 1252 | 右京 1253 | 伏見 1254 | 山科 1255 | 西京 1256 | 福知山 1257 | 舞鶴 1258 | 綾部 1259 | 宇治 1260 | 宮津 1261 | 亀岡 1262 | 城陽 1263 | 向全 1264 | 長岡京 1265 | 八幡 1266 | 京田辺 1267 | 京丹後 1268 | 南丹 1269 | 木津川 1270 | 乙訓 1271 | 大山崎 1272 | 久世 1273 | 久御山 1274 | 綴喜 1275 | 井手 1276 | 宇治田原 1277 | 相楽 1278 | 笠置 1279 | 和束 1280 | 精華 1281 | 南山城 1282 | 船井 1283 | 京丹波 1284 | 与謝 1285 | 伊根 1286 | 与謝野 1287 | 大阪市 1288 | 都島 1289 | 此花 1290 | 大正 1291 | 天王寺 1292 | 浪速 1293 | 西淀川 1294 | 東淀川 1295 | 東成 1296 | 生野 1297 | 城東 1298 | 阿倍野 1299 | 住吉 1300 | 東住吉 1301 | 西成 1302 | 淀川 1303 | 住之江 1304 | 平野 1305 | 堺 1306 | 美原 1307 | 岸和田 1308 | 豊中 1309 | 吹田 1310 | 泉大津 1311 | 高槻 1312 | 貝塚 1313 | 守口 1314 | 枚方 1315 | 茨木 1316 | 八尾 1317 | 泉佐野 1318 | 富田林 1319 | 寝屋川 1320 | 河内長野 1321 | 松原 1322 | 大東 1323 | 和泉 1324 | 箕面 1325 | 柏原 1326 | 羽曳野 1327 | 門真 1328 | 摂津 1329 | 高石 1330 | 藤井寺 1331 | 東大阪 1332 | 泉南 1333 | 四條畷 1334 | 交野 1335 | 大阪狭山 1336 | 阪南 1337 | 島本 1338 | 豊能 1339 | 能勢 1340 | 泉北 1341 | 忠岡 1342 | 熊取 1343 | 田尻 1344 | 岬 1345 | 南河内 1346 | 太子 1347 | 河南 1348 | 千早赤阪 1349 | 東灘 1350 | 灘 1351 | 兵庫 1352 | 長田 1353 | 須磨 1354 | 垂水 1355 | 姫路 1356 | 尼崎 1357 | 明石 1358 | 西宮 1359 | 洲本 1360 | 芦屋 1361 | 伊丹 1362 | 相生 1363 | 豊岡 1364 | 加古川 1365 | 赤穂 1366 | 西脇 1367 | 宝塚 1368 | 三木 1369 | 高砂 1370 | 三田 1371 | 加西 1372 | 篠山 1373 | 養父 1374 | 丹波 1375 | 南あわじ 1376 | 朝来 1377 | 淡路 1378 | 宍粟 1379 | 加東 1380 | たつの 1381 | 猪名川 1382 | 多可 1383 | 加古 1384 | 稲美 1385 | 播磨 1386 | 福崎 1387 | 神河 1388 | 揖保 1389 | 上 1390 | 佐用 1391 | 美方 1392 | 香美 1393 | 新温泉 1394 | 奈良 1395 | 大和高田 1396 | 山 1397 | 天理 1398 | 橿原 1399 | 桜井 1400 | 五條 1401 | 御所 1402 | 生駒 1403 | 香芝 1404 | 葛城 1405 | 宇陀 1406 | 山添 1407 | 平群 1408 | 斑鳩 1409 | 安堵 1410 | 磯城 1411 | 三宅 1412 | 田原本 1413 | 曽爾 1414 | 御杖 1415 | 高市 1416 | 高取 1417 | 明全香 1418 | 北葛城 1419 | 上牧 1420 | 王寺 1421 | 広陵 1422 | 河合 1423 | 吉野 1424 | 大淀 1425 | 下市 1426 | 黒滝 1427 | 天川 1428 | 野迫川 1429 | 十津川 1430 | 下北山 1431 | 上北山 1432 | 東吉野 1433 | 和歌山 1434 | 海南 1435 | 橋本 1436 | 有田 1437 | 御坊 1438 | 田辺 1439 | 新宮 1440 | 紀の川 1441 | 岩出 1442 | 海草 1443 | 紀美野 1444 | 伊都 1445 | かつらぎ 1446 | 九度山 1447 | 高野 1448 | 湯浅 1449 | 広川 1450 | 有田川 1451 | 由良 1452 | 印南 1453 | みなべ 1454 | 全高川 1455 | 西牟婁 1456 | 白浜 1457 | 上富田 1458 | すさみ 1459 | 東牟婁 1460 | 那智勝浦 1461 | 太地 1462 | 古座川 1463 | 北山 1464 | 串本 1465 | 鳥取 1466 | 米子 1467 | 倉吉 1468 | 境港 1469 | 岩美 1470 | 八頭 1471 | 若桜 1472 | 智頭 1473 | 東伯 1474 | 三朝 1475 | 湯梨浜 1476 | 琴浦 1477 | 北栄 1478 | 西伯 1479 | 全吉津 1480 | 大山 1481 | 伯耆 1482 | 全南 1483 | 江府 1484 | 松江 1485 | 浜田 1486 | 出雲 1487 | 益田 1488 | 安来 1489 | 江津 1490 | 雲南 1491 | 八束 1492 | 東出雲 1493 | 仁多 1494 | 奥出雲 1495 | 飯石 1496 | 飯南 1497 | 簸川 1498 | 斐川 1499 | 邑智 1500 | 川本 1501 | 邑南 1502 | 鹿足 1503 | 津和野 1504 | 吉賀 1505 | 隠岐 1506 | 海士 1507 | 西ノ島 1508 | 知夫 1509 | 隠岐の島 1510 | 岡山 1511 | 倉敷 1512 | 津山 1513 | 玉野 1514 | 笠岡 1515 | 井原 1516 | 総社 1517 | 高梁 1518 | 新見 1519 | 備前 1520 | 瀬戸内 1521 | 赤磐 1522 | 真庭 1523 | 美作 1524 | 浅口 1525 | 和気 1526 | 都窪 1527 | 早島 1528 | 里庄 1529 | 小田 1530 | 矢掛 1531 | 苫田 1532 | 鏡野 1533 | 勝田 1534 | 勝央 1535 | 奈義 1536 | 英田 1537 | 西粟倉 1538 | 久米 1539 | 久米南 1540 | 美咲 1541 | 吉備中央 1542 | 広島 1543 | 安佐南 1544 | 安佐北 1545 | 安芸 1546 | 佐伯 1547 | 呉 1548 | 竹原 1549 | 三原 1550 | 尾道 1551 | 福山 1552 | 三次 1553 | 庄原 1554 | 大竹 1555 | 東広島 1556 | 廿全市 1557 | 安芸高田 1558 | 江田島 1559 | 海田 1560 | 坂 1561 | 安芸太田 1562 | 大崎上島 1563 | 世羅 1564 | 神石 1565 | 神石高原 1566 | 下関 1567 | 宇部 1568 | 山口 1569 | 萩 1570 | 防府 1571 | 下松 1572 | 岩国 1573 | 光 1574 | 長門 1575 | 柳井 1576 | 美祢 1577 | 周南 1578 | 山陽小野 1579 | 大島 1580 | 周防大島 1581 | 玖珂 1582 | 和木 1583 | 熊毛 1584 | 上関 1585 | 田布施 1586 | 平生 1587 | 阿武 1588 | 阿東 1589 | 徳島 1590 | 鳴門 1591 | 小松島 1592 | 吉野川 1593 | 阿波 1594 | 美馬 1595 | 上勝 1596 | 佐那河内 1597 | 名西 1598 | 石井 1599 | 神山 1600 | 那賀 1601 | 牟岐 1602 | 美波 1603 | 海陽 1604 | 板野 1605 | 松茂 1606 | 北島 1607 | 藍住 1608 | 上板 1609 | つるぎ 1610 | 東みよし 1611 | 高松 1612 | 丸亀 1613 | 坂出 1614 | 善通寺 1615 | 観音寺 1616 | さぬき 1617 | 東かがわ 1618 | 三豊 1619 | 小豆 1620 | 土庄 1621 | 小豆島 1622 | 木田 1623 | 香川 1624 | 直島 1625 | 綾歌 1626 | 宇多津 1627 | 綾川 1628 | 仲多度 1629 | 琴平 1630 | 多度津 1631 | まんのう 1632 | 松山 1633 | 今治 1634 | 宇和島 1635 | 八幡浜 1636 | 新居浜 1637 | 西条 1638 | 大洲 1639 | 伊予 1640 | 四国中央 1641 | 西予 1642 | 東温 1643 | 越智 1644 | 上島 1645 | 上浮穴 1646 | 久万高原 1647 | 砥部 1648 | 喜多 1649 | 内子 1650 | 西宇和 1651 | 伊方 1652 | 北宇和 1653 | 松野 1654 | 鬼北 1655 | 南宇和 1656 | 愛南 1657 | 高知 1658 | 室戸 1659 | 南国 1660 | 土佐 1661 | 須崎 1662 | 宿毛 1663 | 土佐清水 1664 | 四万十 1665 | 香南 1666 | 東洋 1667 | 奈半利 1668 | 田野 1669 | 安田 1670 | 北川 1671 | 馬路 1672 | 芸西 1673 | 本山 1674 | 大豊 1675 | 大川 1676 | 吾川 1677 | いの 1678 | 仁淀川 1679 | 中土佐 1680 | 佐川 1681 | 越知 1682 | 梼原 1683 | 津野 1684 | 幡多 1685 | 黒潮 1686 | 北九州 1687 | 門司 1688 | 若松 1689 | 戸畑 1690 | 小倉北 1691 | 小倉南 1692 | 八幡東 1693 | 八幡西 1694 | 福岡 1695 | 博多 1696 | 城南 1697 | 早良 1698 | 大牟田 1699 | 久留米 1700 | 直方 1701 | 飯塚 1702 | 田川 1703 | 柳川 1704 | 八女 1705 | 筑後 1706 | 行橋 1707 | 豊前 1708 | 中間 1709 | 小 1710 | 筑紫野 1711 | 大野城 1712 | 宗像 1713 | 太宰府 1714 | 前原 1715 | 古賀 1716 | 福津 1717 | うきは 1718 | 宮若 1719 | 嘉麻 1720 | 朝倉 1721 | みやま 1722 | 筑紫 1723 | 糟屋 1724 | 宇美 1725 | 篠栗 1726 | 志免 1727 | 須恵 1728 | 久山 1729 | 粕屋 1730 | 遠賀 1731 | 水巻 1732 | 岡垣 1733 | 鞍手 1734 | 小竹 1735 | 嘉穂 1736 | 桂川 1737 | 筑前 1738 | 東峰 1739 | 糸島 1740 | 二丈 1741 | 三井 1742 | 大刀洗 1743 | 三潴 1744 | 大木 1745 | 黒木 1746 | 立花 1747 | 矢部 1748 | 星野 1749 | 香春 1750 | 添田 1751 | 糸田 1752 | 大任 1753 | 赤 1754 | 福智 1755 | 苅田 1756 | みやこ 1757 | 築上 1758 | 吉富 1759 | 上毛 1760 | 佐賀 1761 | 唐津 1762 | 鳥栖 1763 | 多久 1764 | 伊万里 1765 | 武雄 1766 | 小城 1767 | 嬉野 1768 | 神埼 1769 | 吉野ヶ里 1770 | 三養基 1771 | 基山 1772 | 上峰 1773 | みやき 1774 | 東松浦 1775 | 玄海 1776 | 西松浦 1777 | 杵島 1778 | 大町 1779 | 江北 1780 | 藤津 1781 | 太良 1782 | 長崎 1783 | 佐世保 1784 | 島原 1785 | 諫早 1786 | 平戸 1787 | 松浦 1788 | 対馬 1789 | 壱岐 1790 | 五島 1791 | 西海 1792 | 雲仙 1793 | 南島原 1794 | 西彼杵 1795 | 長与 1796 | 時津 1797 | 東彼杵 1798 | 川棚 1799 | 波佐見 1800 | 北松浦 1801 | 小値賀 1802 | 江迎 1803 | 鹿町 1804 | 佐々 1805 | 南松浦 1806 | 新上五島 1807 | 熊本 1808 | 八代 1809 | 人吉 1810 | 荒尾 1811 | 水俣 1812 | 玉名 1813 | 山鹿 1814 | 菊池 1815 | 宇土 1816 | 上天草 1817 | 宇城 1818 | 阿蘇 1819 | 天草 1820 | 合志 1821 | 下益城 1822 | 玉東 1823 | 南関 1824 | 長洲 1825 | 和水 1826 | 鹿本 1827 | 植木 1828 | 菊陽 1829 | 南小国 1830 | 産山 1831 | 西原 1832 | 南阿蘇 1833 | 上益城 1834 | 御船 1835 | 嘉島 1836 | 益城 1837 | 甲佐 1838 | 山都 1839 | 氷川 1840 | 葦北 1841 | 芦北 1842 | 津奈木 1843 | 球磨 1844 | 錦 1845 | 多良木 1846 | 湯前 1847 | 水上 1848 | 相良 1849 | 五木 1850 | 山江 1851 | あさぎり 1852 | 苓北 1853 | 大分 1854 | 別府 1855 | 中津 1856 | 全田 1857 | 臼杵 1858 | 津久見 1859 | 竹田 1860 | 豊後高田 1861 | 杵築 1862 | 宇佐 1863 | 豊後大野 1864 | 由布 1865 | 国東 1866 | 東国東 1867 | 姫島 1868 | 速見 1869 | 全出 1870 | 玖珠 1871 | 九重 1872 | 宮崎 1873 | 都城 1874 | 延岡 1875 | 小林 1876 | 全向 1877 | 串間 1878 | 西都 1879 | えびの 1880 | 清武 1881 | 北諸県 1882 | 三股 1883 | 西諸県 1884 | 高原 1885 | 野尻 1886 | 東諸県 1887 | 国富 1888 | 綾 1889 | 児湯 1890 | 高鍋 1891 | 新富 1892 | 西米良 1893 | 木城 1894 | 川南 1895 | 都農 1896 | 東臼杵 1897 | 門川 1898 | 諸塚 1899 | 椎葉 1900 | 西臼杵 1901 | 高千穂 1902 | 全之影 1903 | 五ヶ瀬 1904 | 鹿児島 1905 | 鹿屋 1906 | 枕崎 1907 | 阿久根 1908 | 出水 1909 | 指宿 1910 | 西之表 1911 | 薩摩川内 1912 | 全置 1913 | 曽於 1914 | 霧島 1915 | いちき串 1916 | 南さつま 1917 | 志布志 1918 | 奄美 1919 | 南九州 1920 | 伊佐 1921 | 十島 1922 | 薩摩 1923 | さつま 1924 | 長島 1925 | 姶良 1926 | 加治木 1927 | 湧水 1928 | 肝属 1929 | 東串良 1930 | 錦江 1931 | 南大隅 1932 | 肝付 1933 | 中種子 1934 | 南種子 1935 | 屋久島 1936 | 宇検 1937 | 龍郷 1938 | 喜界 1939 | 徳之島 1940 | 天城 1941 | 伊仙 1942 | 和泊 1943 | 知名 1944 | 与論 1945 | 那覇 1946 | 宜野湾 1947 | 石垣 1948 | 浦添 1949 | 名護 1950 | 糸満 1951 | 沖縄 1952 | 豊見城 1953 | うるま 1954 | 宮古島 1955 | 南城 1956 | 国頭 1957 | 大宜味 1958 | 東 1959 | 今帰仁 1960 | 本部 1961 | 恩納 1962 | 宜野座 1963 | 金武 1964 | 伊江 1965 | 中頭 1966 | 読谷 1967 | 嘉手納 1968 | 北谷 1969 | 北中城 1970 | 中城 1971 | 島尻 1972 | 与那原 1973 | 南風原 1974 | 渡嘉敷 1975 | 座間味 1976 | 粟国 1977 | 渡名喜 1978 | 南大東 1979 | 北大東 1980 | 伊平屋 1981 | 伊是名 1982 | 久米島 1983 | 八重瀬 1984 | 多良間 1985 | 八重山 1986 | 竹富 1987 | 与那国 1988 | -------------------------------------------------------------------------------- /main/v_script.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import configparser 3 | cf = configparser.ConfigParser() 4 | 5 | import os 6 | import sys 7 | import time 8 | import linecache 9 | from urllib.request import urlretrieve 10 | FILE_FOLDER_PATH = os.path.dirname(os.path.realpath(__file__)) + '\\' 11 | cf.read(FILE_FOLDER_PATH+"config.ini",encoding='utf-8') 12 | from ld_control import Dnconsole as dn 13 | import shutil 14 | import uuid 15 | from PIL import ImageGrab,Image 16 | import hashlib 17 | import hex_handle 18 | import traceback 19 | import datetime 20 | 21 | import cv2 as cv 22 | 23 | from aip import AipOcr 24 | import random 25 | from ident_card import create_realname_and_id_number 26 | from emailReceive import EmailReceive 27 | 28 | APP_ID = cf.get("Screen-Setting", "APP_ID") 29 | API_KEY = cf.get("Screen-Setting", "API_KEY") 30 | SECRET_KEY = cf.get("Screen-Setting", "SECRET_KEY") 31 | client = AipOcr(APP_ID, API_KEY, SECRET_KEY) 32 | 33 | 34 | FILE_PARENT_FOLDER = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+'\\' 35 | 36 | # 获取当前模拟器列表 37 | def get_running_emu(): 38 | return dn.list_running() 39 | 40 | class VScript(object): 41 | # 目标模拟器索引值 42 | _target = 0 43 | # 运行中的模块序号 起始为0 44 | _run_module = int(cf.get("Script-Setting", "RUN_START_MODULE")) 45 | # 默认偏移距离 46 | _default_offset = int(cf.get("Screen-Setting", "DEFAULT_OFFSET")) 47 | 48 | _second_snap_path = '' 49 | 50 | # 当前账号密码 51 | _account = '' 52 | _password = '' 53 | 54 | _user_name_cache = '' 55 | 56 | snap_img_cache_path = '' 57 | 58 | params_data = {} 59 | 60 | _dump_time_cache = '' 61 | 62 | _actor_list_cache = "" 63 | 64 | def __init__(self,target_index = 0): 65 | self._target = target_index 66 | self.v_create_dir(dn.share_path + '/'+str(target_index)+'/') 67 | self._second_snap_path = dn.share_path + '/'+str(target_index)+'/screen_snap.png' 68 | self._second_dump_path = dn.share_path + '/'+str(target_index)+'/screen_snap.dump' 69 | 70 | def v_ramdom(self,num, r): 71 | return num + random.uniform(-r, r) 72 | 73 | def setParamsData(self,data): 74 | self.params_data = data 75 | 76 | def getParamsData(self): 77 | return self.params_data 78 | 79 | def v_ramdom_xy(self,x,y): 80 | ra_x = self.v_ramdom(x, self._default_offset) 81 | ra_y = self.v_ramdom(y, self._default_offset) 82 | if(ra_x < 0): 83 | ra_x = 0 84 | elif(ra_x > 960): 85 | ra_x = 960 86 | if(ra_y < 0): 87 | ra_y = 0 88 | elif(ra_y > 540): 89 | ra_y = 540 90 | return ra_x,ra_y 91 | 92 | def click(self,x,y,delay,ramdom_time=0): 93 | ramdom_add = delay + random.uniform(0, ramdom_time) 94 | ra_x,ra_y = self.v_ramdom_xy(x,y) 95 | dn.touch(self._target,ra_x,ra_y,ramdom_add) 96 | 97 | def swipe(self,x1,y1,x2,y2,delay,ramdom_time=0): 98 | ramdom_add = delay + random.uniform(0, ramdom_time) 99 | ra_x1,ra_y1 = self.v_ramdom_xy(x1,y1) 100 | ra_x2,ra_y2 = self.v_ramdom_xy(x2,y2) 101 | dn.swipe(self._target,(ra_x1,ra_y1),(ra_x2,ra_y2),ramdom_add) 102 | 103 | def point_judge(self,color_arr): 104 | return hex_handle.color_compare(self._second_dump_path,color_arr,self._target) 105 | 106 | def muti_color_judge(self,color_arr): 107 | color_find_area = [color_arr[0]["dot"][0],color_arr[0]["dot"][1],color_arr[1]["dot"][0],color_arr[1]["dot"][1]] 108 | target_color = color_arr[2]["color"] 109 | target_color_confidence = color_arr[2]["confidence"] 110 | offset_aim_dot = color_arr[2]["dot"] 111 | offset_dot = [] 112 | for index in range(3, len(color_arr)): 113 | pox = {} 114 | pox["offset"] = [color_arr[index]["dot"][0]-offset_aim_dot[0],color_arr[index]["dot"][1]-offset_aim_dot[1]] 115 | pox["color"] = color_arr[index]["color"] 116 | offset_dot.append(pox) 117 | return hex_handle.offset_compare(self._second_dump_path,color_find_area,target_color,target_color_confidence,offset_dot) 118 | 119 | def v_sleep(self,times): 120 | arm_time = int(times + random.uniform(0, 200)) 121 | time.sleep(arm_time/1000) 122 | 123 | def sleep(self,time): 124 | self.v_sleep(time) 125 | 126 | def set_log(self,fn_name): 127 | try: 128 | log_path_snap = FILE_PARENT_FOLDER+'log\\'+self.v_now_time()+'\\' 129 | self.v_create_dir(log_path_snap) 130 | with open(log_path_snap + 'error.txt', 'a',encoding='utf-8') as file_obj: 131 | file_obj.write(str(fn_name)) 132 | img_path = dn.screen_snap(self._target,'error') 133 | shutil.copy(img_path, log_path_snap+'error.png') 134 | except Exception as e: 135 | traceback.print_exc() 136 | print(e) 137 | 138 | def md_jtl(self,name): 139 | return hashlib.md5(name.encode(encoding='UTF-8')).hexdigest() 140 | 141 | def get_FileModifyTime(self,filePath): 142 | t = int(os.path.getmtime(filePath)*1000) 143 | return t 144 | 145 | def get_FileSize(self,path): 146 | size = int(os.path.getsize(path)) 147 | return size 148 | 149 | def get_FileCreateTime(self,filePath): 150 | t = int(os.path.getctime(filePath)*1000) 151 | return t 152 | 153 | def loop_snap_dump(self): 154 | dn.dnld(self._target, 'screencap /sdcard/Pictures/%s/%s.dump'%(self._target,'screen_snap')) 155 | while True: 156 | file_mod_time = self.get_FileModifyTime(self._second_dump_path) 157 | file_size_m = self.get_FileSize(self._second_dump_path) 158 | if file_mod_time and file_mod_time != self._dump_time_cache and file_size_m != 0: 159 | self._dump_time_cache = file_mod_time 160 | break 161 | def touch_down(self): 162 | dn.dnld(self._target, "sendevent dev/input/event2 3 57 0\nsendevent dev/input/event2 1 330 1\nsendevent dev/input/event2 1 325 1\n") 163 | 164 | def touch_up(self): 165 | dn.dnld(self._target, "sendevent dev/input/event2 3 57 -1\nsendevent dev/input/event2 1 330 0\nsendevent dev/input/event2 1 325 0\nsendevent dev/input/event2 0 0 0\n") 166 | 167 | def move_to(self,x,y): 168 | dn.dnld(self._target,"sendevent dev/input/event2 3 53 %s\nsendevent dev/input/event2 3 54 %s\nsendevent dev/input/event2 0 0 0\n"%(x,y)) 169 | 170 | def _v_text_ocr(self,filepath='',accur=False): 171 | try: 172 | if(not accur): 173 | options = {} 174 | options["language_type"] = "CHN_ENG" 175 | options["detect_direction"] = "true" 176 | options["probability"] = "true" 177 | with open(filepath, 'rb') as f: 178 | result = client.basicGeneral(f.read(),options) 179 | if(len(result['words_result']) > 0): 180 | return result['words_result'][0]['words'].strip() 181 | else: 182 | return None 183 | else: 184 | options = {} 185 | options["detect_direction"] = "true" 186 | options["probability"] = "true" 187 | with open(filepath, 'rb') as f: 188 | result = client.basicAccurate(f.read(),options) 189 | if(len(result['words_result']) > 0): 190 | return result['words_result'][0]['words'].strip() 191 | else: 192 | return None 193 | except Exception as e: 194 | print('_v_text_ocr error') 195 | return None 196 | 197 | def _text_ocr(self,all_path,accur = False): 198 | if(not all_path):return 199 | return self._v_text_ocr(all_path,accur) 200 | 201 | 202 | def text_into(self,text): 203 | dn.input_text(self._target,text) 204 | 205 | def ocr_area(self,x1,y1,x2,y2,accur = False): 206 | self.v_sleep(1000) 207 | file_floder = os.path.dirname(self._second_snap_path)+'\\' 208 | self.v_crop_img(x1,y1,x2,y2,self._second_snap_path,file_floder+'crop_img.png') 209 | self.v_sleep(1200) 210 | return self._text_ocr(file_floder+'crop_img.png',accur) 211 | 212 | def key_code_press(self,key_num): 213 | dn.key_code_event(self._target,key_num) 214 | 215 | def delect_file(self,file_path): 216 | dn.del_file_libs(self._target,file_path) 217 | 218 | def copy_file(self,old_path,new_path): 219 | dn.copy_file(self._target,old_path,new_path) 220 | 221 | def set_run_module(self,module_num): 222 | self._run_module = module_num 223 | 224 | def next_module(self): 225 | self._run_module = self._run_module + 1 226 | 227 | # 获取当前运行的模块序号 228 | def get_run_module(self): 229 | return self._run_module 230 | 231 | # 设置账号 232 | def set_account(self,acc): 233 | self._account = acc 234 | 235 | def set_password(self,pwd): 236 | self._password = pwd 237 | 238 | # 获取账号 239 | def get_account(self): 240 | return self._account 241 | 242 | # 随机身份证和姓名 名字,id 243 | def ramdom_idcard(self): 244 | return create_realname_and_id_number() 245 | 246 | # 获取密码 247 | def get_password(self): 248 | return self._password 249 | 250 | def un_install_app(self): 251 | dn.uninstall(self._target) 252 | self.v_sleep(2000) 253 | return True 254 | 255 | def create_ram_unid(self): 256 | return str(uuid.uuid4().fields[-1]) 257 | 258 | def change_imei_and_restart(self): 259 | try: 260 | dn.quit(self._target) 261 | self.v_sleep(1000) 262 | dn.change_device_data(self._target) 263 | self.v_sleep(1000) 264 | dn.launch(self._target) 265 | dn_times = 0 266 | while True: 267 | self.v_sleep(1000) 268 | if dn.is_running(self._target): 269 | break 270 | else: 271 | dn_times += 1 272 | if(dn_times >120): 273 | dn_times = 0 274 | dn.launch(self._target) 275 | print('%s restarting'%(self._target)) 276 | return True 277 | except Exception as e: 278 | traceback.print_exc() 279 | print(e) 280 | 281 | def install_app(self,path): 282 | if(not path): 283 | return False 284 | return dn.install(self._target,path) 285 | 286 | # 清空app数据 287 | def clean_app(self): 288 | return dn.clear_app(self._target) 289 | 290 | def get_ramdom_only_name(self): 291 | sub_name = self.get_ramdom_textline('./names.txt') 292 | all_name = sub_name + self.v_ran_str(4) 293 | return all_name 294 | 295 | #获取txt中随机一行 txtpath例如:./names.txt 296 | def get_ramdom_textline(self,txt_path): 297 | with open(txt_path, 'r+',encoding="utf-8") as data: 298 | n = len(data.readlines()) 299 | i = random.randint(1, n-1) 300 | line=linecache.getline(txt_path,i) 301 | print(line) 302 | return line 303 | 304 | def get_mail_code_sms(self,account,pwd,keys=r'你的验证码为:(\d+)(15分钟内有效)'): 305 | self.v_sleep(20000) 306 | a = EmailReceive(account,pwd) 307 | ax_result = a.getEmail(keyword=('验证码',),onlyUnsee=False,findAll=False) 308 | return re.search(keys,ax_result[0][1][0]).group(1) 309 | 310 | def set_file_acc(self,url,android_save_path): 311 | try: 312 | file_name = os.path.basename(url) 313 | file_end_path = os.path.dirname(self._second_snap_path) + '/' + file_name 314 | urlretrieve(url, file_end_path) 315 | ld_file_path = '/sdcard/Pictures/' + str(self._target) + '/' + file_name 316 | self.copy_file(ld_file_path,android_save_path) 317 | # 移除临时存放的文件 318 | os.remove(file_end_path) 319 | return True 320 | except Exception as e: 321 | traceback.print_exc() 322 | print(e) 323 | return False 324 | 325 | def get_file_acc(self,emu_path): 326 | pc_file_path = dn.share_path + '/'+str(self._target)+'/files' 327 | self.v_create_dir(pc_file_path) 328 | file_name = os.path.basename(emu_path) 329 | ld_file_path = '/sdcard/Pictures/' + str(self._target) + '/files/' + file_name 330 | self.copy_file(emu_path,ld_file_path) 331 | return dn.share_path + '/'+ str(self._target) +'/files/'+ file_name 332 | 333 | def img_push(self,snp_path = ''): 334 | snp_path = snp_path or self.create_ram_unid() 335 | self.v_sleep(1000) 336 | path_imx = dn.screen_snap(self._target,snp_path) 337 | self.v_sleep(2400) 338 | self.snap_img_cache_path = path_imx 339 | return path_imx 340 | 341 | def split_str_exten(self,paths): 342 | filepath_img,tempfilename_img = os.path.split(paths) 343 | shotname,extension = os.path.splitext(tempfilename_img) 344 | return shotname,extension 345 | 346 | # 判断路径是否存在 不存在则创建 相对于PC而言 347 | def v_create_dir(self,dirs): 348 | if not os.path.exists(dirs): 349 | os.makedirs(dirs) 350 | 351 | # 获取当前时间 352 | def v_now_time(self)->str: 353 | return datetime.datetime.now().strftime('%Y-%m-%d-%H-%M') 354 | 355 | def v_crop_img(self,x1,y1,x2,y2,old_path,new_path): 356 | img = Image.open(old_path) 357 | cropped = img.crop((x1, y1, x2, y2)) 358 | cropped.save(new_path) 359 | 360 | def v_ran_str(self,num): 361 | H = 'abcdefghijklmnopqrstuvwxyz0123456789' 362 | salt = '' 363 | for i in range(num): 364 | salt += random.choice(H) 365 | return salt 366 | 367 | def v_ran_str_x(self,num): 368 | H = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' 369 | salt = '' 370 | for i in range(num): 371 | salt += random.choice(H) 372 | return salt 373 | 374 | # 启动app 375 | def v_run_apk(self): 376 | dn.invokeapp(self._target) 377 | self.v_sleep(2000) 378 | return True 379 | 380 | # 获取目录下所有文件 381 | def v_get_dir_files(self,dirname): 382 | result = []#所有的文件 383 | 384 | for maindir, subdir, file_name_list in os.walk(dirname): 385 | for filename in file_name_list: 386 | apath = os.path.join(maindir, filename)#合并成一个完整路径 387 | result.append(apath) 388 | 389 | return result 390 | 391 | def v_compare_pic(self,screen: str, template: str, threshold: float): 392 | size = None 393 | rex_len = 0 394 | try: 395 | time.sleep(1) 396 | scr = cv.imread(screen) 397 | tp = cv.imread(template) 398 | result = cv.matchTemplate(scr, tp, cv.TM_CCOEFF_NORMED) 399 | rex_len = len(result) 400 | size = tp.shape 401 | except cv.error: 402 | print('文件错误:', screen, template) 403 | time.sleep(1) 404 | try: 405 | scr = cv.imread(screen) 406 | tp = cv.imread(template) 407 | result = cv.matchTemplate(scr, tp, cv.TM_CCOEFF_NORMED) 408 | rex_len = len(result) 409 | size = tp.shape 410 | except cv.error: 411 | return False, rex_len 412 | min_val, max_val, min_loc, max_loc = cv.minMaxLoc(result) 413 | print('%s %s'%(template,min_val)) 414 | if min_val > threshold: 415 | return False, rex_len 416 | return True, rex_len 417 | 418 | def v_ocr_actor(self): 419 | pc_img_path = self.img_push('snap_ocr_actor_screen') 420 | all_template_mod = self.v_get_dir_files(FILE_FOLDER_PATH+'compare') 421 | rs_obj = {} 422 | for mod_path in all_template_mod: 423 | result,act_num = self.v_compare_pic(pc_img_path,mod_path,0.9) 424 | if result: 425 | file_name,sub = os.path.basename(mod_path).split('.') 426 | rs_obj[file_name] = act_num 427 | cp_str = '' 428 | for name in rs_obj: 429 | cp_str+= name+'*'+rs_obj[name]+',' 430 | cp_str = cp_str[:-1] 431 | return cp_str 432 | 433 | def noop_end_tag(self,delayTime,pointJudge,eventFunc): 434 | self.v_sleep(delayTime) 435 | self.loop_snap_dump() 436 | self.v_sleep(500) 437 | result_point = self.point_judge(pointJudge) 438 | if not result_point: 439 | eventFunc() 440 | 441 | def area_find_dot_point(self,pointJudge): 442 | self.loop_snap_dump() 443 | self.v_sleep(500) 444 | result_point = self.muti_color_judge(pointJudge) 445 | if result_point: 446 | return { 447 | x:int(result_point[0]), 448 | y:int(result_point[1]) 449 | } 450 | else: 451 | return None -------------------------------------------------------------------------------- /main_init.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import os 3 | import re 4 | import time 5 | 6 | dn_console = '' 7 | dn_ld = '' 8 | dn_share_path = '' 9 | 10 | def copy(name: str, index: int = 0): 11 | cmd = dn_console + 'copy --name %s --from %d' % (name, index) 12 | process = os.popen(cmd) 13 | result = process.read() 14 | process.close() 15 | return result 16 | 17 | def change_config(file,new_str): 18 | file_data = "" 19 | with open(file, "r", encoding="utf-8") as f: 20 | for line in f: 21 | if 'statusSettings.sharedPictures' in line: 22 | bold = re.compile('sharedPictures\": \"(\S+)\"') 23 | matches = re.search(bold,line) 24 | line = line.replace(matches.group(1),new_str) 25 | line = line.replace('\\','/') 26 | file_data += line 27 | with open(file,"w",encoding="utf-8") as f: 28 | f.write(file_data) 29 | 30 | def set_share_path(new_path): 31 | # 重置所有的共享地址 32 | for i in range(100): 33 | path_config = os.path.dirname(new_path) + '\\vms\\config' + '\\leidian'+ str(i) +'.config' 34 | if os.path.exists(path_config): 35 | if not os.path.exists(new_path): 36 | os.makedirs(new_path) 37 | change_config(path_config,new_path) 38 | 39 | if __name__ == '__main__': 40 | if(dn_share_path): 41 | set_share_path(dn_share_path) 42 | for i in range(10): 43 | copy('copyEmulator-'+i) 44 | time.sleep(10) --------------------------------------------------------------------------------