├── .gitignore ├── README.md ├── gameloop.py ├── images ├── 1721906871062.jpg ├── 1721906900270.jpg ├── avatar │ ├── PUBG2.png │ ├── head.ico │ ├── pubg.png │ ├── pubg_act.png │ ├── steam.png │ ├── steam_act.png │ └── tips.png ├── chi_sim │ ├── backhome1.jpg │ ├── backhome1_act.jpg │ ├── backhome2.jpg │ ├── backhome2_act.jpg │ ├── backhome3.jpg │ ├── backhome3_act.jpg │ ├── backhome4.jpg │ ├── backhome4_act.jpg │ ├── game.jpg │ ├── home.jpg │ ├── loading.jpg │ ├── loading1.jpg │ ├── start.jpg │ └── start_act.jpg ├── chi_sim_1080 │ ├── backhome1.jpg │ ├── backhome1_act.jpg │ ├── backhome2.jpg │ ├── backhome2_act.jpg │ ├── backhome3.jpg │ ├── backhome3_act.jpg │ ├── backhome4.jpg │ ├── backhome4_act.jpg │ ├── game.jpg │ ├── home.jpg │ ├── loading.jpg │ ├── loading1.jpg │ ├── start.jpg │ └── start_act.jpg ├── chi_sim_4k │ ├── backhome1.jpg │ ├── backhome1_act.jpg │ ├── backhome2.jpg │ ├── backhome2_act.jpg │ ├── backhome3.jpg │ ├── backhome3_act.jpg │ ├── backhome4.jpg │ ├── backhome4_act.jpg │ ├── game.jpg │ ├── home.jpg │ ├── loading.jpg │ ├── loading1.jpg │ ├── start.jpg │ └── start_act.jpg └── test │ └── 1.jpg ├── main.py ├── main.spec ├── myopencv ├── __init__.py └── myopencv.py ├── requirements.txt ├── template ├── m2.py ├── tips.py └── updatelog.py ├── test └── test.py ├── ui ├── main.py ├── main.ui ├── tips.py └── updatelog.py └── upx-4.2.4-win64 ├── COPYING ├── LICENSE ├── NEWS ├── README ├── THANKS.txt ├── upx-doc.html ├── upx-doc.txt ├── upx.1 └── upx.exe /.gitignore: -------------------------------------------------------------------------------- 1 | /logs 2 | logs 3 | 4 | .venv 5 | .venv/ 6 | __pycache__ 7 | __pycache__/ 8 | 9 | output/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1. 运行环境 4 | 5 | python3.10 以上 [下载python](python.org) 6 | 7 | 8 | ``` 9 | python -m venv .venv 10 | .\.venv\Scripts\activate 11 | pip install -r requirements.txt 12 | python main.py 13 | ``` 14 | 15 | 逐行执行 16 | 17 | 18 | 2. 打包 19 | 20 | ``` 21 | auto-py-to-exe 22 | ``` 23 | 24 | ![](./images/1721906871062.jpg) 25 | ![](./images/1721906900270.jpg) -------------------------------------------------------------------------------- /gameloop.py: -------------------------------------------------------------------------------- 1 | import os 2 | import time 3 | 4 | import pyautogui 5 | import pydirectinput 6 | from myopencv.myopencv import ImageFinder 7 | 8 | 9 | class GameState: 10 | HOME = "home" 11 | START = "start" 12 | LOADING = "loading" 13 | LOADING1 = "loading1" 14 | GAME = "game" 15 | BACKHOME1 = "backhome1" 16 | BACKHOME2 = "backhome2" 17 | BACKHOME3 = "backhome3" 18 | BACKHOME4 = "backhome4" 19 | BACKHOMEALL = "backhomeall" 20 | 21 | 22 | class gameloop: 23 | def __init__(self): 24 | self.is_state = False 25 | self.c = None 26 | 27 | def gameLoop(self, timeout=5, flaytimeout=25, imgopcv=0.8, saveLog=True): 28 | clash = ImageFinder(imgopcv) 29 | images = self.getImagesMap() 30 | # 检查资源文件 31 | for key, value in images.items(): 32 | if isinstance(value, list): 33 | for item in value: 34 | if not os.path.exists(item): 35 | print(f"资源文件不存在: {item}") 36 | self._mylogs(f"资源文件不存在: {item}") 37 | else: 38 | if not os.path.exists(value): 39 | print(f"资源文件不存在: {value}") 40 | self._mylogs(f"资源文件不存在: {value}") 41 | # 禁用掉 pyoutoui 的检测机制 42 | pyautogui.FAILSAFE = False 43 | pydirectinput.FAILSAFE = False 44 | # 游戏中等号状态 45 | running = False 46 | self.is_state = True 47 | print("game loop start") 48 | self._mylogs("game loop start") 49 | try: 50 | loopNumber = 0 51 | while self.is_state: 52 | loopNumber += 1 53 | time.sleep(timeout) 54 | # 是否在主页 55 | if clash.find_image_all(images[GameState.HOME]) and self.is_state: 56 | print("在主页") 57 | self._mylogs("在主页") 58 | # 找到开始游戏 59 | result = clash.find_images_all(images[GameState.START]) 60 | if result: 61 | print(f"Found image at screen coordinates: {result}") 62 | pyautogui.moveTo(result[0], result[1]) 63 | pyautogui.click() 64 | 65 | # 是否在匹配状态 66 | if clash.find_image_all(images[GameState.LOADING]) and self.is_state: 67 | print("匹配中") 68 | self._mylogs("匹配中") 69 | # 是否在等待加入玩家状态 70 | if clash.find_image_all(images[GameState.LOADING1]) and self.is_state: 71 | print("等待加入玩家") 72 | self._mylogs("等待加入玩家") 73 | # 是否在游戏中 74 | if clash.find_image_all(images[GameState.GAME]) and self.is_state: 75 | print("游戏中") 76 | self._mylogs("游戏中") 77 | time.sleep(flaytimeout) 78 | while clash.find_image_all(images[GameState.GAME]) and self.is_state: 79 | # 按下f键 80 | pydirectinput.press("f") 81 | time.sleep(1) 82 | pydirectinput.press("=") 83 | time.sleep(1) 84 | # 按下空格键 85 | pydirectinput.press("space") 86 | time.sleep(1) 87 | # 单击鼠标左键 88 | pydirectinput.click() 89 | time.sleep(7) 90 | else: 91 | # 判断是否有返回主页的按钮 92 | if clash.find_images_all(images[GameState.BACKHOMEALL]) and self.is_state: 93 | self._mylogs("返回主页中") 94 | # 等待返回主页3并点击返回主页3 95 | while self.is_state: 96 | # 点击返回主页 返回至大厅 97 | result = clash.find_image_all(images[GameState.BACKHOME1]) 98 | if result and self.is_state: 99 | pyautogui.moveTo(result[0], result[1]) 100 | pyautogui.click() 101 | time.sleep(1) 102 | pyautogui.moveTo(300, 300) 103 | # 点击返回主页2 确认 104 | result = clash.find_image_all(images[GameState.BACKHOME2]) 105 | if result and self.is_state: 106 | pyautogui.moveTo(result[0], result[1]) 107 | pyautogui.click() 108 | time.sleep(1) 109 | pyautogui.moveTo(300, 300) 110 | # 点击返回主页3 继续 111 | if clash.find_image_all(images[GameState.BACKHOME3]) and self.is_state: 112 | result = clash.find_image_all(images[GameState.BACKHOME3]) 113 | if result: 114 | pyautogui.moveTo(result[0], result[1]) 115 | pyautogui.click() 116 | time.sleep(1) 117 | pyautogui.moveTo(300, 300) 118 | # 点击返回主页4mm 关闭 119 | if clash.find_image_all(images[GameState.BACKHOME4]) and self.is_state: 120 | result = clash.find_image_all(images[GameState.BACKHOME4]) 121 | if result: 122 | pyautogui.moveTo(result[0], result[1]) 123 | pyautogui.click() 124 | time.sleep(1) 125 | # 判断是否在主页 126 | if clash.find_image_all(images[GameState.HOME]) and self.is_state: 127 | break 128 | if self.is_state: 129 | self._mylogs(f"第 {loopNumber} 次检查", 2) 130 | except Exception as e: 131 | self._mylogs("异常退出 请从新开启", 2) 132 | self._mylogs("game loop end") 133 | 134 | def getImagesMap(self): 135 | home = "./images/chi_sim/home.jpg" 136 | start = ["./images/chi_sim/start.jpg", "./images/chi_sim/start_act.jpg"] 137 | loading = "./images/chi_sim/loading.jpg" 138 | loading1 = "./images/chi_sim/loading1.jpg" 139 | game = "./images/chi_sim/game.jpg" 140 | backhome1 = "./images/chi_sim/backhome1.jpg" 141 | backhome2 = "./images/chi_sim/backhome2.jpg" 142 | backhome3 = "./images/chi_sim/backhome3.jpg" 143 | backhome4 = "./images/chi_sim/backhome4.jpg" 144 | home_1080 = "./images/chi_sim_1080/home.jpg" 145 | start_1080 = ["./images/chi_sim_1080/start.jpg", "./images/chi_sim_1080/start_act.jpg"] 146 | loading_1080 = "./images/chi_sim_1080/loading.jpg" 147 | loading1_1080 = "./images/chi_sim_1080/loading1.jpg" 148 | game_1080 = "./images/chi_sim_1080/game.jpg" 149 | backhome1_1080 = "./images/chi_sim_1080/backhome1.jpg" 150 | backhome2_1080 = "./images/chi_sim_1080/backhome2.jpg" 151 | backhome3_1080 = "./images/chi_sim_1080/backhome3.jpg" 152 | backhome4_1080 = "./images/chi_sim_1080/backhome4.jpg" 153 | home_4k = "./images/chi_sim_4k/home.jpg" 154 | start_4k = ["./images/chi_sim_4k/start.jpg", "./images/chi_sim_4k/start_act.jpg"] 155 | loading_4k = "./images/chi_sim_4k/loading.jpg" 156 | loading1_4k = "./images/chi_sim_4k/loading1.jpg" 157 | game_4k = "./images/chi_sim_4k/game.jpg" 158 | backhome1_4k = "./images/chi_sim_4k/backhome1.jpg" 159 | backhome2_4k = "./images/chi_sim_4k/backhome2.jpg" 160 | backhome3_4k = "./images/chi_sim_4k/backhome3.jpg" 161 | backhome4_4k = "./images/chi_sim_4k/backhome4.jpg" 162 | # 获取 ./images/chi_sim/home.jpg 绝对路径 163 | home = os.path.abspath(os.path.join(os.path.dirname(__file__), home)) 164 | start = [os.path.abspath(os.path.join(os.path.dirname(__file__), item)) for item in start] 165 | loading = os.path.abspath(os.path.join(os.path.dirname(__file__), loading)) 166 | loading1 = os.path.abspath(os.path.join(os.path.dirname(__file__), loading1)) 167 | game = os.path.abspath(os.path.join(os.path.dirname(__file__), game)) 168 | backhome1 = os.path.abspath(os.path.join(os.path.dirname(__file__), backhome1)) 169 | backhome2 = os.path.abspath(os.path.join(os.path.dirname(__file__), backhome2)) 170 | backhome3 = os.path.abspath(os.path.join(os.path.dirname(__file__), backhome3)) 171 | backhome4 = os.path.abspath(os.path.join(os.path.dirname(__file__), backhome4)) 172 | # 获取 ./images/chi_sim_1080/home.jpg 绝对路径 173 | home_1080 = os.path.abspath(os.path.join(os.path.dirname(__file__), home_1080)) 174 | start_1080 = [os.path.abspath(os.path.join(os.path.dirname(__file__), item)) for item in start_1080] 175 | loading_1080 = os.path.abspath(os.path.join(os.path.dirname(__file__), loading_1080)) 176 | loading1_1080 = os.path.abspath(os.path.join(os.path.dirname(__file__), loading1_1080)) 177 | game_1080 = os.path.abspath(os.path.join(os.path.dirname(__file__), game_1080)) 178 | backhome1_1080 = os.path.abspath(os.path.join(os.path.dirname(__file__), backhome1_1080)) 179 | backhome2_1080 = os.path.abspath(os.path.join(os.path.dirname(__file__), backhome2_1080)) 180 | backhome3_1080 = os.path.abspath(os.path.join(os.path.dirname(__file__), backhome3_1080)) 181 | backhome4_1080 = os.path.abspath(os.path.join(os.path.dirname(__file__), backhome4_1080)) 182 | # 获取 ./images/chi_sim_4k/home 绝对路径 183 | home_4k = os.path.abspath(os.path.join(os.path.dirname(__file__), home_4k)) 184 | start_4k = [os.path.abspath(os.path.join(os.path.dirname(__file__), item)) for item in start_4k] 185 | loading_4k = os.path.abspath(os.path.join(os.path.dirname(__file__), loading_4k)) 186 | loading1_4k = os.path.abspath(os.path.join(os.path.dirname(__file__), loading1_4k)) 187 | game_4k = os.path.abspath(os.path.join(os.path.dirname(__file__), game_4k)) 188 | backhome1_4k = os.path.abspath(os.path.join(os.path.dirname(__file__), backhome1_4k)) 189 | backhome2_4k = os.path.abspath(os.path.join(os.path.dirname(__file__), backhome2_4k)) 190 | backhome3_4k = os.path.abspath(os.path.join(os.path.dirname(__file__), backhome3_4k)) 191 | backhome4_4k = os.path.abspath(os.path.join(os.path.dirname(__file__), backhome4_4k)) 192 | 193 | 194 | # 获取当前屏幕宽度 195 | screen_width = pyautogui.size().width 196 | if screen_width >= 1920 and screen_width < 2560: 197 | return { 198 | "home": home_1080, 199 | "start": start_1080, 200 | "loading": loading_1080, 201 | "loading1": loading1_1080, 202 | "game": game_1080, 203 | "backhome1": backhome1_1080, 204 | "backhome2": backhome2_1080, 205 | "backhome3": backhome3_1080, 206 | "backhome4": backhome4_1080, 207 | "backhomeall": [backhome1_1080, backhome2_1080, backhome3_1080, backhome4_1080] 208 | } 209 | elif screen_width > 1920 and screen_width <= 2560: 210 | return { 211 | "home": home, 212 | "start": start, 213 | "loading": loading, 214 | "loading1": loading1, 215 | "game": game, 216 | "backhome1": backhome1, 217 | "backhome2": backhome2, 218 | "backhome3": backhome3, 219 | "backhome4": backhome4, 220 | "backhomeall": [backhome1, backhome2, backhome3, backhome4] 221 | } 222 | elif screen_width >2560: 223 | return { 224 | "home": home_4k, 225 | "start": start_4k, 226 | "loading": loading_4k, 227 | "loading1": loading1_4k, 228 | "game": game_4k, 229 | "backhome1": backhome1_4k, 230 | "backhome2": backhome2_4k, 231 | "backhome3": backhome3_4k, 232 | "backhome4": backhome4_4k, 233 | "backhomeall": [backhome1_4k, backhome2_4k, backhome3_4k, backhome4_4k] 234 | } 235 | 236 | def setState(self, state): 237 | self.is_state = state 238 | 239 | def getState(self): 240 | return self.is_state 241 | 242 | # 判断是否开启某个进程 243 | def isProcessRunning(self, processName): 244 | if os.system(f"tasklist | findstr {processName}"): 245 | return True 246 | else: 247 | return False 248 | 249 | # 通用日志方法 250 | def _mylogs(self, message, type=1): 251 | if type == 1: 252 | self.c(message) 253 | else: 254 | self.c2(message) 255 | 256 | def setCllback(self, c): 257 | self.c = c 258 | 259 | def setCllback2(self, c2): 260 | self.c2 = c2 261 | 262 | 263 | if __name__ == '__main__': 264 | game = gameloop() 265 | getimg = ImageFinder() 266 | images = game.getImagesMap() 267 | # print(images[GameState.BACKHOME3]) 268 | _images = "./images/test/1.jpg" 269 | print(_images) 270 | result = getimg.find_image_all(_images) 271 | pyautogui.moveTo(result[0], result[1]) 272 | print(result) 273 | -------------------------------------------------------------------------------- /images/1721906871062.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/1721906871062.jpg -------------------------------------------------------------------------------- /images/1721906900270.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/1721906900270.jpg -------------------------------------------------------------------------------- /images/avatar/PUBG2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/avatar/PUBG2.png -------------------------------------------------------------------------------- /images/avatar/head.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/avatar/head.ico -------------------------------------------------------------------------------- /images/avatar/pubg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/avatar/pubg.png -------------------------------------------------------------------------------- /images/avatar/pubg_act.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/avatar/pubg_act.png -------------------------------------------------------------------------------- /images/avatar/steam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/avatar/steam.png -------------------------------------------------------------------------------- /images/avatar/steam_act.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/avatar/steam_act.png -------------------------------------------------------------------------------- /images/avatar/tips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/avatar/tips.png -------------------------------------------------------------------------------- /images/chi_sim/backhome1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim/backhome1.jpg -------------------------------------------------------------------------------- /images/chi_sim/backhome1_act.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim/backhome1_act.jpg -------------------------------------------------------------------------------- /images/chi_sim/backhome2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim/backhome2.jpg -------------------------------------------------------------------------------- /images/chi_sim/backhome2_act.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim/backhome2_act.jpg -------------------------------------------------------------------------------- /images/chi_sim/backhome3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim/backhome3.jpg -------------------------------------------------------------------------------- /images/chi_sim/backhome3_act.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim/backhome3_act.jpg -------------------------------------------------------------------------------- /images/chi_sim/backhome4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim/backhome4.jpg -------------------------------------------------------------------------------- /images/chi_sim/backhome4_act.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim/backhome4_act.jpg -------------------------------------------------------------------------------- /images/chi_sim/game.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim/game.jpg -------------------------------------------------------------------------------- /images/chi_sim/home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim/home.jpg -------------------------------------------------------------------------------- /images/chi_sim/loading.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim/loading.jpg -------------------------------------------------------------------------------- /images/chi_sim/loading1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim/loading1.jpg -------------------------------------------------------------------------------- /images/chi_sim/start.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim/start.jpg -------------------------------------------------------------------------------- /images/chi_sim/start_act.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim/start_act.jpg -------------------------------------------------------------------------------- /images/chi_sim_1080/backhome1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_1080/backhome1.jpg -------------------------------------------------------------------------------- /images/chi_sim_1080/backhome1_act.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_1080/backhome1_act.jpg -------------------------------------------------------------------------------- /images/chi_sim_1080/backhome2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_1080/backhome2.jpg -------------------------------------------------------------------------------- /images/chi_sim_1080/backhome2_act.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_1080/backhome2_act.jpg -------------------------------------------------------------------------------- /images/chi_sim_1080/backhome3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_1080/backhome3.jpg -------------------------------------------------------------------------------- /images/chi_sim_1080/backhome3_act.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_1080/backhome3_act.jpg -------------------------------------------------------------------------------- /images/chi_sim_1080/backhome4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_1080/backhome4.jpg -------------------------------------------------------------------------------- /images/chi_sim_1080/backhome4_act.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_1080/backhome4_act.jpg -------------------------------------------------------------------------------- /images/chi_sim_1080/game.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_1080/game.jpg -------------------------------------------------------------------------------- /images/chi_sim_1080/home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_1080/home.jpg -------------------------------------------------------------------------------- /images/chi_sim_1080/loading.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_1080/loading.jpg -------------------------------------------------------------------------------- /images/chi_sim_1080/loading1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_1080/loading1.jpg -------------------------------------------------------------------------------- /images/chi_sim_1080/start.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_1080/start.jpg -------------------------------------------------------------------------------- /images/chi_sim_1080/start_act.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_1080/start_act.jpg -------------------------------------------------------------------------------- /images/chi_sim_4k/backhome1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_4k/backhome1.jpg -------------------------------------------------------------------------------- /images/chi_sim_4k/backhome1_act.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_4k/backhome1_act.jpg -------------------------------------------------------------------------------- /images/chi_sim_4k/backhome2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_4k/backhome2.jpg -------------------------------------------------------------------------------- /images/chi_sim_4k/backhome2_act.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_4k/backhome2_act.jpg -------------------------------------------------------------------------------- /images/chi_sim_4k/backhome3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_4k/backhome3.jpg -------------------------------------------------------------------------------- /images/chi_sim_4k/backhome3_act.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_4k/backhome3_act.jpg -------------------------------------------------------------------------------- /images/chi_sim_4k/backhome4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_4k/backhome4.jpg -------------------------------------------------------------------------------- /images/chi_sim_4k/backhome4_act.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_4k/backhome4_act.jpg -------------------------------------------------------------------------------- /images/chi_sim_4k/game.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_4k/game.jpg -------------------------------------------------------------------------------- /images/chi_sim_4k/home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_4k/home.jpg -------------------------------------------------------------------------------- /images/chi_sim_4k/loading.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_4k/loading.jpg -------------------------------------------------------------------------------- /images/chi_sim_4k/loading1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_4k/loading1.jpg -------------------------------------------------------------------------------- /images/chi_sim_4k/start.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_4k/start.jpg -------------------------------------------------------------------------------- /images/chi_sim_4k/start_act.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/chi_sim_4k/start_act.jpg -------------------------------------------------------------------------------- /images/test/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/images/test/1.jpg -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | from PyQt6 import QtWidgets,QtGui 4 | from template.m2 import Ui_mainWindow 5 | 6 | if __name__ == "__main__": 7 | iconPath = os.path.abspath(os.path.join(os.path.dirname(__file__), "./images/avatar/head.ico")) 8 | app = QtWidgets.QApplication(sys.argv) 9 | app.setWindowIcon(QtGui.QIcon(iconPath)) 10 | mainWindow = QtWidgets.QMainWindow() 11 | ui = Ui_mainWindow() 12 | ui.setupUi(mainWindow) 13 | mainWindow.show() 14 | sys.exit(app.exec()) 15 | -------------------------------------------------------------------------------- /main.spec: -------------------------------------------------------------------------------- 1 | # -*- mode: python ; coding: utf-8 -*- 2 | 3 | 4 | a = Analysis( 5 | ['main.py'], 6 | pathex=[], 7 | binaries=[], 8 | datas=[], 9 | hiddenimports=[], 10 | hookspath=[], 11 | hooksconfig={}, 12 | runtime_hooks=[], 13 | excludes=[], 14 | noarchive=False, 15 | optimize=0, 16 | ) 17 | pyz = PYZ(a.pure) 18 | 19 | exe = EXE( 20 | 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 | disable_windowed_traceback=False, 31 | argv_emulation=False, 32 | target_arch=None, 33 | codesign_identity=None, 34 | entitlements_file=None, 35 | ) 36 | coll = COLLECT( 37 | exe, 38 | a.binaries, 39 | a.datas, 40 | strip=False, 41 | upx=True, 42 | upx_exclude=[], 43 | name='main', 44 | ) 45 | -------------------------------------------------------------------------------- /myopencv/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/myopencv/__init__.py -------------------------------------------------------------------------------- /myopencv/myopencv.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import matplotlib.pyplot as plt 3 | import numpy as np 4 | import pyautogui 5 | 6 | 7 | class ImageFinder: 8 | def __init__(self, imgopcv): 9 | self.imgopcv = imgopcv 10 | self.screen_width, self.screen_height = pyautogui.size() 11 | 12 | # 相对于某个坐标系的屏幕截取 13 | def find_image_in_screen( 14 | self, image_path, top_left_right_pct, bottom_left_right_pct 15 | ): 16 | try: 17 | # 计算截取区域的坐标 18 | left = int(self.screen_width * top_left_right_pct[0]) 19 | top = int(self.screen_height * top_left_right_pct[1]) 20 | right = int(self.screen_width * bottom_left_right_pct[0]) 21 | bottom = int(self.screen_height * bottom_left_right_pct[1]) 22 | 23 | # 截取屏幕图像的特定区域 24 | screenshot = pyautogui.screenshot( 25 | region=(left, top, right - left, bottom - top) 26 | ) 27 | screen_np = np.array(screenshot) 28 | img_rgb = cv2.cvtColor(screen_np, cv2.COLOR_RGB2BGR) 29 | image_path = plt.imread(image_path) 30 | # 读取目标图片并转换为灰度图 31 | template = cv2.imread( 32 | image_path, cv2.IMREAD_GRAYSCALE 33 | ) # 使用cv2.IMREAD_GRAYSCALE确保以灰度图读取 34 | if template is None: 35 | print( 36 | f"Error loading image '{image_path}'. Check the file path and integrity." 37 | ) 38 | return None 39 | w, h = template.shape[::-1] 40 | 41 | # 将屏幕图像转换为灰度图 42 | img_gray = cv2.cvtColor(img_rgb, cv2.COLOR_BGR2GRAY) 43 | 44 | # 模板匹配 45 | res = cv2.matchTemplate(img_gray, template, cv2.TM_CCOEFF_NORMED) 46 | 47 | # 设定匹配阈值 48 | threshold = self.imgopcv 49 | loc = np.where(res >= threshold) 50 | 51 | # 寻找最佳匹配位置 52 | if len(loc[0]) > 0: 53 | # 找到最大值的索引 54 | pt = np.unravel_index( 55 | res.argmax(), res.shape 56 | ) # 使用 argmax 找到最大值的索引 57 | 58 | # 计算匹配区域的中心点坐标 59 | center_point = ( 60 | pt[1] + w / 2, 61 | pt[0] + h / 2, 62 | ) # pt[1] 是列索引,pt[0] 是行索引 63 | return center_point 64 | # 如果没有找到匹配,则返回None 65 | return None 66 | except Exception as e: 67 | print(f"An error occurred: {e}") 68 | return None 69 | 70 | # 相对于整个屏幕的屏幕截取 71 | def find_image_all(self, image_path): 72 | try: 73 | # 截取屏幕图像的特定区域 74 | screenshot = pyautogui.screenshot() 75 | screen_np = np.array(screenshot) 76 | img_rgb = cv2.cvtColor(screen_np, cv2.COLOR_RGB2BGR) 77 | # 读取目标图片并转换为灰度图 78 | # image_path = plt.imread(image_path) 79 | # image_path = f"{image_path}".encode("utf-8") 80 | image_path = f"{image_path}" 81 | print("image_path", ) 82 | template = cv2.imdecode(np.fromfile(image_path, dtype=np.uint8), cv2.IMREAD_GRAYSCALE) 83 | # template = cv2.imread( 84 | # np.fromfile(image_path, dtype=np.uint8), cv2.IMREAD_GRAYSCALE 85 | # ) # 使用cv2.IMREAD_GRAYSCALE确保以灰度图读取 86 | if template is None: 87 | print( 88 | f"Error loading image '{image_path}'. Check the file path and integrity." 89 | ) 90 | return None 91 | w, h = template.shape[::-1] 92 | 93 | # 将屏幕图像转换为灰度图 94 | img_gray = cv2.cvtColor(img_rgb, cv2.COLOR_BGR2GRAY) 95 | 96 | # 模板匹配 97 | res = cv2.matchTemplate(img_gray, template, cv2.TM_CCOEFF_NORMED) 98 | 99 | # 设定匹配阈值 100 | threshold = self.imgopcv 101 | loc = np.where(res >= threshold) 102 | 103 | # 寻找最佳匹配位置 104 | if len(loc[0]) > 0: 105 | # 找到最大值的索引 106 | pt = np.unravel_index( 107 | res.argmax(), res.shape 108 | ) # 使用 argmax 找到最大值的索引 109 | 110 | # 计算匹配区域的中心点坐标 111 | center_point = ( 112 | pt[1] + w / 2, 113 | pt[0] + h / 2, 114 | ) # pt[1] 是列索引,pt[0] 是行索引 115 | return center_point 116 | # 如果没有找到匹配,则返回None 117 | return None 118 | except Exception as e: 119 | print(f"An error occurred: {e}") 120 | return None 121 | 122 | # 相对于整个屏幕截取找多张图 123 | def find_images_all(self, image_paths): 124 | try: 125 | # 截取屏幕图像的特定区域 126 | screenshot = pyautogui.screenshot() 127 | screen_np = np.array(screenshot) 128 | img_rgb = cv2.cvtColor(screen_np, cv2.COLOR_RGB2BGR) 129 | 130 | # 循环遍历提供的图片路径列表 131 | for image_path in image_paths: 132 | # image_path = plt.imread(image_path) 133 | # 读取目标图片并转换为灰度图 134 | image_path = f"{image_path}" 135 | template = cv2.imdecode(np.fromfile(image_path, dtype=np.uint8), cv2.IMREAD_GRAYSCALE) 136 | if template is None: 137 | print( 138 | f"Error loading image '{image_path}'. Check the file path and integrity." 139 | ) 140 | continue # 如果图片加载失败,跳过这张图片 141 | 142 | w, h = template.shape[::-1] # 获取图片的宽度和高度 143 | 144 | # 将屏幕图像转换为灰度图 145 | img_gray = cv2.cvtColor(img_rgb, cv2.COLOR_BGR2GRAY) 146 | 147 | # 模板匹配 148 | res = cv2.matchTemplate(img_gray, template, cv2.TM_CCOEFF_NORMED) 149 | 150 | # 设定匹配阈值 151 | threshold = self.imgopcv 152 | loc = np.where(res >= threshold) 153 | 154 | # 寻找最佳匹配位置 155 | if len(loc[0]) > 0: 156 | # 找到最大值的索引 157 | pt = np.unravel_index(res.argmax(), res.shape) 158 | 159 | # 计算匹配区域的中心点坐标 160 | center_point = (pt[1] + w // 2, pt[0] + h // 2) 161 | return center_point # 返回第一张找到的图片的中心点坐标 162 | 163 | # 如果没有找到匹配,则返回None 164 | return None 165 | except Exception as e: 166 | print(f"An error occurred: {e}") 167 | return None 168 | 169 | 170 | # 使用示例 171 | if __name__ == "__main__": 172 | finder = ImageFinder() 173 | target_image_path = "../images/kaishi.jpg" 174 | search_area_percentages = ( 175 | (0.1, 0.1), # 顶部 left right 176 | (0.9, 0.1), # 底部 left right 177 | ) 178 | result = finder.find_image_in_screen(target_image_path, search_area_percentages) 179 | if result is not None: 180 | print(f"Found image at screen coordinates: {result}") 181 | else: 182 | print("No match found.") 183 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/requirements.txt -------------------------------------------------------------------------------- /template/m2.py: -------------------------------------------------------------------------------- 1 | # Form implementation generated from reading ui file '.\ui\main.ui' 2 | # 3 | # Created by: PyQt6 UI code generator 6.4.2 4 | # 5 | # WARNING: Any manual changes made to this file will be lost when pyuic6 is 6 | # run again. Do not edit this file unless you know what you are doing. 7 | 8 | 9 | import datetime 10 | import json 11 | import logging 12 | import os 13 | import sys 14 | import threading 15 | 16 | import requests 17 | from PyQt6 import QtCore, QtGui, QtWidgets 18 | from PyQt6.QtCore import QThread, pyqtSignal 19 | from PyQt6.QtWidgets import QMainWindow 20 | 21 | # from gameloop import gameLoop 22 | # 引入 上层文件夹的 gameloop.py 中的 gameloop类 23 | from gameloop import gameloop 24 | from template.tips import Ui_Form 25 | from template.updatelog import Up_data_log 26 | 27 | # 生成 ..\config\config.json 文件的绝对路径 28 | configPath = os.path.abspath( 29 | os.path.join(os.path.dirname(__file__), "../config/config.json") 30 | ) 31 | 32 | # 构建 config.json 的正确路径 33 | print("configPath:", configPath) 34 | 35 | # 读取 ../config/config.json 文件 并将变量赋值给 config 36 | globGameloop = gameloop() 37 | # 定义一个旧的窗体文案值 38 | oldText = "" 39 | oldText2 = "" 40 | 41 | try: 42 | from ctypes import windll # Only exists on Windows. 43 | 44 | myappid = "mycompany.myproduct.subproduct.version" 45 | windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid) 46 | except ImportError: 47 | pass 48 | 49 | 50 | class ChineseLogger: 51 | def __init__(self, log_name, log_dir="./logs", log_level=logging.INFO): 52 | self.log_name = log_name 53 | self.log_dir = log_dir 54 | self.log_level = log_level 55 | self._setup_logging() 56 | 57 | def _setup_logging(self): 58 | # 创建日志目录 59 | if not os.path.exists(self.log_dir): 60 | os.makedirs(self.log_dir) 61 | dt = datetime.datetime.now().strftime("%Y-%m-%d") 62 | file_name = f"{str(dt)}-{str(self.log_name)}.log" 63 | print(file_name) 64 | # 日志文件路径 65 | self.log_file = os.path.join(self.log_dir, file_name) 66 | 67 | # 创建一个logger 68 | self.logger = logging.getLogger(self.log_name) 69 | self.logger.setLevel(self.log_level) 70 | 71 | # 创建一个handler,用于写入日志文件 72 | file_handler = logging.FileHandler(self.log_file, "a", encoding="utf-8") 73 | file_handler.setLevel(self.log_level) 74 | 75 | # 创建一个formatter,用于设置日志格式 76 | formatter = logging.Formatter( 77 | "%(asctime)s - %(name)s - %(levelname)s - %(message)s" 78 | ) 79 | 80 | # 为logger添加handler 81 | self.logger.addHandler(file_handler) 82 | file_handler.setFormatter(formatter) 83 | 84 | def debug(self, msg): 85 | self.logger.debug(msg) 86 | 87 | def info(self, msg): 88 | self._setup_logging() 89 | print("info:", self.log_dir) 90 | self.logger.info(msg) 91 | 92 | def warning(self, msg): 93 | self.logger.warning(msg) 94 | 95 | def error(self, msg): 96 | self.logger.error(msg) 97 | 98 | def critical(self, msg): 99 | self.logger.critical(msg) 100 | 101 | def setLog_dir(self, log_dir): 102 | self.log_dir = log_dir 103 | 104 | 105 | class WorkerThread(QThread): 106 | finished_signal = pyqtSignal(str) 107 | # 第二个插槽 108 | finished_signal_loop = pyqtSignal(str) 109 | 110 | def run(self, timeout=5, flaytimeout=30, imgopcv=8, saveLog=True): 111 | self.gameloop = globGameloop 112 | self.gameloop.setCllback(self.callback) 113 | self.gameloop.setCllback2(self.callback2) 114 | # 创建子线程 执行 gameLoop 方法 115 | self.threadItem = threading.Thread( 116 | target=self.gameloop.gameLoop, 117 | args=(timeout, flaytimeout, imgopcv * 0.1, saveLog), 118 | ) 119 | self.threadItem.start() 120 | 121 | def callback(self, message): 122 | self.finished_signal.emit(message) 123 | 124 | def callback2(self, message): 125 | self.finished_signal_loop.emit(message) 126 | 127 | 128 | class Ui_mainWindow(QMainWindow): 129 | def __init__(self, parent=None): 130 | print("进入构造方法") 131 | super(Ui_mainWindow, self).__init__(parent=parent) 132 | # pubg 状态 133 | self.pubgState = False 134 | # steam 状态 135 | self.steamState = False 136 | 137 | self.gameloop = globGameloop 138 | # 实例化 WorkerThread 139 | self.worker_thread = WorkerThread() 140 | # 绑定 finished_signal 信号到 showLogs 方法 141 | self.worker_thread.finished_signal.connect(self.setStateHooks) 142 | # 绑定 finished_signal_loop 信号到 showLogs 方法 143 | self.worker_thread.finished_signal_loop.connect(self.setStateHooks2) 144 | # 实例化日志模块 145 | self.logger = None 146 | self.setupUi(self) 147 | 148 | def setupUi(self, mainWindow): 149 | # 获取 ../images/avatar/head.ico 的绝对路径变量 150 | self.iconPath = os.path.abspath( 151 | os.path.join(os.path.dirname(__file__), "../images/avatar/head.ico") 152 | ) 153 | # 获取 ../images/avatar/steam.png" 的绝对路径变量 154 | self.steamPath = os.path.abspath( 155 | os.path.join(os.path.dirname(__file__), "../images/avatar/steam.png") 156 | ) 157 | # 获取 ../images/avatar/pubg.png" 的绝对路径变量 158 | self.pubgPath = os.path.abspath( 159 | os.path.join(os.path.dirname(__file__), "../images/avatar/pubg.png") 160 | ) 161 | # 获取 ../images/avatar/tips.png" 的绝对路径变量 162 | self.tipsPath = os.path.abspath( 163 | os.path.join(os.path.dirname(__file__), "../images/avatar/tips.png") 164 | ) 165 | # 获取 ../images/avatar/steam_act.png" 的绝对路径变量 166 | self.steamActPath = os.path.abspath( 167 | os.path.join(os.path.dirname(__file__), "../images/avatar/steam_act.png") 168 | ) 169 | # 获取 ../images/avatar/pubg_act.png" 的绝对路径变量 170 | self.pubgActPath = os.path.abspath( 171 | os.path.join(os.path.dirname(__file__), "../images/avatar/pubg_act.png") 172 | ) 173 | mainWindow.setObjectName("mainWindow") 174 | mainWindow.resize(756, 267) 175 | font = QtGui.QFont() 176 | font.setPointSize(9) 177 | mainWindow.setFont(font) 178 | icon = QtGui.QIcon() 179 | icon.addPixmap( 180 | QtGui.QPixmap(self.iconPath), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off 181 | ) 182 | mainWindow.setWindowIcon(icon) 183 | self.centralwidget = QtWidgets.QWidget(parent=mainWindow) 184 | self.centralwidget.setObjectName("centralwidget") 185 | self.horizontalLayoutWidget = QtWidgets.QWidget(parent=self.centralwidget) 186 | self.horizontalLayoutWidget.setGeometry(QtCore.QRect(0, 10, 171, 41)) 187 | self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") 188 | self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget) 189 | self.horizontalLayout.setContentsMargins(20, 0, 0, 0) 190 | self.horizontalLayout.setObjectName("horizontalLayout") 191 | self.label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget) 192 | sizePolicy = QtWidgets.QSizePolicy( 193 | QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Minimum 194 | ) 195 | sizePolicy.setHorizontalStretch(0) 196 | sizePolicy.setVerticalStretch(0) 197 | sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) 198 | self.label.setSizePolicy(sizePolicy) 199 | self.label.setObjectName("label") 200 | self.horizontalLayout.addWidget(self.label) 201 | self.comboBox_2 = QtWidgets.QComboBox(parent=self.horizontalLayoutWidget) 202 | sizePolicy = QtWidgets.QSizePolicy( 203 | QtWidgets.QSizePolicy.Policy.Maximum, QtWidgets.QSizePolicy.Policy.Maximum 204 | ) 205 | sizePolicy.setHorizontalStretch(0) 206 | sizePolicy.setVerticalStretch(0) 207 | sizePolicy.setHeightForWidth(self.comboBox_2.sizePolicy().hasHeightForWidth()) 208 | self.comboBox_2.setSizePolicy(sizePolicy) 209 | self.comboBox_2.setObjectName("comboBox_2") 210 | self.horizontalLayout.addWidget(self.comboBox_2) 211 | self.label_2 = QtWidgets.QLabel(parent=self.centralwidget) 212 | self.label_2.setGeometry(QtCore.QRect(10, 60, 40, 40)) 213 | self.label_2.setText("") 214 | self.label_2.setPixmap(QtGui.QPixmap(self.steamPath)) 215 | self.label_2.setScaledContents(True) 216 | self.label_2.setObjectName("label_2") 217 | self.label_5 = QtWidgets.QLabel(parent=self.centralwidget) 218 | self.label_5.setGeometry(QtCore.QRect(68, 58, 44, 44)) 219 | self.label_5.setText("") 220 | self.label_5.setPixmap(QtGui.QPixmap(self.pubgPath)) 221 | self.label_5.setScaledContents(True) 222 | self.label_5.setObjectName("label_5") 223 | self.pushButton = QtWidgets.QPushButton(parent=self.centralwidget) 224 | self.pushButton.setGeometry(QtCore.QRect(130, 65, 60, 30)) 225 | self.pushButton.setObjectName("pushButton") 226 | self.label_6 = QtWidgets.QLabel(parent=self.centralwidget) 227 | self.label_6.setGeometry(QtCore.QRect(20, 180, 91, 21)) 228 | self.label_6.setObjectName("label_6") 229 | self.lineEdit = QtWidgets.QLineEdit(parent=self.centralwidget) 230 | self.lineEdit.setEnabled(False) 231 | self.lineEdit.setGeometry(QtCore.QRect(110, 180, 371, 20)) 232 | self.lineEdit.setObjectName("lineEdit") 233 | self.pushButton_2 = QtWidgets.QPushButton(parent=self.centralwidget) 234 | self.pushButton_2.setGeometry(QtCore.QRect(490, 180, 75, 20)) 235 | self.pushButton_2.setObjectName("pushButton_2") 236 | self.label_7 = QtWidgets.QLabel(parent=self.centralwidget) 237 | self.label_7.setGeometry(QtCore.QRect(210, 58, 60, 40)) 238 | self.label_7.setObjectName("label_7") 239 | self.label_8 = QtWidgets.QLabel(parent=self.centralwidget) 240 | self.label_8.setGeometry(QtCore.QRect(290, 58, 211, 40)) 241 | self.label_8.setObjectName("label_8") 242 | self.label_11 = QtWidgets.QLabel(parent=self.centralwidget) 243 | self.label_11.setGeometry(QtCore.QRect(490, 58, 211, 40)) 244 | self.label_11.setObjectName("label_11") 245 | # 添加一个label 放置到窗体右下角 246 | self.label_12 = QtWidgets.QLabel(parent=self.centralwidget) 247 | self.label_12.setGeometry(QtCore.QRect(700, 210, 171, 21)) 248 | self.label_12.setObjectName("label_12") 249 | 250 | self.formLayoutWidget_2 = QtWidgets.QWidget(parent=self.centralwidget) 251 | self.formLayoutWidget_2.setGeometry(QtCore.QRect(240, 110, 201, 51)) 252 | self.formLayoutWidget_2.setObjectName("formLayoutWidget_2") 253 | self.formLayout_4 = QtWidgets.QFormLayout(self.formLayoutWidget_2) 254 | self.formLayout_4.setContentsMargins(20, 0, 0, 0) 255 | self.formLayout_4.setObjectName("formLayout_4") 256 | self.label_14 = QtWidgets.QLabel(parent=self.formLayoutWidget_2) 257 | self.label_14.setObjectName("label_14") 258 | self.formLayout_4.setWidget( 259 | 0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_14 260 | ) 261 | self.label_15 = QtWidgets.QLabel(parent=self.formLayoutWidget_2) 262 | self.label_15.setObjectName("label_15") 263 | self.formLayout_4.setWidget( 264 | 1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_15 265 | ) 266 | self.spinBox_5 = QtWidgets.QSpinBox(parent=self.formLayoutWidget_2) 267 | self.spinBox_5.setObjectName("spinBox_5") 268 | self.formLayout_4.setWidget( 269 | 0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.spinBox_5 270 | ) 271 | self.checkBox = QtWidgets.QCheckBox(parent=self.formLayoutWidget_2) 272 | self.checkBox.setText("") 273 | self.checkBox.setObjectName("checkBox") 274 | self.formLayout_4.setWidget( 275 | 1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.checkBox 276 | ) 277 | 278 | self.textBrowser = QtWidgets.QTextBrowser(parent=self.centralwidget) 279 | self.textBrowser.setGeometry(QtCore.QRect(190, 10, 541, 41)) 280 | self.textBrowser.setEnabled(False) 281 | self.textBrowser.setObjectName("textBrowser") 282 | self.formLayoutWidget = QtWidgets.QWidget(parent=self.centralwidget) 283 | self.formLayoutWidget.setGeometry(QtCore.QRect(0, 110, 201, 51)) 284 | self.formLayoutWidget.setObjectName("formLayoutWidget") 285 | self.formLayout_2 = QtWidgets.QFormLayout(self.formLayoutWidget) 286 | self.formLayout_2.setContentsMargins(20, 0, 0, 0) 287 | self.formLayout_2.setObjectName("formLayout_2") 288 | self.label_3 = QtWidgets.QLabel(parent=self.formLayoutWidget) 289 | self.label_3.setObjectName("label_3") 290 | self.formLayout_2.setWidget( 291 | 0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_3 292 | ) 293 | self.label_4 = QtWidgets.QLabel(parent=self.formLayoutWidget) 294 | self.label_4.setObjectName("label_4") 295 | self.formLayout_2.setWidget( 296 | 1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_4 297 | ) 298 | self.spinBox = QtWidgets.QSpinBox(parent=self.formLayoutWidget) 299 | self.spinBox.setObjectName("spinBox") 300 | self.formLayout_2.setWidget( 301 | 0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.spinBox 302 | ) 303 | self.spinBox_2 = QtWidgets.QSpinBox(parent=self.formLayoutWidget) 304 | self.spinBox_2.setObjectName("spinBox_2") 305 | self.formLayout_2.setWidget( 306 | 1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.spinBox_2 307 | ) 308 | self.label_9 = QtWidgets.QLabel(parent=self.centralwidget) 309 | self.label_9.setGeometry(QtCore.QRect(210, 110, 20, 20)) 310 | self.label_9.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.WhatsThisCursor)) 311 | self.label_9.setText("") 312 | self.label_9.setPixmap(QtGui.QPixmap(self.tipsPath)) 313 | self.label_9.setScaledContents(True) 314 | self.label_9.setObjectName("label_9") 315 | self.label_10 = QtWidgets.QLabel(parent=self.centralwidget) 316 | self.label_10.setGeometry(QtCore.QRect(210, 140, 20, 20)) 317 | self.label_10.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.WhatsThisCursor)) 318 | self.label_10.setText("") 319 | self.label_10.setPixmap(QtGui.QPixmap(self.tipsPath)) 320 | self.label_10.setScaledContents(True) 321 | self.label_10.setObjectName("label_10") 322 | self.pushButton_3 = QtWidgets.QPushButton(parent=self.centralwidget) 323 | self.pushButton_3.setGeometry(QtCore.QRect(510, 115, 110, 40)) 324 | self.pushButton_3.setObjectName("pushButton_3") 325 | mainWindow.setCentralWidget(self.centralwidget) 326 | self.menubar = QtWidgets.QMenuBar(parent=mainWindow) 327 | self.menubar.setGeometry(QtCore.QRect(0, 0, 756, 23)) 328 | self.menubar.setObjectName("menubar") 329 | self.menu = QtWidgets.QMenu(parent=self.menubar) 330 | self.menu.setObjectName("menu") 331 | mainWindow.setMenuBar(self.menubar) 332 | self.statusbar = QtWidgets.QStatusBar(parent=mainWindow) 333 | self.statusbar.setObjectName("statusbar") 334 | mainWindow.setStatusBar(self.statusbar) 335 | self.action = QtGui.QAction(parent=mainWindow) 336 | self.action.setObjectName("action") 337 | self.action_2 = QtGui.QAction(parent=mainWindow) 338 | self.action_2.setObjectName("action_2") 339 | self.action_3 = QtGui.QAction(parent=mainWindow) 340 | self.action_3.setObjectName("action_3") 341 | self.menu.addAction(self.action) 342 | self.menu.addAction(self.action_2) 343 | self.menu.addAction(self.action_3) 344 | self.menubar.addAction(self.menu.menuAction()) 345 | 346 | # 给 comboBox_2 添加两个选项 简体中文 和繁体中文 默认选择简体中文 347 | self.comboBox_2.addItem("简体中文") 348 | # self.comboBox_2.addItem("繁体中文") 349 | self.comboBox_2.setCurrentIndex(0) 350 | # 禁用窗体放大缩小 351 | mainWindow.setFixedSize(756, 267) 352 | # 禁用窗体最大化 353 | mainWindow.setWindowFlag(QtCore.Qt.WindowType.WindowMaximizeButtonHint, False) 354 | # 增加窗体永久置顶 355 | mainWindow.setWindowFlag(QtCore.Qt.WindowType.WindowStaysOnTopHint, True) 356 | # 禁用窗体最小化 357 | mainWindow.setWindowFlag(QtCore.Qt.WindowType.WindowMinimizeButtonHint, False) 358 | 359 | # 给 pushButton_2 添加点击事件 360 | self.pushButton_2.clicked.connect(self.seachLogsPath) 361 | # 给 日志按钮添加点击事件 362 | self.action_2.triggered.connect(self.showLogs) 363 | # 给 更新日志按钮添加点击事件 364 | self.action_3.triggered.connect(self.openUpdateLog) 365 | # 给 刷新按钮 添加 checkSteamAndPubg 点击事件 366 | self.pushButton.clicked.connect(self.checkSteamAndPubg) 367 | # 给开始挂机按钮 添加点击事件 368 | self.pushButton_3.clicked.connect(self.startGameLoop) 369 | # 给 action 添加点击事件 370 | self.action.triggered.connect(self.openAbout) 371 | 372 | # 设置 label_9 的默认值为 5 373 | self.spinBox.setValue(5) 374 | # 设置 label_10 的默认值为 30 375 | self.spinBox_2.setValue(30) 376 | # 鼠标放到 label_9 上提示文字 377 | self.label_9.setToolTip("轮询延迟:每轮状态检查中间隔的时间,单位为秒") 378 | self.label_9.setStatusTip("轮询延迟:每轮状态检查中间隔的时间,单位为秒") 379 | # 鼠标放到 label_10 上提示文字 380 | self.label_10.setToolTip("跳伞延迟:每次上飞机时等待多久跳伞,单位为秒") 381 | self.label_10.setStatusTip("跳伞延迟:每次上飞机时等待多久跳伞,单位为秒") 382 | # 默认选中 label_15 383 | self.checkBox.setChecked(True) 384 | # 设置 spinBox_5 的默认值为 8 385 | self.spinBox_5.setValue(8) 386 | # 设置 spinBox_5 的最大值为 10 最小值为 1 387 | self.spinBox_5.setMaximum(10) 388 | self.spinBox_5.setMinimum(1) 389 | self.retranslateUi(mainWindow) 390 | QtCore.QMetaObject.connectSlotsByName(mainWindow) 391 | self.initData() 392 | 393 | def retranslateUi(self, mainWindow): 394 | # 获取配置信息 395 | _translate = QtCore.QCoreApplication.translate 396 | self.label.setText(_translate("mainWindow", "语 言")) 397 | self.pushButton.setText(_translate("mainWindow", "刷新")) 398 | self.label_6.setText(_translate("mainWindow", "日志保存位置:")) 399 | self.pushButton_2.setText(_translate("mainWindow", "选择文件夹")) 400 | self.label_7.setText(_translate("mainWindow", "当前状态:")) 401 | self.label_8.setText(_translate("mainWindow", "未开启")) 402 | self.label_11.setText(_translate("mainWindow", "")) 403 | # 设置主页文本 404 | self.label_3.setText(_translate("mainWindow", "轮 询 延 迟:")) 405 | self.label_4.setText(_translate("mainWindow", "跳 伞 延 迟:")) 406 | self.label_14.setText(_translate("mainWindow", "图 片 相 似 度:")) 407 | self.label_15.setText(_translate("mainWindow", "保 存 日 志:")) 408 | self.menu.setTitle(_translate("mainWindow", "关于")) 409 | self.action.setText(_translate("mainWindow", "关于软件")) 410 | self.action_2.setText(_translate("mainWindow", "日志")) 411 | self.action_3.setText(_translate("mainWindow", "更新日志")) 412 | self.pushButton_3.setText(_translate("mainWindow", "开始挂机")) 413 | self.label_12.setText("V 1.2.0") 414 | 415 | def initData(self): 416 | # 获取用户桌面path 417 | path = os.path.join(os.path.expanduser("~"), "Desktop") 418 | path = os.path.join(path, "logs") 419 | print("path:", path) 420 | # 设置日志保存位置 421 | self.lineEdit.setText(path) 422 | self.logger = ChineseLogger("PUBG-tools") 423 | self.logger.setLog_dir(path) 424 | self.checkSteamAndPubg() 425 | 426 | # 检测是否打开了 steam 和 pubg 427 | def checkSteamAndPubg(self): 428 | print("检测是否打开了 steam 和 pubg") 429 | # 检查是否有 名为 steam.exe 的进程 430 | if os.system("tasklist | findstr steam.exe") == 0: 431 | # 如果已经打开 steam 将 label_2 的图片 替换为 steam.png 432 | self.label_2.setPixmap(QtGui.QPixmap(self.steamActPath)) 433 | self.steamState = True 434 | self.label_11.setText("已开启 steam") 435 | else: 436 | # 将图片替换为 steam.png 437 | self.label_2.setPixmap(QtGui.QPixmap(self.steamPath)) 438 | # 将 label_7 替换为 未开启 steam 439 | self.label_11.setText("未开启 steam") 440 | self.steamState = False 441 | # 检查是否有 名为 TslGame.exe 的进程 442 | if os.system("tasklist | findstr TslGame.exe") == 0: 443 | # 如果已经打开 pubg 将 label_5 的图片 替换为 pubg_act.png 444 | self.label_5.setPixmap(QtGui.QPixmap(self.pubgActPath)) 445 | self.pubgState = True 446 | self.label_11.setText("已开启 pubg") 447 | else: 448 | # 将图片替换为 pubg.png 449 | self.label_5.setPixmap(QtGui.QPixmap(self.pubgPath)) 450 | # 将 label_8 替换为 未开启 PUBG 451 | self.label_11.setText("未开启 PUBG") 452 | self.pubgState = False 453 | pass 454 | 455 | # def closeEvent(self, a0: QtGui.QCloseEvent) -> None: 456 | # print("关闭窗口") 457 | # self.gameloop.setState(False) 458 | # pass 459 | # 自定义关闭函数 460 | def closeEvent(self, event): 461 | print("closeEvent") 462 | self.gameloop.setState(False) 463 | super(Ui_mainWindow, self).closeEvent(event) 464 | 465 | # 选择日志保存位置 466 | def seachLogsPath(self): 467 | # 弹出文件选择框 468 | path = QtWidgets.QFileDialog.getExistingDirectory(self, "选择文件夹", "../") 469 | if path != "": 470 | print("有值") 471 | path = path + "/logs" 472 | else: 473 | print("没有值") 474 | 475 | # 打开日志地址 476 | def showLogs(self): 477 | print("打开日志地址") 478 | # 获取日志保存位置 479 | path = self.lineEdit.text() 480 | print(path) 481 | # 打开文件夹 482 | os.system(f"start explorer {path}") 483 | 484 | # 开始挂机 485 | def startGameLoop(self): 486 | print("游戏状态:", self.gameloop.getState()) 487 | if self.gameloop.getState() == False: 488 | # 将 轮询延迟 与 跳伞延迟 传进去 489 | self.worker_thread.run( 490 | self.spinBox.value(), 491 | self.spinBox_2.value(), 492 | self.spinBox_5.value(), 493 | self.checkBox.isChecked(), 494 | ) 495 | self.pushButton_3.setText("挂机中...") 496 | # 设置 label_8 的文本为 已开始 497 | self.label_8.setText("已开始") 498 | else: 499 | self.pushButton_3.setText("开始挂机") 500 | self.gameloop.setState(False) 501 | # 设置 label_8 的文本为 已开始 502 | self.label_8.setText("未开始") 503 | 504 | # 修改主窗体文案 hooks 1 505 | def setStateHooks(self, message): 506 | global oldText 507 | if message == oldText: 508 | self.label_8.setText(message) 509 | else: 510 | self.label_8.setText(message) 511 | oldText = message 512 | # 判断是否保存日志 513 | if self.checkBox.isChecked(): 514 | self.logger.info(message) 515 | 516 | # 修改主窗体文案 hooks 2 517 | def setStateHooks2(self, message): 518 | global oldText2 519 | if message == oldText2: 520 | self.label_11.setText(message) 521 | else: 522 | self.label_11.setText(message) 523 | oldText2 = message 524 | # 判断是否保存日志 525 | if self.checkBox.isChecked(): 526 | self.logger.info(message) 527 | 528 | # 打开关于软件 529 | def openAbout(self): 530 | self.about_ui = Ui_Form() 531 | self.about_ui.show() 532 | 533 | # 打开更新日志按钮 534 | def openUpdateLog(self): 535 | self.updateLog_ui = Up_data_log() 536 | self.updateLog_ui.show() 537 | 538 | 539 | if __name__ == "__main__": 540 | app = QtWidgets.QApplication(sys.argv) 541 | mainWindow = QtWidgets.QMainWindow() 542 | ui = Ui_mainWindow() 543 | ui.setupUi(mainWindow) 544 | mainWindow.show() 545 | sys.exit(app.exec()) 546 | -------------------------------------------------------------------------------- /template/tips.py: -------------------------------------------------------------------------------- 1 | # Form implementation generated from reading ui file '.\ui\关于软件.ui' 2 | # 3 | # Created by: PyQt6 UI code generator 6.4.2 4 | # 5 | # WARNING: Any manual changes made to this file will be lost when pyuic6 is 6 | # run again. Do not edit this file unless you know what you are doing. 7 | 8 | 9 | import requests 10 | from PyQt6 import QtCore, QtGui, QtWidgets 11 | from PyQt6.QtWidgets import QWidget 12 | 13 | 14 | class Ui_Form(QWidget): 15 | 16 | def __init__(self): 17 | super(Ui_Form, self).__init__() 18 | self.setupUi(self) 19 | 20 | def setupUi(self, Form): 21 | Form.setObjectName("Form") 22 | Form.resize(500, 400) 23 | font = QtGui.QFont() 24 | font.setPointSize(16) 25 | font.setBold(True) 26 | font.setWeight(75) 27 | Form.setFont(font) 28 | self.label = QtWidgets.QLabel(parent=Form) 29 | self.label.setGeometry(QtCore.QRect(200, 20, 100, 40)) 30 | self.label.setObjectName("label") 31 | self.textBrowser = QtWidgets.QTextBrowser(parent=Form) 32 | self.textBrowser.setEnabled(False) 33 | self.textBrowser.setGeometry(QtCore.QRect(40, 60, 431, 121)) 34 | self.textBrowser.setObjectName("textBrowser") 35 | self.label_2 = QtWidgets.QLabel(parent=Form) 36 | self.label_2.setGeometry(QtCore.QRect(150, 190, 200, 200)) 37 | self.label_2.setText("") 38 | # self.label_2.setPixmap(QtGui.QPixmap(".\\ui\\f7d077c6d349c220f4293dac4c02799.jpg")) 39 | # 改为从网络地址加载图片 40 | self.label_2.setScaledContents(True) 41 | self.label_2.setObjectName("label_2") 42 | 43 | # 禁用窗体放大缩小 44 | Form.setFixedSize(500, 400) 45 | # 禁用窗体最大化 46 | Form.setWindowFlag(QtCore.Qt.WindowType.WindowMaximizeButtonHint, False) 47 | # 增加窗体永久置顶 48 | Form.setWindowFlag(QtCore.Qt.WindowType.WindowStaysOnTopHint, True) 49 | # 禁用窗体最小化 50 | Form.setWindowFlag(QtCore.Qt.WindowType.WindowMinimizeButtonHint, False) 51 | self.retranslateUi(Form) 52 | QtCore.QMetaObject.connectSlotsByName(Form) 53 | 54 | def retranslateUi(self, Form): 55 | _translate = QtCore.QCoreApplication.translate 56 | Form.setWindowTitle(_translate("Form", "Form")) 57 | self.label.setText(_translate("Form", "关于软件")) 58 | -------------------------------------------------------------------------------- /template/updatelog.py: -------------------------------------------------------------------------------- 1 | # Form implementation generated from reading ui file '.\ui\更新日志.ui' 2 | # 3 | # Created by: PyQt6 UI code generator 6.4.2 4 | # 5 | # WARNING: Any manual changes made to this file will be lost when pyuic6 is 6 | # run again. Do not edit this file unless you know what you are doing. 7 | 8 | 9 | import requests 10 | from PyQt6 import QtCore, QtGui, QtWidgets 11 | from PyQt6.QtWidgets import QWidget 12 | import random 13 | 14 | class Up_data_log(QWidget): 15 | 16 | def __init__(self): 17 | super(Up_data_log, self).__init__() 18 | self.setupUi(self) 19 | 20 | def setupUi(self, Form): 21 | Form.setObjectName("Form") 22 | Form.resize(380, 519) 23 | self.textBrowser = QtWidgets.QTextBrowser(parent=Form) 24 | self.textBrowser.setGeometry(QtCore.QRect(10, 10, 361, 501)) 25 | self.textBrowser.setObjectName("textBrowser") 26 | # 禁用窗体最大化 27 | Form.setWindowFlag(QtCore.Qt.WindowType.WindowMaximizeButtonHint, False) 28 | # 增加窗体永久置顶 29 | Form.setWindowFlag(QtCore.Qt.WindowType.WindowStaysOnTopHint, True) 30 | # 禁用窗体最小化 31 | Form.setWindowFlag(QtCore.Qt.WindowType.WindowMinimizeButtonHint, False) 32 | self.retranslateUi(Form) 33 | QtCore.QMetaObject.connectSlotsByName(Form) 34 | 35 | def retranslateUi(self, Form): 36 | pass 37 | 38 | 39 | if __name__ == "__main__": 40 | import sys 41 | 42 | app = QtWidgets.QApplication(sys.argv) 43 | Form = QtWidgets.QWidget() 44 | ui = Up_data_log() 45 | ui.setupUi(Form) 46 | Form.show() 47 | sys.exit(app.exec()) 48 | -------------------------------------------------------------------------------- /test/test.py: -------------------------------------------------------------------------------- 1 | from PyQt6 import QtCore, QtWidgets 2 | from PyQt6.QtWidgets import QMainWindow 3 | 4 | 5 | class Ui_MainWindow(object): 6 | def setupUi(self, MainWindow): 7 | MainWindow.setObjectName("MainWindow") 8 | MainWindow.resize(277, 244) 9 | self.centralwidget = QtWidgets.QWidget(MainWindow) 10 | self.centralwidget.setObjectName("centralwidget") 11 | MainWindow.setCentralWidget(self.centralwidget) 12 | self.statusbar = QtWidgets.QStatusBar(MainWindow) 13 | self.statusbar.setObjectName("statusbar") 14 | MainWindow.setStatusBar(self.statusbar) 15 | QtCore.QMetaObject.connectSlotsByName(MainWindow) 16 | MainWindow.show() 17 | 18 | 19 | class MyWindow(QMainWindow): 20 | def closeEvent(self, event): 21 | print("closeEvent") 22 | pass 23 | 24 | 25 | if __name__ == "__main__": 26 | import sys 27 | 28 | app = QtWidgets.QApplication(sys.argv) 29 | MainWindow = MyWindow() 30 | ui = Ui_MainWindow() 31 | ui.setupUi(MainWindow) 32 | sys.exit(app.exec()) 33 | -------------------------------------------------------------------------------- /ui/main.py: -------------------------------------------------------------------------------- 1 | # Form implementation generated from reading ui file '.\ui\main.ui' 2 | # 3 | # Created by: PyQt6 UI code generator 6.6.1 4 | # 5 | # WARNING: Any manual changes made to this file will be lost when pyuic6 is 6 | # run again. Do not edit this file unless you know what you are doing. 7 | 8 | 9 | from PyQt6 import QtCore, QtGui, QtWidgets 10 | 11 | 12 | class Ui_mainWindow(object): 13 | def setupUi(self, mainWindow): 14 | mainWindow.setObjectName("mainWindow") 15 | mainWindow.resize(756, 267) 16 | font = QtGui.QFont() 17 | font.setPointSize(9) 18 | mainWindow.setFont(font) 19 | icon = QtGui.QIcon() 20 | icon.addPixmap(QtGui.QPixmap(".\\ui\\../images/avatar/head.ico"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) 21 | mainWindow.setWindowIcon(icon) 22 | self.centralwidget = QtWidgets.QWidget(parent=mainWindow) 23 | self.centralwidget.setObjectName("centralwidget") 24 | self.horizontalLayoutWidget = QtWidgets.QWidget(parent=self.centralwidget) 25 | self.horizontalLayoutWidget.setGeometry(QtCore.QRect(0, 10, 171, 41)) 26 | self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") 27 | self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget) 28 | self.horizontalLayout.setContentsMargins(20, 0, 0, 0) 29 | self.horizontalLayout.setObjectName("horizontalLayout") 30 | self.label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget) 31 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Minimum) 32 | sizePolicy.setHorizontalStretch(0) 33 | sizePolicy.setVerticalStretch(0) 34 | sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) 35 | self.label.setSizePolicy(sizePolicy) 36 | self.label.setObjectName("label") 37 | self.horizontalLayout.addWidget(self.label) 38 | self.comboBox_2 = QtWidgets.QComboBox(parent=self.horizontalLayoutWidget) 39 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Maximum, QtWidgets.QSizePolicy.Policy.Maximum) 40 | sizePolicy.setHorizontalStretch(0) 41 | sizePolicy.setVerticalStretch(0) 42 | sizePolicy.setHeightForWidth(self.comboBox_2.sizePolicy().hasHeightForWidth()) 43 | self.comboBox_2.setSizePolicy(sizePolicy) 44 | self.comboBox_2.setObjectName("comboBox_2") 45 | self.horizontalLayout.addWidget(self.comboBox_2) 46 | self.label_2 = QtWidgets.QLabel(parent=self.centralwidget) 47 | self.label_2.setGeometry(QtCore.QRect(10, 60, 40, 40)) 48 | self.label_2.setText("") 49 | self.label_2.setPixmap(QtGui.QPixmap(".\\ui\\../images/avatar/steam.png")) 50 | self.label_2.setScaledContents(True) 51 | self.label_2.setObjectName("label_2") 52 | self.label_5 = QtWidgets.QLabel(parent=self.centralwidget) 53 | self.label_5.setGeometry(QtCore.QRect(68, 58, 44, 44)) 54 | self.label_5.setText("") 55 | self.label_5.setPixmap(QtGui.QPixmap(".\\ui\\../images/avatar/pubg.png")) 56 | self.label_5.setScaledContents(True) 57 | self.label_5.setObjectName("label_5") 58 | self.pushButton = QtWidgets.QPushButton(parent=self.centralwidget) 59 | self.pushButton.setGeometry(QtCore.QRect(130, 65, 60, 30)) 60 | self.pushButton.setObjectName("pushButton") 61 | self.label_6 = QtWidgets.QLabel(parent=self.centralwidget) 62 | self.label_6.setGeometry(QtCore.QRect(20, 180, 91, 21)) 63 | self.label_6.setObjectName("label_6") 64 | self.lineEdit = QtWidgets.QLineEdit(parent=self.centralwidget) 65 | self.lineEdit.setEnabled(False) 66 | self.lineEdit.setGeometry(QtCore.QRect(110, 180, 371, 20)) 67 | self.lineEdit.setObjectName("lineEdit") 68 | self.pushButton_2 = QtWidgets.QPushButton(parent=self.centralwidget) 69 | self.pushButton_2.setGeometry(QtCore.QRect(490, 180, 75, 20)) 70 | self.pushButton_2.setObjectName("pushButton_2") 71 | self.label_7 = QtWidgets.QLabel(parent=self.centralwidget) 72 | self.label_7.setGeometry(QtCore.QRect(210, 58, 60, 40)) 73 | self.label_7.setObjectName("label_7") 74 | self.label_8 = QtWidgets.QLabel(parent=self.centralwidget) 75 | self.label_8.setGeometry(QtCore.QRect(290, 58, 211, 40)) 76 | self.label_8.setObjectName("label_8") 77 | self.textBrowser = QtWidgets.QTextBrowser(parent=self.centralwidget) 78 | self.textBrowser.setGeometry(QtCore.QRect(190, 10, 541, 41)) 79 | self.textBrowser.setObjectName("textBrowser") 80 | self.formLayoutWidget = QtWidgets.QWidget(parent=self.centralwidget) 81 | self.formLayoutWidget.setGeometry(QtCore.QRect(0, 110, 201, 51)) 82 | self.formLayoutWidget.setObjectName("formLayoutWidget") 83 | self.formLayout_2 = QtWidgets.QFormLayout(self.formLayoutWidget) 84 | self.formLayout_2.setContentsMargins(20, 0, 0, 0) 85 | self.formLayout_2.setObjectName("formLayout_2") 86 | self.label_3 = QtWidgets.QLabel(parent=self.formLayoutWidget) 87 | self.label_3.setObjectName("label_3") 88 | self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_3) 89 | self.label_4 = QtWidgets.QLabel(parent=self.formLayoutWidget) 90 | self.label_4.setObjectName("label_4") 91 | self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_4) 92 | self.spinBox = QtWidgets.QSpinBox(parent=self.formLayoutWidget) 93 | self.spinBox.setObjectName("spinBox") 94 | self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.spinBox) 95 | self.spinBox_2 = QtWidgets.QSpinBox(parent=self.formLayoutWidget) 96 | self.spinBox_2.setObjectName("spinBox_2") 97 | self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.spinBox_2) 98 | self.label_9 = QtWidgets.QLabel(parent=self.centralwidget) 99 | self.label_9.setGeometry(QtCore.QRect(210, 110, 20, 20)) 100 | self.label_9.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.WhatsThisCursor)) 101 | self.label_9.setStatusTip("qwweq") 102 | self.label_9.setText("") 103 | self.label_9.setPixmap(QtGui.QPixmap(".\\ui\\../images/avatar/tips.png")) 104 | self.label_9.setScaledContents(True) 105 | self.label_9.setObjectName("label_9") 106 | self.label_10 = QtWidgets.QLabel(parent=self.centralwidget) 107 | self.label_10.setGeometry(QtCore.QRect(210, 140, 20, 20)) 108 | self.label_10.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.WhatsThisCursor)) 109 | self.label_10.setText("") 110 | self.label_10.setPixmap(QtGui.QPixmap(".\\ui\\../images/avatar/tips.png")) 111 | self.label_10.setScaledContents(True) 112 | self.label_10.setObjectName("label_10") 113 | self.pushButton_3 = QtWidgets.QPushButton(parent=self.centralwidget) 114 | self.pushButton_3.setGeometry(QtCore.QRect(510, 115, 110, 40)) 115 | self.pushButton_3.setObjectName("pushButton_3") 116 | self.label_11 = QtWidgets.QLabel(parent=self.centralwidget) 117 | self.label_11.setGeometry(QtCore.QRect(490, 58, 211, 40)) 118 | self.label_11.setObjectName("label_11") 119 | self.formLayoutWidget_2 = QtWidgets.QWidget(parent=self.centralwidget) 120 | self.formLayoutWidget_2.setGeometry(QtCore.QRect(240, 110, 201, 51)) 121 | self.formLayoutWidget_2.setObjectName("formLayoutWidget_2") 122 | self.formLayout_4 = QtWidgets.QFormLayout(self.formLayoutWidget_2) 123 | self.formLayout_4.setContentsMargins(20, 0, 0, 0) 124 | self.formLayout_4.setObjectName("formLayout_4") 125 | self.label_14 = QtWidgets.QLabel(parent=self.formLayoutWidget_2) 126 | self.label_14.setObjectName("label_14") 127 | self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_14) 128 | self.label_15 = QtWidgets.QLabel(parent=self.formLayoutWidget_2) 129 | self.label_15.setObjectName("label_15") 130 | self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_15) 131 | self.spinBox_5 = QtWidgets.QSpinBox(parent=self.formLayoutWidget_2) 132 | self.spinBox_5.setObjectName("spinBox_5") 133 | self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.spinBox_5) 134 | self.checkBox = QtWidgets.QCheckBox(parent=self.formLayoutWidget_2) 135 | self.checkBox.setText("") 136 | self.checkBox.setObjectName("checkBox") 137 | self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.checkBox) 138 | mainWindow.setCentralWidget(self.centralwidget) 139 | self.menubar = QtWidgets.QMenuBar(parent=mainWindow) 140 | self.menubar.setGeometry(QtCore.QRect(0, 0, 756, 23)) 141 | self.menubar.setObjectName("menubar") 142 | self.menu = QtWidgets.QMenu(parent=self.menubar) 143 | self.menu.setObjectName("menu") 144 | mainWindow.setMenuBar(self.menubar) 145 | self.statusbar = QtWidgets.QStatusBar(parent=mainWindow) 146 | self.statusbar.setObjectName("statusbar") 147 | mainWindow.setStatusBar(self.statusbar) 148 | self.action = QtGui.QAction(parent=mainWindow) 149 | self.action.setObjectName("action") 150 | self.action_2 = QtGui.QAction(parent=mainWindow) 151 | self.action_2.setObjectName("action_2") 152 | self.menu.addAction(self.action) 153 | self.menu.addAction(self.action_2) 154 | self.menubar.addAction(self.menu.menuAction()) 155 | 156 | self.retranslateUi(mainWindow) 157 | QtCore.QMetaObject.connectSlotsByName(mainWindow) 158 | 159 | def retranslateUi(self, mainWindow): 160 | _translate = QtCore.QCoreApplication.translate 161 | mainWindow.setWindowTitle(_translate("mainWindow", "PUBG通行证挂机工具")) 162 | self.label.setText(_translate("mainWindow", "语 言")) 163 | self.pushButton.setText(_translate("mainWindow", "刷新")) 164 | self.label_6.setText(_translate("mainWindow", "日志保存位置:")) 165 | self.pushButton_2.setText(_translate("mainWindow", "选择文件夹")) 166 | self.label_7.setText(_translate("mainWindow", "当前状态:")) 167 | self.label_8.setText(_translate("mainWindow", "未开启")) 168 | self.label_3.setText(_translate("mainWindow", "轮 询 延 迟:")) 169 | self.label_4.setText(_translate("mainWindow", "跳 伞 延 迟:")) 170 | self.pushButton_3.setText(_translate("mainWindow", "开始挂机")) 171 | self.label_11.setText(_translate("mainWindow", "未开启")) 172 | self.label_14.setText(_translate("mainWindow", "图 片 相 似 度:")) 173 | self.label_15.setText(_translate("mainWindow", "保 存 日 志:")) 174 | self.menu.setTitle(_translate("mainWindow", "关于")) 175 | self.action.setText(_translate("mainWindow", "关于软件")) 176 | self.action_2.setText(_translate("mainWindow", "日志")) 177 | 178 | 179 | if __name__ == "__main__": 180 | import sys 181 | app = QtWidgets.QApplication(sys.argv) 182 | mainWindow = QtWidgets.QMainWindow() 183 | ui = Ui_mainWindow() 184 | ui.setupUi(mainWindow) 185 | mainWindow.show() 186 | sys.exit(app.exec()) 187 | -------------------------------------------------------------------------------- /ui/main.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | mainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 756 10 | 267 11 | 12 | 13 | 14 | 15 | 9 16 | 17 | 18 | 19 | PUBG通行证挂机工具-bilibili代码之外 20 | 21 | 22 | 23 | ../../../../.designer/images/avatar/head.ico../../../../.designer/images/avatar/head.ico 24 | 25 | 26 | 27 | 28 | 29 | 0 30 | 10 31 | 171 32 | 41 33 | 34 | 35 | 36 | 37 | 20 38 | 39 | 40 | 41 | 42 | 43 | 0 44 | 0 45 | 46 | 47 | 48 | 语 言 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 0 57 | 0 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 10 68 | 60 69 | 40 70 | 40 71 | 72 | 73 | 74 | 75 | 76 | 77 | ../../../../.designer/images/avatar/steam.png 78 | 79 | 80 | true 81 | 82 | 83 | 84 | 85 | 86 | 68 87 | 58 88 | 44 89 | 44 90 | 91 | 92 | 93 | 94 | 95 | 96 | ../../../../.designer/images/avatar/pubg.png 97 | 98 | 99 | true 100 | 101 | 102 | 103 | 104 | 105 | 130 106 | 65 107 | 60 108 | 30 109 | 110 | 111 | 112 | 刷新 113 | 114 | 115 | 116 | 117 | 118 | 20 119 | 180 120 | 91 121 | 21 122 | 123 | 124 | 125 | 日志保存位置: 126 | 127 | 128 | 129 | 130 | false 131 | 132 | 133 | 134 | 110 135 | 180 136 | 371 137 | 20 138 | 139 | 140 | 141 | 142 | 143 | 144 | 490 145 | 180 146 | 75 147 | 20 148 | 149 | 150 | 151 | 选择文件夹 152 | 153 | 154 | 155 | 156 | 157 | 210 158 | 58 159 | 60 160 | 40 161 | 162 | 163 | 164 | 当前状态: 165 | 166 | 167 | 168 | 169 | 170 | 290 171 | 58 172 | 211 173 | 40 174 | 175 | 176 | 177 | 未开启 178 | 179 | 180 | 181 | 182 | 183 | 190 184 | 10 185 | 541 186 | 41 187 | 188 | 189 | 190 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 191 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 192 | p, li { white-space: pre-wrap; } 193 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 194 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">123d</p></body></html> 195 | 196 | 197 | 198 | 199 | 200 | 0 201 | 110 202 | 201 203 | 51 204 | 205 | 206 | 207 | 208 | 20 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 | 210 236 | 110 237 | 20 238 | 20 239 | 240 | 241 | 242 | WhatsThisCursor 243 | 244 | 245 | qwweq 246 | 247 | 248 | 249 | 250 | 251 | ../../../../.designer/images/avatar/tips.png 252 | 253 | 254 | true 255 | 256 | 257 | 258 | 259 | 260 | 210 261 | 140 262 | 20 263 | 20 264 | 265 | 266 | 267 | WhatsThisCursor 268 | 269 | 270 | 271 | 272 | 273 | ../../../../.designer/images/avatar/tips.png 274 | 275 | 276 | true 277 | 278 | 279 | 280 | 281 | 282 | 510 283 | 115 284 | 110 285 | 40 286 | 287 | 288 | 289 | 开始挂机 290 | 291 | 292 | 293 | 294 | 295 | 490 296 | 58 297 | 211 298 | 40 299 | 300 | 301 | 302 | 未开启 303 | 304 | 305 | 306 | 307 | 308 | 240 309 | 110 310 | 201 311 | 51 312 | 313 | 314 | 315 | 316 | 20 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 | 670 348 | 200 349 | 81 350 | 21 351 | 352 | 353 | 354 | TextLabel 355 | 356 | 357 | 358 | 359 | 360 | 361 | 0 362 | 0 363 | 756 364 | 23 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 | -------------------------------------------------------------------------------- /ui/tips.py: -------------------------------------------------------------------------------- 1 | # Form implementation generated from reading ui file '.\ui\关于软件.ui' 2 | # 3 | # Created by: PyQt6 UI code generator 6.4.2 4 | # 5 | # WARNING: Any manual changes made to this file will be lost when pyuic6 is 6 | # run again. Do not edit this file unless you know what you are doing. 7 | 8 | 9 | from PyQt6 import QtCore, QtGui, QtWidgets 10 | 11 | 12 | class Ui_Form(object): 13 | def setupUi(self, Form): 14 | Form.setObjectName("Form") 15 | Form.resize(500, 400) 16 | font = QtGui.QFont() 17 | font.setPointSize(16) 18 | font.setBold(True) 19 | font.setWeight(75) 20 | Form.setFont(font) 21 | self.label = QtWidgets.QLabel(parent=Form) 22 | self.label.setGeometry(QtCore.QRect(200, 20, 100, 40)) 23 | self.label.setObjectName("label") 24 | self.textBrowser = QtWidgets.QTextBrowser(parent=Form) 25 | self.textBrowser.setEnabled(False) 26 | self.textBrowser.setGeometry(QtCore.QRect(40, 60, 431, 121)) 27 | self.textBrowser.setObjectName("textBrowser") 28 | self.label_2 = QtWidgets.QLabel(parent=Form) 29 | self.label_2.setGeometry(QtCore.QRect(150, 190, 200, 200)) 30 | self.label_2.setText("") 31 | self.label_2.setPixmap(QtGui.QPixmap(".\\ui\\f7d077c6d349c220f4293dac4c02799.jpg")) 32 | self.label_2.setScaledContents(True) 33 | self.label_2.setObjectName("label_2") 34 | 35 | self.retranslateUi(Form) 36 | QtCore.QMetaObject.connectSlotsByName(Form) 37 | 38 | def retranslateUi(self, Form): 39 | _translate = QtCore.QCoreApplication.translate 40 | Form.setWindowTitle(_translate("Form", "Form")) 41 | self.label.setText(_translate("Form", "关于软件")) 42 | self.textBrowser.setHtml(_translate("Form", "\n" 43 | "\n" 46 | "

