-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathAdd_profile.py
179 lines (145 loc) · 4.28 KB
/
Add_profile.py
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
import yaml
from USBFlow_Soer import *
'''
添加设备的模板,注意:需要添加到对应的公司
如果列表中没有该公司,需要手动加公司的ID和Name,
如果时间紧急,可以直接将流量的压缩包发到[email protected]就行,谢谢师傅的支持
- Device_ID: ""
Device_Name: ""
Device_Type: ""
Device_DefName: ""
添加的时候请师傅注意大小写和缩进;
添加完成只需要工具目录下执行一次即可
如果是未添加过的Unknown的设备,如下是添加新设备的模版
"Company_ID":
Company_ID: ""
Device_ID: ""
Device_Type: ""
Device_DefName: ""
'''
des_dir = '''
Company_List:
- "0x046d": "LOG"
"0x056a": "WACOM"
"0x1532": "Razer"
"0x05ac": "Apple"
"0x18f8": "Maxxter"
"0x248a": "Maxxter"
LOG:
- Company_ID: "0x046d"
Company_name: "Logitech, Inc."
- Device_ID: "0xc539"
Device_Name: "Lightspeed Receiver"
Device_Type: "Mouse"
Device_DefName: "LOG_Lightspeed_Reveiver"
- Device_ID: "0xc07e"
Device_Name: "G402 Gaming Mouse"
Device_Type: "Mouse"
Device_DefName: "G402_Gaming_Mouse"
- Device_ID: "0xc08b"
Device_Name: "Logitech G502 SE HERO Gaming Mouse"
Device_Type: "Mouse"
Device_DefName: "LOG_G502_MOUSE"
- Device_ID: "0xc077"
Device_Name: "Logitech Mouse"
Device_Type: "Mouse"
Device_DefName: "Mouse"
- Device_ID: "0xc341"
Device_Name: "Logitech Unknow Keyboard Type"
Device_Type: "KeyBoard"
Device_DefName: "Unknown_keyboard"
- Device_ID: "0xc53f"
Device_Name: "G304 Wireless"
Device_Type: "Mouse"
Device_DefName: "G304_Wireless"
- Device_ID: "0xc09d"
Device_Name: "G102 Wire"
Device_Type: "Mouse"
Device_DefName: "G102_Wire"
- Device_ID: "0xc05a"
Device_Name: "M90/M100 Optical Mouse"
Device_Type: "Mouse"
Device_DefName: "M90_M100_Mouse"
- Device_ID: "0xc092"
Device_Name: "G102/G203 LIGHTSYNC Gaming Mouse"
Device_Type: "Mouse"
Device_DefName: "G402_Gaming_Mouse"
Maxxter:
- Company_ID: "0x18f8"
Company_name: "Maxxter"
- Device_ID: "0x0f97"
Device_Name: "Optical Gaming Mouse [Xtrem]"
Device_Type: "Mouse"
Device_DefName: "Maxxter_OpticalGaming_Mouse"
- Device_ID: "0x8366"
Device_Name: "Wireless Optical Mouse ACT-MUSW-002"
Device_Type: "Mouse"
Device_DefName: "Wireless_Optical_Mouse_ACT"
WACOM:
- Company_ID: "0x056a"
Company_name: "Wacom Co., Ltd"
- Device_ID: "0x030e"
Device_Name: "CTL-480 [Intuos Pen (S)]"
Device_Type: "wacom"
Device_DefName: "CTL_480"
- Device_ID: "0x0357"
Device_Name: "PTH-660 [Intuos Pro (M)]"
Device_Type: "wacom"
Device_DefName: "PTH_660"
Razer:
- Company_ID: "0x1532"
Company_name: "Razer USA, Ltd"
- Device_ID: "0x0083"
Device_Name: "RC30-0315, Gaming Mouse [Basilisk x HyperSpeed]"
Device_Type: "Mouse"
Device_DefName: "Basilisk_Mouse"
- Device_ID: "0x004f"
Device_Name: "RZ01-0145, Gaming Mouse [DeathAdder 2000 (Alternate)]"
Device_Type: "Mouse"
Device_DefName: "DeathAdder_Mouse"
- Device_ID: "0x0098"
Device_Name: "Razer UnknownType Mouse"
Device_Type: "Mouse"
Device_DefName: "Razer_UnkownType_Mouse"
- Device_ID: "0x0094"
Device_Name: "Razer UnknownType Mouse 2"
Device_Type: "Mouse"
Device_DefName: "Razer_UnkownType_Mouse2"
Apple:
- Company_ID: "0x05ac"
Company_name: "Apple, Inc."
- Device_ID: "0x024f"
Device_Name: "Aluminium Keyboard (ANSI)"
Device_Type: "KeyBoard"
Device_DefName: "ANSI"
HP:
- Company_ID: "0x03f0"
Company_name: "HP, Inc"
Unknown:
"0x256c":
Company_ID: "0x256c"
Device_ID: "0x006d"
Device_Type: "Wacom Like"
Device_DefName: "Wacom_Like_1"
"0x093a":
Company_ID: "0x093a"
Device_ID: "0x2530"
Device_Type: "Mouse Like"
Device_DefName: "Mouse_Like_1"
"0x2341":
Company_ID: "0x2341"
Device_ID: "0x8036"
Device_Type: "Keyboard Like"
Device_DefName: "KeyBoard_Like_1"
Default:
- type: "Mouse"
datalen: 8
name: "Default Mouse"
- type: "KeyBoard"
datalen: 16
name: "Default KeyBoard"
'''
dict_var = yaml.safe_load(des_dir)
with open("./profile.yaml" ,"w" ,encoding="utf-8") as f:
yaml.dump(dict_var ,f ,default_flow_style=False)
print("[+] 更新profile.yaml成功")