本软件纯是因为自己要玩,按键精灵不好用所以制作的工具,已测试一周bug,以及没有封号问题,本软件不会动游戏任何数据,仅通过图片/文字分析来实现目前功能。

\n" 47 | "


\n" 48 | "

如果你觉得做的不错,可以考虑请我喝杯咖啡!

\n" 49 | "


")) 50 | 51 | 52 | if __name__ == "__main__": 53 | import sys 54 | app = QtWidgets.QApplication(sys.argv) 55 | Form = QtWidgets.QWidget() 56 | ui = Ui_Form() 57 | ui.setupUi(Form) 58 | Form.show() 59 | sys.exit(app.exec()) 60 | -------------------------------------------------------------------------------- /ui/updatelog.py: -------------------------------------------------------------------------------- 1 | # Form implementation generated from reading ui file '.\ui\更新日志.ui' 2 | # 3 | # Created by: PyQt6 UI code generator 6.4.2 4 | # 5 | # WARNING: Any manual changes made to this file will be lost when pyuic6 is 6 | # run again. Do not edit this file unless you know what you are doing. 7 | 8 | 9 | from PyQt6 import QtCore, QtGui, QtWidgets 10 | 11 | 12 | class Ui_Form(object): 13 | def setupUi(self, Form): 14 | Form.setObjectName("Form") 15 | Form.resize(380, 519) 16 | self.textBrowser = QtWidgets.QTextBrowser(parent=Form) 17 | self.textBrowser.setGeometry(QtCore.QRect(10, 10, 361, 501)) 18 | self.textBrowser.setObjectName("textBrowser") 19 | 20 | self.retranslateUi(Form) 21 | QtCore.QMetaObject.connectSlotsByName(Form) 22 | 23 | def retranslateUi(self, Form): 24 | _translate = QtCore.QCoreApplication.translate 25 | Form.setWindowTitle(_translate("Form", "Form")) 26 | self.textBrowser.setHtml(_translate("Form", "\n" 27 | "\n" 30 | "

啦啦啦啦德玛西亚

")) 31 | 32 | 33 | if __name__ == "__main__": 34 | import sys 35 | app = QtWidgets.QApplication(sys.argv) 36 | Form = QtWidgets.QWidget() 37 | ui = Ui_Form() 38 | ui.setupUi(Form) 39 | Form.show() 40 | sys.exit(app.exec()) 41 | -------------------------------------------------------------------------------- /upx-4.2.4-win64/COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /upx-4.2.4-win64/LICENSE: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | 3 | 4 | ooooo ooo ooooooooo. ooooooo ooooo 5 | `888' `8' `888 `Y88. `8888 d8' 6 | 888 8 888 .d88' Y888..8P 7 | 888 8 888ooo88P' `8888' 8 | 888 8 888 .8PY888. 9 | `88. .8' 888 d8' `888b 10 | `YbodP' o888o o888o o88888o 11 | 12 | 13 | The Ultimate Packer for eXecutables 14 | Copyright (c) 1996-2000 Markus Oberhumer & Laszlo Molnar 15 | http://wildsau.idv.uni-linz.ac.at/mfx/upx.html 16 | http://www.nexus.hu/upx 17 | http://upx.tsx.org 18 | 19 | 20 | PLEASE CAREFULLY READ THIS LICENSE AGREEMENT, ESPECIALLY IF YOU PLAN 21 | TO MODIFY THE UPX SOURCE CODE OR USE A MODIFIED UPX VERSION. 22 | 23 | 24 | ABSTRACT 25 | ======== 26 | 27 | UPX and UCL are copyrighted software distributed under the terms 28 | of the GNU General Public License (hereinafter the "GPL"). 29 | 30 | The stub which is imbedded in each UPX compressed program is part 31 | of UPX and UCL, and contains code that is under our copyright. The 32 | terms of the GNU General Public License still apply as compressing 33 | a program is a special form of linking with our stub. 34 | 35 | As a special exception we grant the free usage of UPX for all 36 | executables, including commercial programs. 37 | See below for details and restrictions. 38 | 39 | 40 | COPYRIGHT 41 | ========= 42 | 43 | UPX and UCL are copyrighted software. All rights remain with the authors. 44 | 45 | UPX is Copyright (C) 1996-2000 Markus Franz Xaver Johannes Oberhumer 46 | UPX is Copyright (C) 1996-2000 Laszlo Molnar 47 | 48 | UCL is Copyright (C) 1996-2000 Markus Franz Xaver Johannes Oberhumer 49 | 50 | 51 | GNU GENERAL PUBLIC LICENSE 52 | ========================== 53 | 54 | UPX and the UCL library are free software; you can redistribute them 55 | and/or modify them under the terms of the GNU General Public License as 56 | published by the Free Software Foundation; either version 2 of 57 | the License, or (at your option) any later version. 58 | 59 | UPX and UCL are distributed in the hope that they will be useful, 60 | but WITHOUT ANY WARRANTY; without even the implied warranty of 61 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 62 | GNU General Public License for more details. 63 | 64 | You should have received a copy of the GNU General Public License 65 | along with this program; see the file COPYING. 66 | 67 | 68 | SPECIAL EXCEPTION FOR COMPRESSED EXECUTABLES 69 | ============================================ 70 | 71 | The stub which is imbedded in each UPX compressed program is part 72 | of UPX and UCL, and contains code that is under our copyright. The 73 | terms of the GNU General Public License still apply as compressing 74 | a program is a special form of linking with our stub. 75 | 76 | Hereby Markus F.X.J. Oberhumer and Laszlo Molnar grant you special 77 | permission to freely use and distribute all UPX compressed programs 78 | (including commercial ones), subject to the following restrictions: 79 | 80 | 1. You must compress your program with a completely unmodified UPX 81 | version; either with our precompiled version, or (at your option) 82 | with a self compiled version of the unmodified UPX sources as 83 | distributed by us. 84 | 2. This also implies that the UPX stub must be completely unmodfied, i.e. 85 | the stub imbedded in your compressed program must be byte-identical 86 | to the stub that is produced by the official unmodified UPX version. 87 | 3. The decompressor and any other code from the stub must exclusively get 88 | used by the unmodified UPX stub for decompressing your program at 89 | program startup. No portion of the stub may get read, copied, 90 | called or otherwise get used or accessed by your program. 91 | 92 | 93 | ANNOTATIONS 94 | =========== 95 | 96 | - You can use a modified UPX version or modified UPX stub only for 97 | programs that are compatible with the GNU General Public License. 98 | 99 | - We grant you special permission to freely use and distribute all UPX 100 | compressed programs. But any modification of the UPX stub (such as, 101 | but not limited to, removing our copyright string or making your 102 | program non-decompressible) will immediately revoke your right to 103 | use and distribute a UPX compressed program. 104 | 105 | - UPX is not a software protection tool; by requiring that you use 106 | the unmodified UPX version for your proprietary programs we 107 | make sure that any user can decompress your program. This protects 108 | both you and your users as nobody can hide malicious code - 109 | any program that cannot be decompressed is highly suspicious 110 | by definition. 111 | 112 | - You can integrate all or part of UPX and UCL into projects that 113 | are compatible with the GNU GPL, but obviously you cannot grant 114 | any special exceptions beyond the GPL for our code in your project. 115 | 116 | - We want to actively support manufacturers of virus scanners and 117 | similar security software. Please contact us if you would like to 118 | incorporate parts of UPX or UCL into such a product. 119 | 120 | 121 | 122 | Markus F.X.J. Oberhumer Laszlo Molnar 123 | markus.oberhumer@jk.uni-linz.ac.at ml1050@cdata.tvnet.hu 124 | 125 | Linz, Austria, 25 Feb 2000 126 | 127 | 128 | 129 | -----BEGIN PGP SIGNATURE----- 130 | Version: 2.6.3ia 131 | Charset: noconv 132 | 133 | iQCVAwUBOLaLS210fyLu8beJAQFYVAP/ShzENWKLTvedLCjZbDcwaBEHfUVcrGMI 134 | wE7frMkbWT2zmkdv9hW90WmjMhOBu7yhUplvN8BKOtLiolEnZmLCYu8AGCwr5wBf 135 | dfLoClxnzfTtgQv5axF1awp4RwCUH3hf4cDrOVqmAsWXKPHtm4hx96jF6L4oHhjx 136 | OO03+ojZdO8= 137 | =CS52 138 | -----END PGP SIGNATURE----- 139 | -------------------------------------------------------------------------------- /upx-4.2.4-win64/NEWS: -------------------------------------------------------------------------------- 1 | ================================================================== 2 | User visible changes for UPX 3 | ================================================================== 4 | 5 | Changes in 4.2.4 (09 May 2024): 6 | * bug fixes - see https://github.com/upx/upx/milestone/17 7 | 8 | Changes in 4.2.3 (27 Mar 2024): 9 | * bug fixes - see https://github.com/upx/upx/milestone/16 10 | 11 | Changes in 4.2.2 (03 Jan 2024): 12 | * bug fixes - see https://github.com/upx/upx/milestone/15 13 | 14 | Changes in 4.2.1 (01 Nov 2023): 15 | * linux: /proc/self/exe now is optional 16 | * windows: use SetFileTime to preserve sub-second file timestamps 17 | * official Windows builds: revert activeCodePage change introduced in 4.2.0 18 | * bug fixes - see https://github.com/upx/upx/milestone/14 19 | 20 | Changes in 4.2.0 (26 Oct 2023): 21 | * win32/pe and win64/pe: stricter relocation checks; please report regressions 22 | * unix: use utimensat to preserve sub-second file timestamps 23 | * new option '--link' to preserve hard-links (Unix only; use with care) 24 | * add support for NO_COLOR env var; see https://no-color.org/ 25 | * disable macOS support until we fix compatibility with macOS 13+ 26 | * official Windows builds: set activeCodePage to UTF-8 27 | * bug fixes - see https://github.com/upx/upx/milestone/13 28 | 29 | Changes in 4.1.0 (08 Aug 2023): 30 | * ELF: handle shared libraries with more than 2 PT_LOAD segments 31 | * bug fixes - see https://github.com/upx/upx/milestone/11 32 | 33 | Changes in 4.0.2 (30 Jan 2023): 34 | * bug fixes - see https://github.com/upx/upx/milestone/9 35 | 36 | Changes in 4.0.1 (16 Nov 2022): 37 | * bug fixes - see https://github.com/upx/upx/milestone/8 38 | 39 | Changes in 4.0.0 (28 Oct 2022): 40 | * Switch to semantic versioning 41 | * SECURITY NOTES: emphasize the security context in the docs 42 | * Support easy building from source code with CMake 43 | * Support easy rebuilding the stubs from source with Podman/Docker 44 | * Add integrated doctest C++ testing framework 45 | * Add support for EFI files (PE x86; Kornel Pal) 46 | * win32/pe and win64/pe: set correct SizeOfHeaders in the PE header 47 | * bug fixes - see https://github.com/upx/upx/milestone/6 48 | * bug fixes - see https://github.com/upx/upx/milestone/7 49 | 50 | Changes in 3.96 (23 Jan 2020): 51 | * bug fixes - see https://github.com/upx/upx/milestone/5 52 | 53 | Changes in 3.95 (26 Aug 2018): 54 | * Flag --android-shlib to work around bad design in Android 55 | * Flag --force-pie when ET_DYN main program is not marked as DF_1_PIE 56 | * Better compatibility with varying layout of address space on Linux 57 | * Support for 4 PT_LOAD layout in ELF generated by binutils-2.31 58 | * bug fixes, particularly better diagnosis of malformed input 59 | * bug fixes - see https://github.com/upx/upx/milestone/4 60 | 61 | Changes in 3.94 (12 May 2017): 62 | * Add support for arm64-linux (aka "aarch64"). 63 | * Add support for --lzma compression on 64-bit PowerPC (Thierry Fauck). 64 | * For Mach, "upx -d" will unpack a prefix of the file (and warn). 65 | * Various improvements to the ELF formats. 66 | * bug fixes - see https://github.com/upx/upx/milestone/3 67 | 68 | Changes in 3.93 (29 Jan 2017): 69 | * Fixed some win32/pe and win64/pe regressions introduced in 3.92 70 | * bug fixes - see https://github.com/upx/upx/milestone/2 71 | 72 | Changes in 3.92 (11 Dec 2016): 73 | * INFO: UPX has moved to GitHub - the new home page is https://upx.github.io 74 | * IMPORTANT: all PE formats: internal changes: reunited the diverged source 75 | files - please report all regressions into the bug tracker and try UPX 3.91 76 | in case of problems. 77 | * Support Apple MacOS 10.12 "Sierra", including more-robust de-compression. 78 | * Explicitly diagnose Go-language bad PT_LOAD; recommend hemfix.c. 79 | https://sourceforge.net/p/upx/bugs/195/ https://github.com/pwaller/goupx 80 | * Fix CERT-FI Case 829767 UPX command line tools segfaults. 81 | Received by UPX Team on 2015-May-08; originally reported 82 | by Codenomicon to NCSC-FI on 2015-01-08. 83 | The vulnerabilities were discovered by Joonas Kuorilehto and 84 | Antti Häyrynen from Codenomicon. 85 | * bug fixes - see https://github.com/upx/upx/milestone/1 86 | 87 | Changes in 3.91 (30 Sep 2013): 88 | * Added experimental support for Windows 64-bit PE files, based on 89 | work by Stefan Widmann. Please use for testing only! 90 | * bug fixes 91 | 92 | ================================================================== 93 | 94 | Changes in 3.09 (18 Feb 2013): 95 | * New option --preserve-build-id for GNU ELF. 96 | * Allow for code signing and LC_UUID on Mac OS X executables. 97 | * Allow non-contiguous LC_SEGMENTs and 0==.vmsize for Mach-O. 98 | * Allow zero-filled final page in PackUnix::canUnpack(). 99 | * bug fixes 100 | 101 | Changes in 3.08 (12 Dec 2011): 102 | * Fix allocation in runtime stub for darwin.macho-entry (i386 and amd64). 103 | * Compress shared library on ELF i386 only [ld.so threatens even this case]. 104 | * Attempt to support ELF on QNX 6.3.0 for armel (experimental). 105 | * Better diagnostic when ELF -fPIC is needed. 106 | * PT_NOTE improvements for BSD. 107 | * Preserve more ELF .e_flags on ARM. 108 | * Minor code improvements for ELF stubs. 109 | * Defend against another flavor of corrupt PE header. 110 | * bug fixes 111 | 112 | Changes in 3.07 (08 Sep 2010): 113 | * win32/pe: fixed relocation handling for files with *no* TLS callbacks 114 | [severe bug introduced in 3.06] 115 | 116 | Changes in 3.06 (04 Sep 2010): 117 | * win32/pe: TLS callback support contributed by Stefan Widmann. Thanks! 118 | * bug fixes 119 | 120 | Changes in 3.05 (27 Apr 2010): 121 | * i386-linux and amd64-linux support shared libraries (DT_INIT must 122 | exist, all info needed by runtime loader must be first in .text, etc.) 123 | * Linux /proc/self/exe now is preserved by default, by leaving behind 124 | one page. New compress-time option --unmap-all-pages is available. 125 | * Withdraw support for shared libraries on Darwin (Apple Mac OS X) 126 | because upx does not understand enough about .dylib. 127 | * bug fixes 128 | 129 | Changes in 3.04 (27 Sep 2009): 130 | * new format Mach/AMD64 supports 64-bit programs on Apple Macintosh. 131 | * new formats Dylib/i386 and Dylib/ppc32 support shared libraries 132 | [such as browser plugins] on Darwin (Apple Macintosh). An existing 133 | -init function (LC_ROUTINES command) is required. 134 | * new format vmlinuz/armel for Debian NSLU2 (etc.) linux kernel 135 | * bvmlinuz boot protocol 2.08 for 386 Linux kernel 136 | * Extended ABI version 4 for armel-eabi ARM Linux ELF 137 | * bug fixes 138 | 139 | Changes in 3.03 (27 Apr 2008): 140 | * implement cache flushing for PowerPC (esp. model 440) 141 | * fix cache flushing on MIPS (>3 MiB compressed, or with holes) 142 | * fix MIPS big-endian 143 | * bug fixes 144 | 145 | Changes in 3.02 (16 Dec 2007): 146 | * fix unmapping on arm-linux.elf 147 | * fix error checking in mmap for i386-linux.elf [triggered by -fPIE] 148 | * bug fixes 149 | 150 | Changes in 3.01 (31 Jul 2007): 151 | * new options --no-mode, --no-owner and --no-time to disable preservation 152 | of mode (file permissions), file ownership and timestamps. 153 | * dos/exe: fixed an incorrect error message caused by a bug in 154 | relocation handling 155 | * new format linux/mipsel supports ELF on [32-bit] R3000 156 | * fix argv[0] on PowerPC with --lzma 157 | * bug fixes 158 | 159 | Changes in 3.00 (27 Apr 2007): 160 | * watcom/le & tmt/adam: fixed a problem when using certain filters 161 | 162 | Changes in 2.93 beta (08 Mar 2007): 163 | * new formats Mach/i386 and Mach/fat support Mac OS X i686 and 164 | Universal binaries [i686 and PowerPC only] 165 | * dos/exe: LZMA is now also supported for 16-bit dos/exe. Please note that 166 | you have to explicitly use '--lzma' even for '--ultra-brute' here 167 | because runtime decompression is about 30 times slower than NRV - 168 | which is really noticeable on old machines. 169 | * dos/exe: fixed a rarely occurring bug in relocation handling 170 | * win32/pe & arm/pe: better icon compression handling 171 | 172 | Changes in 2.92 beta (23 Jan 2007): 173 | * new option '--ultra-brute' which tries even more variants 174 | * slightly improved compression ratio for some files when 175 | using '--brute' or '--ultra-brute' 176 | * bug fixes 177 | 178 | Changes in 2.91 beta (29 Nov 2006): 179 | * assorted bug fixes 180 | * wince/arm: fix "missing" icon & version info resource problem for WinCE 5 181 | * win32/pe & arm/pe: added option --compress-icons=3 to compress all icons 182 | 183 | Changes in 2.90 beta (08 Oct 2006): 184 | * LZMA algorithm support for most of the 32-bit and 64-bit file formats; 185 | use new option '--lzma' to enable 186 | * new format: BSD/elf386 supporting FreeBSD, NetBSD and OpenBSD 187 | via auto-detection of PT_NOTE or EI_OSABI 188 | * arm/pe: all the NRV compression methods are now supported 189 | (only NRV2D is missing in thumb mode) 190 | * linux/elf386, linux/ElfAMD: remember /proc/self/exe in environment 191 | * major source code changes: the runtime decompression stubs are now 192 | built from internal ELF objects 193 | 194 | ================================================================== 195 | 196 | Changes in 2.03 (07 Nov 2006): 197 | * bvmlinuz/386: fix for kernels not at 0x100000; also allow x86_64 198 | * linux/elf386: work around Linux kernel bug (0-length .bss needs PF_W) 199 | 200 | Changes in 2.02 (13 Aug 2006): 201 | * linux/386: work around Linux kernel bug (".bss" requires PF_W) 202 | * linux/ppc32, mach/ppc32: compressed programs now work on a 405 CPU 203 | * vmlinuz/386: fixed zlib uncompression problem on DOS 204 | 205 | Changes in 2.01 (06 Jun 2006): 206 | * arm/pe: better DLL support 207 | * dos/exe: device driver support added 208 | * linux/386: Fix --force-execve for PaX, grSecurity, and strict SELinux. 209 | /tmp must support execve(); therefore /tmp cannot be mounted 'noexec'. 210 | * win32/pe & arm/pe: added new option '--keep-resource=' for 211 | excluding selected resources from compression 212 | 213 | Changes in 2.00 (27 Apr 2006): 214 | * linux/386: the stub now prints an error message if some strict 215 | SELinux mode does prevent runtime decompression and execution 216 | (for a fully SELinux-compatible but otherwise inferior compression 217 | format you can use the '--force-execve' option) 218 | * linux/386: worked around a problem where certain Linux kernels 219 | clobber the %ebx register during a syscall 220 | * win32/pe: disable filters for files with broken PE headers 221 | 222 | Changes in 1.96 beta (13 Apr 2006): 223 | * arm/pe: added filter support 224 | * win32/pe: removed an unnecessary check so that Delphi 2006 and 225 | Digital Mars C++ programs finally are supported 226 | 227 | Changes in 1.95 beta (09 Apr 2006): 228 | * arm/pe: added DLL support 229 | * arm/pe: added thumb mode stub support 230 | * arm/pe: added unpacking support 231 | * win32/pe: really worked around R6002 runtime errors 232 | 233 | Changes in 1.94 beta (11 Mar 2006): 234 | * new format: added support for wince/arm (ARM executables running on WinCE) 235 | * new format: added support for linux elf/amd64 236 | * new format: added support for linux elf/ppc32 237 | * new format: added support for mach/ppc32 (Apple Mac OS X) 238 | * win32/pe: hopefully working "load config" support 239 | * win32/pe: R6002 runtime errors worked around 240 | * win32/pe: the stub now clears the dirty stack 241 | 242 | Changes in 1.93 beta (07 Feb 2005): 243 | * vmlinuz/386: fixes to support more kernels 244 | 245 | Changes in 1.92 beta (20 Jul 2004): 246 | * win32/pe: added option '--strip-loadconf' to strip the SEH load 247 | config section [NOTE: this option is obsolete since UPX 1.94] 248 | * win32/pe: try to detect .NET (win32/net) files [not yet supported by UPX] 249 | * vmlinux/386: new format that directly supports building Linux kernels 250 | * source code: now compiles cleanly under Win64 251 | 252 | Changes in 1.91 beta (30 Jun 2004): 253 | * djgpp2/coff: added support for recent binutils versions 254 | * linux/elf386, linux/sh386: lots of improvements 255 | * vmlinuz/386: added support for recent kernels 256 | * watcom/le: don't crash on files without relocations 257 | * win32/pe: stricter checks of some PE values 258 | * option '--brute' now implies '--crp-ms=999999'. 259 | * source code: much improved portability using ACC, the 260 | Automatic Compiler Configuration 261 | * source code: compile fixes for strict ISO C++ compilers 262 | * source code: compile fixes for Win64 263 | * re-synced with upx 1.25 branch 264 | 265 | Changes in 1.90 beta (11 Nov 2002): 266 | * implemented several new options for finer compression control: 267 | '--all-methods', '--all-filters' and '--brute' 268 | * ps1/exe: new format - UPX now supports PlayStation One programs 269 | * linux/386: added the option '--force-execve' 270 | * vmlinuz/386: better kernel detection and sanity checks 271 | * re-synced with upx 1.24 branch 272 | * documentation updates 273 | 274 | Changes in 1.11 beta (20 Dec 2000): 275 | * vmlinuz/386: new format - UPX now supports bootable linux kernels 276 | * linux/elf386: added the new ELF direct-to-memory executable format - no 277 | more temp files are needed for decompression! 278 | * linux/sh386: added the new shell direct-to-memory executable format - no 279 | more temp files are needed for decompression! 280 | * reduced overall memory requirements during packing 281 | * quite a number of internal source code rearrangements 282 | 283 | ================================================================== 284 | 285 | Changes in 1.25 (29 Jun 2004) 286 | * INFO: http://upx.sourceforge.net is the new UPX home page 287 | * watcom/le: don't crash on files without relocations 288 | * win32/pe: stricter checks of some PE values 289 | * source code: much improved portability using ACC, the 290 | Automatic Compiler Configuration 291 | * source code: compile fixes for strict ISO C++ compilers 292 | * source code: compile fixes for Win64 293 | 294 | Changes in 1.24 (07 Nov 2002) 295 | * djgpp2/coff: stricter check of the COFF header to work around a 296 | problem with certain binutils versions 297 | 298 | Changes in 1.23 (05 Sep 2002) 299 | * atari/tos: fixed an unpacking problem where a buffer was too 300 | small (introduced in 1.22) 301 | * linux/386: don't give up too early if a single block turns out 302 | to be incompressible 303 | * documentation: added some quick tips how to achieve the best 304 | compression ratio for the final release of your application 305 | * fixed a rare situation where the exit code was not set correctly 306 | 307 | Changes in 1.22 (27 Jun 2002) 308 | * atari/tos: the stub now flushes the CPU cache to avoid 309 | problems on 68030+ machines 310 | * source code: additional compiler support for Borland C++, 311 | Digital Mars C++ and Watcom C++ 312 | 313 | Changes in 1.21 (01 Jun 2002) 314 | * New option '--crp-ms=' for slightly better compression at the cost 315 | of higher memory requirements during compression. 316 | Try 'upx --best --crp-ms=100000'. See the docs for more info. 317 | * source code: portability fixes 318 | * source code: compile fixes for g++ 3.0 and g++ 3.1 319 | 320 | Changes in 1.20 (23 May 2001) 321 | * slightly faster compression 322 | * work around a gcc problem in the latest djgpp2 distribution 323 | * watcom/le: fixed detection of already compressed files 324 | * win32/pe: do not compress RT_MANIFEST resource types 325 | * win32/pe: improved the error message for empty resource sections 326 | * [NOTE: the jump from 1.08 to 1.20 is to avoid confusion with 327 | our unstable development releases 1.1x and 1.9x] 328 | 329 | Changes in 1.08 (30 Apr 2001) 330 | * new native port to atari/tos 331 | * win32/pe: shortened the identstring 332 | * source code: portability fixes - UPX now builds cleanly under m68k CPUs 333 | 334 | Changes in 1.07 (20 Feb 2001) 335 | * win32/pe: corrected the TLS callback check 336 | * win32/pe: really fixed that rare bug in relocation handling 337 | * win32/pe: experimental support for SizeOfHeaders > 0x1000 338 | * win32/pe: check for superfluous data between sections 339 | * win32/pe: compressing screensavers (.scr) should finally work 340 | 341 | Changes in 1.06 (27 Jan 2001) 342 | * win32/pe: the check for TLS callbacks introduced in 1.05 343 | was too strict - disabled for now 344 | * dos/com: decreased the decompressor stack size a little bit 345 | 346 | Changes in 1.05 (24 Jan 2001) 347 | * win32/pe: refuse to compress programs with TLS callbacks 348 | * win32/pe: stub changes to avoid slowdowns with some virus monitors 349 | * win32/pe: reverted the relocation handling changes in 1.04 350 | * linux/386: dont try to compress Linux kernel images (have a look 351 | at the unstable UPX 1.1x beta versions for that) 352 | 353 | Changes in 1.04 (19 Dec 2000) 354 | * dos/exe: fixed an internal error when using '--no-reloc' 355 | * win32/pe: fixed a rare bug in the relocation handling code 356 | * some tunings for the default compression level 357 | 358 | Changes in 1.03 (30 Nov 2000) 359 | * linked with a new version of the NRV compression library: 360 | - improved compression ratio a little bit 361 | - overall significantly faster compression 362 | - much faster when using high compression levels like '-9' or '--best' 363 | - much faster with large files 364 | * atari/tos: added support for FreeMiNT 365 | * the 32-bit DOS version now uses the new CWSDSTUB extender 366 | 367 | Changes in 1.02 (13 Sep 2000) 368 | * watcom/le: fixed a problem with the Causeway extender 369 | * win32/pe: don't automatically strip relocs if they seem needed 370 | * support multiple backup generations when using '-k' 371 | * updated the console screen driver 372 | 373 | Changes in 1.01 (09 Apr 2000) 374 | * win32/pe: fixed an uncompression problem in DLLs with empty 375 | fixup sections 376 | * win32/pe: fixed another rare uncompression problem - a field in the 377 | PE header was set incorrectly 378 | 379 | Changes in 1.00 (26 Mar 2000) 380 | * documentation updates 381 | * watcom/le: do not duplicate the non-resident name table 382 | * win32/pe: fixed an import handling problem: sometimes too much data 383 | could be deleted from a file -> the uncompressed file would not work 384 | anymore 385 | 386 | Changes in 0.99.3 (07 Mar 2000) 387 | * win32/pe: fixed a rare problem in the stub string handling part 388 | 389 | Changes in 0.99.2 (02 Mar 2000) 390 | * dos/exe: fixed a typo causing an internal error (introduced in 0.99.1) 391 | 392 | Changes in 0.99.1 (29 Feb 2000) 393 | * win32/pe: fixed some object alignments which were causing 394 | problems when loading compressed DLLs under Windows NT/2000 395 | 396 | Changes in 0.99 (25 Feb 2000) 397 | * FULL SOURCE CODE RELEASED UNDER THE TERMS OF THE GNU GPL 398 | * win32/pe: changed default to '--strip-relocs=1' 399 | * dos/com and dos/sys: fixed a bad decompressor problem 400 | * linux/386: the counter for the progress indicator was off by one 401 | 402 | ================================================================== 403 | 404 | Changes in 0.94 (06 Dec 1999) 405 | * win32/pe: the stub now calls ExitProcess in case of import errors 406 | * under DOS and Windows, the environment variable UPX now accepts 407 | a '#' as replacement for '=' because of a COMMAND.COM limitation 408 | 409 | Changes in 0.93 (22 Nov 1999) 410 | * win32/pe: fixed --strip-relocs problem with uncompression 411 | * win32/pe: fixed a bug which could produce a broken decompressor stub 412 | * linux/386: yet another FreeBSD compatibility fix 413 | 414 | Changes in 0.92 (14 Nov 1999) 415 | * win32/pe: really fixed that one line (see below) 416 | 417 | Changes in 0.91 (13 Nov 1999) 418 | * win32/pe: an important one-line fix for the newly introduced problems 419 | * dos/com and dos/sys: fixed an internal error 420 | * dos/exe: correctly restore cs when uncompressing 421 | 422 | Changes in 0.90 (10 Nov 1999) 423 | * all formats: '--overlay=copy' now is the default overlay mode 424 | * improved compression ratio for most files 425 | * win32/pe: uncompression is finally supported 426 | * win32/pe: never compress REGISTRY resources 427 | * win32/pe: headersize was not set in PE header 428 | * win32/pe: resource handling is rewritten 429 | * win32/pe: the last :-) TLS problem is fixed 430 | * win32/pe: somewhat less memory is required during compression 431 | * linux/386: fixed compression of scripts which was broken since 0.71 432 | * linux/386: more FreeBSD compatibility issues 433 | * changed option: '-i' now prints some more details during compression 434 | (not finished yet) 435 | 436 | Changes in 0.84 (04 Oct 1999) 437 | * dos/exe: fixed a rare problem where the decompressor could crash 438 | * some other minor fixes 439 | 440 | Changes in 0.83 (17 Sep 1999) 441 | * dos/exe: fixed minimal memory requirement problem for some files 442 | * win32/pe: fixed a bug which caused a crash in some compressed files 443 | * linux/386: various improvements in the stub; also, for the sake 444 | of FreeBSD users, the stub is now branded as Linux/ELF 445 | 446 | Changes in 0.82 (16 Aug 1999) 447 | * dos/exe: fixed a decompressor bug which could cause crash on some files 448 | * linux/386: section headers are now stripped from the stub so that 449 | 'strip' won't ruin a compressed file any longer 450 | * wc/le: support for stack not in the last object disabled again 451 | * win32/pe: removed some unneeded data 452 | 453 | Changes in 0.81 (04 Aug 1999) 454 | * win32/pe: fixed an important bug in import handling 455 | * dos/com: fixed an internal error that could happen with very small files 456 | 457 | Changes in 0.80 (03 Aug 1999) 458 | * you can set some default options in the environment var 'UPX' 459 | * dos/com: the decompressor stub now checks for enough free memory 460 | * dos/exe: decompressor rewritten, some bugs are fixed 461 | * dos/exe: new option '--no-reloc': no relocation data is put into 462 | the DOS header 463 | * tmt/adam: added support for more stubs, detect already packed files 464 | * tmt/adam: new option '--copy-overlay' 465 | * wc/le: reduced memory requirement during uncompression 466 | * wc/le: support files which do not contain their stack in the last object 467 | * wc/le: fixed a bug which could cause a crash, improved relocation 468 | handling 469 | * wc/le: new option '--copy-overlay' 470 | * win32/pe: '--compress-icons=2' is now the default 471 | * win32/pe: even better TLS support 472 | * win32/pe: versioninfo works on NT 473 | * win32/pe: import by ordinal from kernel32.dll works 474 | * win32/pe: other import improvements: importing a nonexistent DLL 475 | results in a usual Windows message, importing a nonexistent function 476 | results in program exit (instead of crash ;-) 477 | * win32/pe: new option: '--compress-resources=0' 478 | * win32/pe: reduced memory requirement during uncompression, some 479 | files might even require LESS memory when they're compressed 480 | * win32/pe: TYPELIBs should work now 481 | * win32/pe: improved relocation handling, 16-bit relocations should work 482 | * win32/pe: new option '--strip-relocs' (only if you know what you are doing) 483 | * win32/pe: new option '--copy-overlay' 484 | * important internal changes: now the stubs are built at runtime 485 | 486 | Changes in 0.72 (12 May 1999) 487 | * tmt/adam: fixed a serious problem in the decompressor stub; all 488 | compressed tmt files should be recompressed 489 | * win32/pe: fixed the 'shared sections not supported' warning: 490 | read-only shared sections are fine 491 | * win32/pe: never compress TYPELIB resources 492 | * win32/pe: compressed files are hopefully less suspicious to heuristic 493 | virus scanners now 494 | * linux/386: minor decompressor stub updates, nicer progress bar 495 | 496 | Changes in 0.71 (19 Apr 1999) 497 | * dos/exe: added option '--no-overlay' 498 | * linux/386: various improvements in the stub, most notably the 499 | overhead for an extra cleanup process has been removed 500 | * win32/pe: added support for export forwarders 501 | * win32/pe: added support for DLLs without entry point or imports 502 | * win32/pe: yet another .bss fix 503 | * win32/pe: new option '--compress-icons=2': compress all icons 504 | which are not in the first icon directory 505 | * win32/pe: rearranged stub to avoid false alerts from some virus scanners 506 | 507 | Changes in 0.70 (30 Mar 1999) 508 | * added support for linux/386 executables 509 | * improved compression ratio quite a bit 510 | * added new compression level '--best' to squeeze out even some more bytes 511 | * win32/pe: TLS support is much better now 512 | * win32/pe: --compress-icons=0 should now work as well 513 | * the usual minor fixes for win32/pe 514 | 515 | Changes in 0.62 (16 Mar 1999) 516 | * win32/pe: --compress-icons and --compress-exports are on now by default 517 | * win32/pe: --compress-icons should really work now 518 | * win32/pe: fixed a problem with embedded .bss sections 519 | 520 | Changes in 0.61 (08 Mar 1999) 521 | * atari/tos: fixed a problem where the bss segment could become too small 522 | 523 | Changes in 0.60 (06 Mar 1999) 524 | * win32/pe: fixed file corruption when the size of the export data is invalid 525 | * win32/pe: fixed a problem with empty resource data 526 | * win32/pe: compressed file alignment set to minimum value 527 | * win32/pe: made all compressed sections writable 528 | * fixed some other win32/pe bugs 529 | * fixed an address optimization problem for some not Watcom LE files 530 | * fixed a bug which could make UPX hang when an exe header contained 531 | an illegal value 532 | * added some compression flags for the win32/pe format 533 | * added support for Atari ST/TT executables (atari/tos) 534 | * improved compression ratio 535 | * improved compression speed 536 | 537 | Changes in 0.51 (14 Jan 1999) 538 | * fixed a small bug in the PE header that would prevent some compressed 539 | win32/pe executables from running under Windows NT and WINE 540 | 541 | Changes in 0.50 (03 Jan 1999) 542 | * added support for PE format executables (win32/pe & rtm32/pe) 543 | * added support for TMT executables (tmt/adam) 544 | * fixed a dos/sys bug that affected OpenDOS 545 | 546 | Changes in 0.40 (05 Oct 1998) 547 | * improved compression ratio 548 | * fixed a small but fatal bug in dos/sys introduced in 0.30 549 | * fixed a rare bug in dos/exe 550 | * worked around a bug in djgpp's strip 2.8 551 | * djgpp2/coff: Allegro packfile support should work now 552 | * added dos/exeh compression method (works on 386+) 553 | 554 | Changes in 0.30 (27 Jul 1998) 555 | * fixed a serious bug in the 32-bit compressors - please don't use 556 | djgpp2/coff and watcom/le compressed files from previous versions, 557 | some of them are possibly damaged ! 558 | * the 16-bit uncompressors are a little bit shorter & faster 559 | * fixed progress indicator for VESA and SVGA text modes 560 | 561 | Changes in 0.20 (05 Jul 1998) 562 | * second public beta release 563 | * too many changes to list here 564 | 565 | Changes in 0.05 (26 May 1998) 566 | * first public beta release 567 | * based on experience gained from our previous packers DJP (djgpp2/coff, 1996), 568 | lzop (1996) and mfxpak (atari/tos, 1990) 569 | -------------------------------------------------------------------------------- /upx-4.2.4-win64/README: -------------------------------------------------------------------------------- 1 | ooooo ooo ooooooooo. ooooooo ooooo 2 | `888' `8' `888 `Y88. `8888 d8' 3 | 888 8 888 .d88' Y888..8P 4 | 888 8 888ooo88P' `8888' 5 | 888 8 888 .8PY888. 6 | `88. .8' 888 d8' `888b 7 | `YbodP' o888o o888o o88888o 8 | 9 | 10 | The Ultimate Packer for eXecutables 11 | Copyright (c) 1996-2024 Markus Oberhumer, Laszlo Molnar & John Reiser 12 | https://upx.github.io 13 | 14 | 15 | 16 | WELCOME 17 | ======= 18 | 19 | Welcome to UPX ! 20 | 21 | UPX is a free, secure, portable, extendable, high-performance 22 | executable packer for several executable formats. 23 | 24 | 25 | INTRODUCTION 26 | ============ 27 | 28 | UPX is an advanced executable file compressor. UPX will typically 29 | reduce the file size of programs and DLLs by around 50%-70%, thus 30 | reducing disk space, network load times, download times and 31 | other distribution and storage costs. 32 | 33 | Programs and libraries compressed by UPX are completely self-contained 34 | and run exactly as before, with no runtime or memory penalty for most 35 | of the supported formats. 36 | 37 | UPX supports a number of different executable formats, including 38 | Windows programs and DLLs, and Linux executables. 39 | 40 | UPX is free software distributed under the term of the GNU General 41 | Public License. Full source code is available. 42 | 43 | UPX may be distributed and used freely, even with commercial applications. 44 | See the UPX License Agreements for details. 45 | 46 | 47 | SECURITY CONTEXT 48 | ================ 49 | 50 | IMPORTANT NOTE: UPX inherits the security context of any files it handles. 51 | 52 | This means that packing, unpacking, or even testing or listing a file requires 53 | the same security considerations as actually executing the file. 54 | 55 | Use UPX on trusted files only! 56 | 57 | 58 | SHORT DOCUMENTATION 59 | =================== 60 | 61 | 'upx program.exe' will compress a program or DLL. For best compression 62 | results try 'upx --best program.exe' or 'upx --brute program.exe'. 63 | 64 | Please see the file UPX.DOC for the full documentation. The files 65 | NEWS and BUGS also contain various tidbits of information. 66 | 67 | 68 | THE FUTURE 69 | ========== 70 | 71 | - Stay up-to-date with ongoing OS and executable format changes 72 | 73 | - RISC-V 64 for Linux 74 | 75 | - ARM64 for Windows (help wanted) 76 | 77 | - We will *NOT* add any sort of protection and/or encryption. 78 | This only gives people a false feeling of security because 79 | all "protectors" can be broken by definition. 80 | 81 | - Fix all remaining bugs - please report any issues 82 | https://github.com/upx/upx/issues 83 | 84 | 85 | COPYRIGHT 86 | ========= 87 | 88 | Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer 89 | Copyright (C) 1996-2024 Laszlo Molnar 90 | Copyright (C) 2000-2024 John F. Reiser 91 | 92 | UPX is distributed with full source code under the terms of the 93 | GNU General Public License v2+; either under the pure GPLv2+ (see 94 | the file COPYING), or (at your option) under the GPLv+2 with special 95 | exceptions and restrictions granting the free usage for all binaries 96 | including commercial programs (see the file LICENSE). 97 | 98 | This program is distributed in the hope that it will be useful, 99 | but WITHOUT ANY WARRANTY; without even the implied warranty of 100 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 101 | 102 | You should have received a copy of the UPX License Agreements along 103 | with this program; see the files COPYING and LICENSE. If not, 104 | visit the UPX home page. 105 | 106 | 107 | Share and enjoy, 108 | Markus & Laszlo & John 109 | 110 | 111 | Markus F.X.J. Oberhumer Laszlo Molnar 112 | 113 | 114 | John F. Reiser 115 | 116 | 117 | 118 | [ The term UPX is a shorthand for the Ultimate Packer for eXecutables 119 | and holds no connection with potential owners of registered trademarks 120 | or other rights. ] 121 | -------------------------------------------------------------------------------- /upx-4.2.4-win64/THANKS.txt: -------------------------------------------------------------------------------- 1 | ooooo ooo ooooooooo. ooooooo ooooo 2 | `888' `8' `888 `Y88. `8888 d8' 3 | 888 8 888 .d88' Y888..8P 4 | 888 8 888ooo88P' `8888' 5 | 888 8 888 .8PY888. 6 | `88. .8' 888 d8' `888b 7 | `YbodP' o888o o888o o88888o 8 | 9 | 10 | The Ultimate Packer for eXecutables 11 | Copyright (c) 1996-2024 Markus Oberhumer, Laszlo Molnar & John Reiser 12 | https://upx.github.io 13 | 14 | 15 | .___.. . 16 | | |_ _.._ ;_/ __ 17 | | [ )(_][ )| \_) 18 | -------------------- 19 | 20 | UPX would not be what it is today without the invaluable help of 21 | everybody who was kind enough to spend time testing it, using it 22 | in applications and reporting bugs. 23 | 24 | The following people made especially gracious contributions of their 25 | time and energy in helping to track down bugs, add new features, and 26 | generally assist in the UPX maintainership process: 27 | 28 | Adam Ierymenko 29 | for severals ideas for the Linux version 30 | Andi Kleen and Jamie Lokier 31 | for the /proc/self/fd/X and other Linux suggestions 32 | Andreas Muegge 33 | for the Win32 GUI 34 | Atli Mar Gudmundsson 35 | for several comments on the win32/pe stub 36 | Charles W. Sandmann 37 | for the idea with the stubless decompressor in djgpp2/coff 38 | Ice 39 | for debugging the PE headersize problem down 40 | Jens Medoch 41 | for the ps1/exe format 42 | Joergen Ibsen and d'b 43 | for the relocation & address optimization ideas 44 | John S. Fine 45 | for the new version of the dos/exe decompressor 46 | Kornel Pal 47 | for the EFI support 48 | Lukundoo 49 | for beta testing 50 | Michael Devore 51 | for initial dos/exe device driver support 52 | Oleg V. Volkov 53 | for various FreeBSD specific information 54 | The Owl & G-RoM 55 | for the --compress-icons fix 56 | Ralph Roth 57 | for reporting several bugs 58 | Salvador Eduardo Tropea 59 | for beta testing 60 | Stefan Widmann 61 | for the win32/pe TLS callback support 62 | The WINE project (https://www.winehq.com/) 63 | for lots of useful information found in their PE loader sources 64 | Natascha 65 | -------------------------------------------------------------------------------- /upx-4.2.4-win64/upx-doc.txt: -------------------------------------------------------------------------------- 1 | NAME 2 | upx - compress or expand executable files 3 | 4 | SYNOPSIS 5 | upx [ *command* ] [ *options* ] *filename*... 6 | 7 | ABSTRACT 8 | The Ultimate Packer for eXecutables 9 | Copyright (c) 1996-2024 Markus Oberhumer, Laszlo Molnar & John Reiser 10 | https://upx.github.io 11 | 12 | UPX is a portable, extendable, high-performance executable packer for 13 | several different executable formats. It achieves an excellent 14 | compression ratio and offers **very** fast decompression. Your 15 | executables suffer no memory overhead or other drawbacks for most of the 16 | formats supported, because of in-place decompression. 17 | 18 | DISCLAIMER 19 | UPX comes with ABSOLUTELY NO WARRANTY; for details see the file COPYING. 20 | 21 | Please report all problems or suggestions to the authors. Thanks. 22 | 23 | SECURITY CONTEXT 24 | IMPORTANT NOTE: UPX inherits the security context of any files it 25 | handles. 26 | 27 | This means that packing, unpacking, or even testing or listing a file 28 | requires the same security considerations as actually executing the 29 | file. 30 | 31 | Use UPX on trusted files only! 32 | 33 | DESCRIPTION 34 | UPX is a versatile executable packer with the following features: 35 | 36 | - secure: as UPX is documented Open Source since many years any relevant 37 | Security/Antivirus software is able to peek inside UPX compressed 38 | apps to verify them 39 | 40 | - excellent compression ratio: typically compresses better than Zip, 41 | use UPX to decrease the size of your distribution ! 42 | 43 | - very fast decompression: more than 500 MB/sec on any reasonably modern 44 | machine 45 | 46 | - no memory overhead for your compressed executables for most of the 47 | supported formats because of in-place decompression 48 | 49 | - safe: you can list, test and unpack your executables. 50 | Also, a checksum of both the compressed and uncompressed file is 51 | maintained internally. 52 | 53 | - universal: UPX can pack a number of executable formats, including 54 | Windows programs and DLLs, macOS apps and Linux executables 55 | 56 | - portable: UPX is written in portable endian-neutral C++ 57 | 58 | - extendable: because of the class layout it's very easy to support 59 | new executable formats or add new compression algorithms 60 | 61 | - free: UPX is distributed with full source code under the GNU General 62 | Public License v2+, with special exceptions granting the free usage 63 | for commercial programs 64 | 65 | You probably understand now why we call UPX the "*ultimate*" executable 66 | packer. 67 | 68 | COMMANDS 69 | Compress 70 | This is the default operation, eg. upx yourfile.exe will compress the 71 | file specified on the command line. 72 | 73 | Decompress 74 | All UPX supported file formats can be unpacked using the -d switch, eg. 75 | upx -d yourfile.exe will uncompress the file you've just compressed. 76 | 77 | Test 78 | The -t command tests the integrity of the compressed and uncompressed 79 | data, eg. upx -t yourfile.exe check whether your file can be safely 80 | decompressed. Note, that this command doesn't check the whole file, only 81 | the part that will be uncompressed during program execution. This means 82 | that you should not use this command instead of a virus checker. 83 | 84 | List 85 | The -l command prints out some information about the compressed files 86 | specified on the command line as parameters, eg upx -l yourfile.exe 87 | shows the compressed / uncompressed size and the compression ratio of 88 | *yourfile.exe*. 89 | 90 | OPTIONS 91 | -q: be quiet, suppress warnings 92 | 93 | -q -q (or -qq): be very quiet, suppress errors 94 | 95 | -q -q -q (or -qqq): produce no output at all 96 | 97 | --help: prints the help 98 | 99 | --version: print the version of UPX 100 | 101 | --exact: when compressing, require to be able to get a byte-identical 102 | file after decompression with option -d. [NOTE: this is work in progress 103 | and is not supported for all formats yet. If you do care, as a 104 | workaround you can compress and then decompress your program a first 105 | time - any further compress-decompress steps should then yield 106 | byte-identical results as compared to the first decompressed version.] 107 | 108 | -k: keep backup files 109 | 110 | -o file: write output to file 111 | 112 | [ ...more docs need to be written... - type `upx --help' for now ] 113 | 114 | COMPRESSION LEVELS & TUNING 115 | UPX offers ten different compression levels from -1 to -9, and --best. 116 | The default compression level is -8 for files smaller than 512 KiB, and 117 | -7 otherwise. 118 | 119 | * Compression levels 1, 2 and 3 are pretty fast. 120 | 121 | * Compression levels 4, 5 and 6 achieve a good time/ratio performance. 122 | 123 | * Compression levels 7, 8 and 9 favor compression ratio over speed. 124 | 125 | * Compression level --best may take a long time. 126 | 127 | Note that compression level --best can be somewhat slow for large files, 128 | but you definitely should use it when releasing a final version of your 129 | program. 130 | 131 | Quick info for achieving the best compression ratio: 132 | 133 | * Try upx --brute --no-lzma myfile.exe or even upx --ultra-brute 134 | --no-lzma myfile.exe. 135 | 136 | * The option --lzma enables LZMA compression, which compresses better 137 | but is *significantly slower* at decompression. You probably do not 138 | want to use it for large files. 139 | 140 | (Note that --lzma is automatically enabled by --all-methods and 141 | --brute, use --no-lzma to override.) 142 | 143 | * Try if --overlay=strip works. 144 | 145 | * For win32/pe programs there's --strip-relocs=0. See notes below. 146 | 147 | OVERLAY HANDLING OPTIONS 148 | Info: An "overlay" means auxiliary data attached after the logical end 149 | of an executable, and it often contains application specific data (this 150 | is a common practice to avoid an extra data file, though it would be 151 | better to use resource sections). 152 | 153 | UPX handles overlays like many other executable packers do: it simply 154 | copies the overlay after the compressed image. This works with some 155 | files, but doesn't work with others, depending on how an application 156 | actually accesses this overlaid data. 157 | 158 | --overlay=copy Copy any extra data attached to the file. [DEFAULT] 159 | 160 | --overlay=strip Strip any overlay from the program instead of 161 | copying it. Be warned, this may make the compressed 162 | program crash or otherwise unusable. 163 | 164 | --overlay=skip Refuse to compress any program which has an overlay. 165 | 166 | ENVIRONMENT VARIABLE 167 | The environment variable UPX can hold a set of default options for UPX. 168 | These options are interpreted first and can be overwritten by explicit 169 | command line parameters. For example: 170 | 171 | for DOS/Windows: set UPX=-9 --compress-icons#0 172 | for sh/ksh/zsh: UPX="-9 --compress-icons=0"; export UPX 173 | for csh/tcsh: setenv UPX "-9 --compress-icons=0" 174 | 175 | Under DOS/Windows you must use '#' instead of '=' when setting the 176 | environment variable because of a COMMAND.COM limitation. 177 | 178 | Not all of the options are valid in the environment variable - UPX will 179 | tell you. 180 | 181 | You can explicitly use the --no-env option to ignore the environment 182 | variable. 183 | 184 | NOTES FOR THE SUPPORTED EXECUTABLE FORMATS 185 | NOTES FOR ATARI/TOS 186 | This is the executable format used by the Atari ST/TT, a Motorola 68000 187 | based personal computer which was popular in the late '80s. Support of 188 | this format is only because of nostalgic feelings of one of the authors 189 | and serves no practical purpose :-). See https://freemint.github.io for 190 | more info. 191 | 192 | Packed programs will be byte-identical to the original after 193 | uncompression. All debug information will be stripped, though. 194 | 195 | Extra options available for this executable format: 196 | 197 | --all-methods Compress the program several times, using all 198 | available compression methods. This may improve 199 | the compression ratio in some cases, but usually 200 | the default method gives the best results anyway. 201 | 202 | NOTES FOR BVMLINUZ/I386 203 | Same as vmlinuz/i386. 204 | 205 | NOTES FOR DOS/COM 206 | Obviously UPX won't work with executables that want to read data from 207 | themselves (like some commandline utilities that ship with Win95/98/ME). 208 | 209 | Compressed programs only work on a 286+. 210 | 211 | Packed programs will be byte-identical to the original after 212 | uncompression. 213 | 214 | Maximum uncompressed size: ~65100 bytes. 215 | 216 | Extra options available for this executable format: 217 | 218 | --8086 Create an executable that works on any 8086 CPU. 219 | 220 | --all-methods Compress the program several times, using all 221 | available compression methods. This may improve 222 | the compression ratio in some cases, but usually 223 | the default method gives the best results anyway. 224 | 225 | --all-filters Compress the program several times, using all 226 | available preprocessing filters. This may improve 227 | the compression ratio in some cases, but usually 228 | the default filter gives the best results anyway. 229 | 230 | NOTES FOR DOS/EXE 231 | dos/exe stands for all "normal" 16-bit DOS executables. 232 | 233 | Obviously UPX won't work with executables that want to read data from 234 | themselves (like some command line utilities that ship with 235 | Win95/98/ME). 236 | 237 | Compressed programs only work on a 286+. 238 | 239 | Extra options available for this executable format: 240 | 241 | --8086 Create an executable that works on any 8086 CPU. 242 | 243 | --no-reloc Use no relocation records in the exe header. 244 | 245 | --all-methods Compress the program several times, using all 246 | available compression methods. This may improve 247 | the compression ratio in some cases, but usually 248 | the default method gives the best results anyway. 249 | 250 | NOTES FOR DOS/SYS 251 | Compressed programs only work on a 286+. 252 | 253 | Packed programs will be byte-identical to the original after 254 | uncompression. 255 | 256 | Maximum uncompressed size: ~65350 bytes. 257 | 258 | Extra options available for this executable format: 259 | 260 | --8086 Create an executable that works on any 8086 CPU. 261 | 262 | --all-methods Compress the program several times, using all 263 | available compression methods. This may improve 264 | the compression ratio in some cases, but usually 265 | the default method gives the best results anyway. 266 | 267 | --all-filters Compress the program several times, using all 268 | available preprocessing filters. This may improve 269 | the compression ratio in some cases, but usually 270 | the default filter gives the best results anyway. 271 | 272 | NOTES FOR DJGPP2/COFF 273 | First of all, it is recommended to use UPX *instead* of strip. strip has 274 | the very bad habit of replacing your stub with its own (outdated) 275 | version. Additionally UPX corrects a bug/feature in strip v2.8.x: it 276 | will fix the 4 KiB alignment of the stub. 277 | 278 | UPX includes the full functionality of stubify. This means it will 279 | automatically stubify your COFF files. Use the option --coff to disable 280 | this functionality (see below). 281 | 282 | UPX automatically handles Allegro packfiles. 283 | 284 | The DLM format (a rather exotic shared library extension) is not 285 | supported. 286 | 287 | Packed programs will be byte-identical to the original after 288 | uncompression. All debug information and trailing garbage will be 289 | stripped, though. 290 | 291 | Extra options available for this executable format: 292 | 293 | --coff Produce COFF output instead of EXE. By default 294 | UPX keeps your current stub. 295 | 296 | --all-methods Compress the program several times, using all 297 | available compression methods. This may improve 298 | the compression ratio in some cases, but usually 299 | the default method gives the best results anyway. 300 | 301 | --all-filters Compress the program several times, using all 302 | available preprocessing filters. This may improve 303 | the compression ratio in some cases, but usually 304 | the default filter gives the best results anyway. 305 | 306 | NOTES FOR LINUX [general] 307 | Introduction 308 | 309 | Linux/386 support in UPX consists of 3 different executable formats, 310 | one optimized for ELF executables ("linux/elf386"), one optimized 311 | for shell scripts ("linux/sh386"), and one generic format 312 | ("linux/386"). 313 | 314 | We will start with a general discussion first, but please 315 | also read the relevant docs for each of the individual formats. 316 | 317 | Also, there is special support for bootable kernels - see the 318 | description of the vmlinuz/386 format. 319 | 320 | General user's overview 321 | 322 | Running a compressed executable program trades less space on a 323 | ``permanent'' storage medium (such as a hard disk, floppy disk, 324 | CD-ROM, flash memory, EPROM, etc.) for more space in one or more 325 | ``temporary'' storage media (such as RAM, swap space, /tmp, etc.). 326 | Running a compressed executable also requires some additional CPU 327 | cycles to generate the compressed executable in the first place, 328 | and to decompress it at each invocation. 329 | 330 | How much space is traded? It depends on the executable, but many 331 | programs save 30% to 50% of permanent disk space. How much CPU 332 | overhead is there? Again, it depends on the executable, but 333 | decompression speed generally is at least many megabytes per second, 334 | and frequently is limited by the speed of the underlying disk 335 | or network I/O. 336 | 337 | Depending on the statistics of usage and access, and the relative 338 | speeds of CPU, RAM, swap space, /tmp, and file system storage, then 339 | invoking and running a compressed executable can be faster than 340 | directly running the corresponding uncompressed program. 341 | The operating system might perform fewer expensive I/O operations 342 | to invoke the compressed program. Paging to or from swap space 343 | or /tmp might be faster than paging from the general file system. 344 | ``Medium-sized'' programs which access about 1/3 to 1/2 of their 345 | stored program bytes can do particularly well with compression. 346 | Small programs tend not to benefit as much because the absolute 347 | savings is less. Big programs tend not to benefit proportionally 348 | because each invocation may use only a small fraction of the program, 349 | yet UPX decompresses the entire program before invoking it. 350 | But in environments where disk or flash memory storage is limited, 351 | then compression may win anyway. 352 | 353 | Currently, executables compressed by UPX do not share RAM at runtime 354 | in the way that executables mapped from a file system do. As a 355 | result, if the same program is run simultaneously by more than one 356 | process, then using the compressed version will require more RAM and/or 357 | swap space. So, shell programs (bash, csh, etc.) and ``make'' 358 | might not be good candidates for compression. 359 | 360 | UPX recognizes three executable formats for Linux: Linux/elf386, 361 | Linux/sh386, and Linux/386. Linux/386 is the most generic format; 362 | it accommodates any file that can be executed. At runtime, the UPX 363 | decompression stub re-creates in /tmp a copy of the original file, 364 | and then the copy is (re-)executed with the same arguments. 365 | ELF binary executables prefer the Linux/elf386 format by default, 366 | because UPX decompresses them directly into RAM, uses only one 367 | exec, does not use space in /tmp, and does not use /proc. 368 | Shell scripts where the underlying shell accepts a ``-c'' argument 369 | can use the Linux/sh386 format. UPX decompresses the shell script 370 | into low memory, then maps the shell and passes the entire text of the 371 | script as an argument with a leading ``-c''. 372 | 373 | General benefits: 374 | 375 | - UPX can compress all executables, be it AOUT, ELF, libc4, libc5, 376 | libc6, Shell/Perl/Python/... scripts, standalone Java .class 377 | binaries, or whatever... 378 | All scripts and programs will work just as before. 379 | 380 | - Compressed programs are completely self-contained. No need for 381 | any external program. 382 | 383 | - UPX keeps your original program untouched. This means that 384 | after decompression you will have a byte-identical version, 385 | and you can use UPX as a file compressor just like gzip. 386 | [ Note that UPX maintains a checksum of the file internally, 387 | so it is indeed a reliable alternative. ] 388 | 389 | - As the stub only uses syscalls and isn't linked against libc it 390 | should run under any Linux configuration that can run ELF 391 | binaries. 392 | 393 | - For the same reason compressed executables should run under 394 | FreeBSD and other systems which can run Linux binaries. 395 | [ Please send feedback on this topic ] 396 | 397 | General drawbacks: 398 | 399 | - It is not advisable to compress programs which usually have many 400 | instances running (like `sh' or `make') because the common segments of 401 | compressed programs won't be shared any longer between different 402 | processes. 403 | 404 | - `ldd' and `size' won't show anything useful because all they 405 | see is the statically linked stub. Since version 0.82 the section 406 | headers are stripped from the UPX stub and `size' doesn't even 407 | recognize the file format. The file patches/patch-elfcode.h has a 408 | patch to fix this bug in `size' and other programs which use GNU BFD. 409 | 410 | General notes: 411 | 412 | - As UPX leaves your original program untouched it is advantageous 413 | to strip it before compression. 414 | 415 | - If you compress a script you will lose platform independence - 416 | this could be a problem if you are using NFS mounted disks. 417 | 418 | - Compression of suid, guid and sticky-bit programs is rejected 419 | because of possible security implications. 420 | 421 | - For the same reason there is no sense in making any compressed 422 | program suid. 423 | 424 | - Obviously UPX won't work with executables that want to read data 425 | from themselves. E.g., this might be a problem for Perl scripts 426 | which access their __DATA__ lines. 427 | 428 | - In case of internal errors the stub will abort with exitcode 127. 429 | Typical reasons for this to happen are that the program has somehow 430 | been modified after compression. 431 | Running `strace -o strace.log compressed_file' will tell you more. 432 | 433 | NOTES FOR LINUX/ELF386 434 | Please read the general Linux description first. 435 | 436 | The linux/elf386 format decompresses directly into RAM, uses only one 437 | exec, does not use space in /tmp, and does not use /proc. 438 | 439 | Linux/elf386 is automatically selected for Linux ELF executables. 440 | 441 | Packed programs will be byte-identical to the original after 442 | uncompression. 443 | 444 | How it works: 445 | 446 | For ELF executables, UPX decompresses directly to memory, simulating 447 | the mapping that the operating system kernel uses during exec(), 448 | including the PT_INTERP program interpreter (if any). 449 | The brk() is set by a special PT_LOAD segment in the compressed 450 | executable itself. UPX then wipes the stack clean except for 451 | arguments, environment variables, and Elf_auxv entries (this is 452 | required by bugs in the startup code of /lib/ld-linux.so as of 453 | May 2000), and transfers control to the program interpreter or 454 | the e_entry address of the original executable. 455 | 456 | The UPX stub is about 1700 bytes long, partly written in assembler 457 | and only uses kernel syscalls. It is not linked against any libc. 458 | 459 | Specific drawbacks: 460 | 461 | - For linux/elf386 and linux/sh386 formats, you will be relying on 462 | RAM and swap space to hold all of the decompressed program during 463 | the lifetime of the process. If you already use most of your swap 464 | space, then you may run out. A system that is "out of memory" 465 | can become fragile. Many programs do not react gracefully when 466 | malloc() returns 0. With newer Linux kernels, the kernel 467 | may decide to kill some processes to regain memory, and you 468 | may not like the kernel's choice of which to kill. Running 469 | /usr/bin/top is one way to check on the usage of swap space. 470 | 471 | Extra options available for this executable format: 472 | 473 | (none) 474 | 475 | NOTES FOR LINUX/SH386 476 | Please read the general Linux description first. 477 | 478 | Shell scripts where the underling shell accepts a ``-c'' argument can 479 | use the Linux/sh386 format. UPX decompresses the shell script into low 480 | memory, then maps the shell and passes the entire text of the script as 481 | an argument with a leading ``-c''. It does not use space in /tmp, and 482 | does not use /proc. 483 | 484 | Linux/sh386 is automatically selected for shell scripts that use a known 485 | shell. 486 | 487 | Packed programs will be byte-identical to the original after 488 | uncompression. 489 | 490 | How it works: 491 | 492 | For shell script executables (files beginning with "#!/" or "#! /") 493 | where the shell is known to accept "-c ", UPX decompresses 494 | the file into low memory, then maps the shell (and its PT_INTERP), 495 | and passes control to the shell with the entire decompressed file 496 | as the argument after "-c". Known shells are sh, ash, bash, bsh, csh, 497 | ksh, tcsh, pdksh. Restriction: UPX cannot use this method 498 | for shell scripts which use the one optional string argument after 499 | the shell name in the script (example: "#! /bin/sh option3\n".) 500 | 501 | The UPX stub is about 1700 bytes long, partly written in assembler 502 | and only uses kernel syscalls. It is not linked against any libc. 503 | 504 | Specific drawbacks: 505 | 506 | - For linux/elf386 and linux/sh386 formats, you will be relying on 507 | RAM and swap space to hold all of the decompressed program during 508 | the lifetime of the process. If you already use most of your swap 509 | space, then you may run out. A system that is "out of memory" 510 | can become fragile. Many programs do not react gracefully when 511 | malloc() returns 0. With newer Linux kernels, the kernel 512 | may decide to kill some processes to regain memory, and you 513 | may not like the kernel's choice of which to kill. Running 514 | /usr/bin/top is one way to check on the usage of swap space. 515 | 516 | Extra options available for this executable format: 517 | 518 | (none) 519 | 520 | NOTES FOR LINUX/386 521 | Please read the general Linux description first. 522 | 523 | The generic linux/386 format decompresses to /tmp and needs /proc file 524 | system support. It starts the decompressed program via the execve() 525 | syscall. 526 | 527 | Linux/386 is only selected if the specialized linux/elf386 and 528 | linux/sh386 won't recognize a file. 529 | 530 | Packed programs will be byte-identical to the original after 531 | uncompression. 532 | 533 | How it works: 534 | 535 | For files which are not ELF and not a script for a known "-c" shell, 536 | UPX uses kernel execve(), which first requires decompressing to a 537 | temporary file in the file system. Interestingly - 538 | because of the good memory management of the Linux kernel - this 539 | often does not introduce a noticeable delay, and in fact there 540 | will be no disk access at all if you have enough free memory as 541 | the entire process takes places within the file system buffers. 542 | 543 | A compressed executable consists of the UPX stub and an overlay 544 | which contains the original program in a compressed form. 545 | 546 | The UPX stub is a statically linked ELF executable and does 547 | the following at program startup: 548 | 549 | 1) decompress the overlay to a temporary location in /tmp 550 | 2) open the temporary file for reading 551 | 3) try to delete the temporary file and start (execve) 552 | the uncompressed program in /tmp using /proc//fd/X as 553 | attained by step 2) 554 | 4) if that fails, fork off a subprocess to clean up and 555 | start the program in /tmp in the meantime 556 | 557 | The UPX stub is about 1700 bytes long, partly written in assembler 558 | and only uses kernel syscalls. It is not linked against any libc. 559 | 560 | Specific drawbacks: 561 | 562 | - You need additional free disk space for the uncompressed program 563 | in your /tmp directory. This program is deleted immediately after 564 | decompression, but you still need it for the full execution time 565 | of the program. 566 | 567 | - You must have /proc file system support as the stub wants to open 568 | /proc//exe and needs /proc//fd/X. This also means that you 569 | cannot compress programs that are used during the boot sequence 570 | before /proc is mounted. 571 | 572 | - Utilities like `top' will display numerical values in the process 573 | name field. This is because Linux computes the process name from 574 | the first argument of the last execve syscall (which is typically 575 | something like /proc//fd/3). 576 | 577 | - Because of temporary decompression to disk the decompression speed 578 | is not as fast as with the other executable formats. Still, I can see 579 | no noticeable delay when starting programs like my ~3 MiB emacs (which 580 | is less than 1 MiB when compressed :-). 581 | 582 | Extra options available for this executable format: 583 | 584 | --force-execve Force the use of the generic linux/386 "execve" 585 | format, i.e. do not try the linux/elf386 and 586 | linux/sh386 formats. 587 | 588 | NOTES FOR PS1/EXE 589 | This is the executable format used by the Sony PlayStation (PSone), a 590 | MIPS R3000 based gaming console which is popular since the late '90s. 591 | Support of this format is very similar to the Atari one, because of 592 | nostalgic feelings of one of the authors. 593 | 594 | Packed programs will be byte-identical to the original after 595 | uncompression, until further notice. 596 | 597 | Maximum uncompressed size: ~1.89 / ~7.60 MiB. 598 | 599 | Notes: 600 | 601 | - UPX creates as default a suitable executable for CD-Mastering 602 | and console transfer. For a CD-Master main executable you could also try 603 | the special option "--boot-only" as described below. 604 | It has been reported that upx packed executables are fully compatible with 605 | the Sony PlayStation 2 (PS2, PStwo) and Sony PlayStation Portable (PSP) in 606 | Sony PlayStation (PSone) emulation mode. 607 | 608 | - Normally the packed files use the same memory areas like the uncompressed 609 | versions, so they will not override other memory areas while unpacking. 610 | If this isn't possible UPX will abort showing a 'packed data overlap' 611 | error. With the "--force" option UPX will relocate the loading address 612 | for the packed file, but this isn't a real problem if it is a single or 613 | the main executable. 614 | 615 | Extra options available for this executable format: 616 | 617 | --all-methods Compress the program several times, using all 618 | available compression methods. This may improve 619 | the compression ratio in some cases, but usually 620 | the default method gives the best results anyway. 621 | 622 | --8-bit Uses 8 bit size compression [default: 32 bit] 623 | 624 | --8mib-ram PSone has 8 MiB ram available [default: 2 MiB] 625 | 626 | --boot-only This format is for main exes and CD-Mastering only ! 627 | It may slightly improve the compression ratio, 628 | decompression routines are faster than default ones. 629 | But it cannot be used for console transfer ! 630 | 631 | --no-align This option disables CD mode 2 data sector format 632 | alignment. May slightly improves the compression ratio, 633 | but the compressed executable will not boot from a CD. 634 | Use it for console transfer only ! 635 | 636 | NOTES FOR RTM32/PE and ARM/PE 637 | Same as win32/pe. 638 | 639 | NOTES FOR TMT/ADAM 640 | This format is used by the TMT Pascal compiler - see http://www.tmt.com/ 641 | . 642 | 643 | Extra options available for this executable format: 644 | 645 | --all-methods Compress the program several times, using all 646 | available compression methods. This may improve 647 | the compression ratio in some cases, but usually 648 | the default method gives the best results anyway. 649 | 650 | --all-filters Compress the program several times, using all 651 | available preprocessing filters. This may improve 652 | the compression ratio in some cases, but usually 653 | the default filter gives the best results anyway. 654 | 655 | NOTES FOR VMLINUZ/386 656 | The vmlinuz/386 and bvmlinuz/386 formats take a gzip-compressed bootable 657 | Linux kernel image ("vmlinuz", "zImage", "bzImage"), gzip-decompress it 658 | and re-compress it with the UPX compression method. 659 | 660 | vmlinuz/386 is completely unrelated to the other Linux executable 661 | formats, and it does not share any of their drawbacks. 662 | 663 | Notes: 664 | 665 | - Be sure that "vmlinuz/386" or "bvmlinuz/386" is displayed 666 | during compression - otherwise a wrong executable format 667 | may have been used, and the kernel won't boot. 668 | 669 | Benefits: 670 | 671 | - Better compression (but note that the kernel was already compressed, 672 | so the improvement is not as large as with other formats). 673 | Still, the bytes saved may be essential for special needs like 674 | boot disks. 675 | 676 | For example, this is what I get for my 2.2.16 kernel: 677 | 1589708 vmlinux 678 | 641073 bzImage [original] 679 | 560755 bzImage.upx [compressed by "upx -9"] 680 | 681 | - Much faster decompression at kernel boot time (but kernel 682 | decompression speed is not really an issue these days). 683 | 684 | Drawbacks: 685 | 686 | (none) 687 | 688 | Extra options available for this executable format: 689 | 690 | --all-methods Compress the program several times, using all 691 | available compression methods. This may improve 692 | the compression ratio in some cases, but usually 693 | the default method gives the best results anyway. 694 | 695 | --all-filters Compress the program several times, using all 696 | available preprocessing filters. This may improve 697 | the compression ratio in some cases, but usually 698 | the default filter gives the best results anyway. 699 | 700 | NOTES FOR WATCOM/LE 701 | UPX has been successfully tested with the following extenders: DOS4G, 702 | DOS4GW, PMODE/W, DOS32a, CauseWay. The WDOS/X extender is partly 703 | supported (for details see the file bugs BUGS). 704 | 705 | DLLs and the LX format are not supported. 706 | 707 | Extra options available for this executable format: 708 | 709 | --le Produce an unbound LE output instead of 710 | keeping the current stub. 711 | 712 | NOTES FOR WIN32/PE 713 | The PE support in UPX is quite stable now, but probably there are still 714 | some incompatibilities with some files. 715 | 716 | Because of the way UPX (and other packers for this format) works, you 717 | can see increased memory usage of your compressed files because the 718 | whole program is loaded into memory at startup. If you start several 719 | instances of huge compressed programs you're wasting memory because the 720 | common segments of the program won't get shared across the instances. On 721 | the other hand if you're compressing only smaller programs, or running 722 | only one instance of larger programs, then this penalty is smaller, but 723 | it's still there. 724 | 725 | If you're running executables from network, then compressed programs 726 | will load faster, and require less bandwidth during execution. 727 | 728 | DLLs are supported. But UPX compressed DLLs can not share common data 729 | and code when they got used by multiple applications. So compressing 730 | msvcrt.dll is a waste of memory, but compressing the dll plugins of a 731 | particular application may be a better idea. 732 | 733 | Screensavers are supported, with the restriction that the filename must 734 | end with ".scr" (as screensavers are handled slightly different than 735 | normal exe files). 736 | 737 | UPX compressed PE files have some minor memory overhead (usually in the 738 | 10 - 30 KiB range) which can be seen by specifying the "-i" command line 739 | switch during compression. 740 | 741 | Extra options available for this executable format: 742 | 743 | --compress-exports=0 Don't compress the export section. 744 | Use this if you plan to run the compressed 745 | program under Wine. 746 | --compress-exports=1 Compress the export section. [DEFAULT] 747 | Compression of the export section can improve the 748 | compression ratio quite a bit but may not work 749 | with all programs (like winword.exe). 750 | UPX never compresses the export section of a DLL 751 | regardless of this option. 752 | 753 | --compress-icons=0 Don't compress any icons. 754 | --compress-icons=1 Compress all but the first icon. 755 | --compress-icons=2 Compress all icons which are not in the 756 | first icon directory. [DEFAULT] 757 | --compress-icons=3 Compress all icons. 758 | 759 | --compress-resources=0 Don't compress any resources at all. 760 | 761 | --keep-resource=list Don't compress resources specified by the list. 762 | The members of the list are separated by commas. 763 | A list member has the following format: I. 764 | I is the type of the resource. Standard types 765 | must be specified as decimal numbers, user types can be 766 | specified by decimal IDs or strings. I is the 767 | identifier of the resource. It can be a decimal number 768 | or a string. For example: 769 | 770 | --keep-resource=2/MYBITMAP,5,6/12345 771 | 772 | UPX won't compress the named bitmap resource "MYBITMAP", 773 | it leaves every dialog (5) resource uncompressed, and 774 | it won't touch the string table resource with identifier 775 | 12345. 776 | 777 | --force Force compression even when there is an 778 | unexpected value in a header field. 779 | Use with care. 780 | 781 | --strip-relocs=0 Don't strip relocation records. 782 | --strip-relocs=1 Strip relocation records. [DEFAULT] 783 | This option only works on executables with base 784 | address greater or equal to 0x400000. Usually the 785 | compressed files becomes smaller, but some files 786 | may become larger. Note that the resulting file will 787 | not work under Windows 3.x (Win32s). 788 | UPX never strips relocations from a DLL 789 | regardless of this option. 790 | 791 | --all-methods Compress the program several times, using all 792 | available compression methods. This may improve 793 | the compression ratio in some cases, but usually 794 | the default method gives the best results anyway. 795 | 796 | --all-filters Compress the program several times, using all 797 | available preprocessing filters. This may improve 798 | the compression ratio in some cases, but usually 799 | the default filter gives the best results anyway. 800 | 801 | DIAGNOSTICS 802 | Exit status is normally 0; if an error occurs, exit status is 1. If a 803 | warning occurs, exit status is 2. 804 | 805 | UPX's diagnostics are intended to be self-explanatory. 806 | 807 | BUGS 808 | Please report all bugs immediately to the authors. 809 | 810 | AUTHORS 811 | Markus F.X.J. Oberhumer 812 | http://www.oberhumer.com 813 | 814 | Laszlo Molnar 815 | 816 | John F. Reiser 817 | 818 | COPYRIGHT 819 | Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer 820 | 821 | Copyright (C) 1996-2024 Laszlo Molnar 822 | 823 | Copyright (C) 2000-2024 John F. Reiser 824 | 825 | UPX is distributed with full source code under the terms of the GNU 826 | General Public License v2+; either under the pure GPLv2+ (see the file 827 | COPYING), or (at your option) under the GPLv+2 with special exceptions 828 | and restrictions granting the free usage for all binaries including 829 | commercial programs (see the file LICENSE). 830 | 831 | This program is distributed in the hope that it will be useful, but 832 | WITHOUT ANY WARRANTY; without even the implied warranty of 833 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 834 | 835 | You should have received a copy of the UPX License Agreements along with 836 | this program; see the files COPYING and LICENSE. If not, visit the UPX 837 | home page. 838 | 839 | -------------------------------------------------------------------------------- /upx-4.2.4-win64/upx.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pubg-tools/pubg-bot/c076bc46c187a2b5d3889518b2d0c00bd96befc3/upx-4.2.4-win64/upx.exe --------------------------------------------------------------------------------