├── README.md ├── main.py └── main.ui /README.md: -------------------------------------------------------------------------------- 1 | 2 | # ObFile [Download it here](https://drive.google.com/file/d/12cyGygLhcV5ItJ8IPsvpgEre-TGJt3aR/view?usp=sharing) 3 | ObFile is a python compiler and obfuscator for Windows. It can compile your python programs into exe and you can even add your own custom icons to it. You can obfuscate your python scripts as well. 4 | 5 | ObFile uses **PYINSTALLER** and **PYARMOR** to compile and obfuscate the python files. The credit also goes to the developers of both of these modules. 6 | 7 | * Released : 5/09/20 8 | * Last Updated : 28-12-21 9 | 10 | # Changelogs 11 | * Remastered the whole program 12 | * Updated the UI 13 | * Removed the functionality to compile obfuscated python scripts (its glitchy) 14 | * Made a brand new GUI with PyQT5 15 | 16 | # SnapShots 17 | 18 | ![ob - Copy](https://user-images.githubusercontent.com/68228966/147543220-1f0cc689-b516-496a-99fc-a18ad4fe562e.JPG) 19 | 20 | ![2ob](https://user-images.githubusercontent.com/68228966/147543199-a36fd03a-0ae9-4874-b7f4-6561aaf3aff3.JPG) 21 | 22 | 23 | # Update 2.0.0 24 | * Remastered the whole program 25 | * Updated the UI 26 | * Removed the functionality to compile obfuscated python scripts (its glitchy) 27 | 28 | 29 | # Update 1.1.1 30 | * Updated : 10/09/2020 31 | * Removed Time delay commands to enhance user-interaction 32 | * Popup message whenever the file processing completes 33 | * Updated Menu 34 | * Bug fixes 35 | * Fixed Spaces and indents 36 | * Added setup file (to install all modules) 37 | * Updated `os.system` to `subprocess.call` 38 | 39 | # How to use 40 | * You can download the program from here: 41 | * [Download](https://drive.google.com/file/d/12cyGygLhcV5ItJ8IPsvpgEre-TGJt3aR/view?usp=sharing) 42 | * If you are unable to run it, you can run the `main.py` file. 43 | 44 | # Installation 45 | 46 | Use the Git clone command to install the program, or directly install it as zip file 47 | 48 | https://github.com/kavinjindal/ObFile.git 49 | 50 | # Compatible OS 51 | 52 | * Windows 10 (not tested on Windows 7, but might work) 53 | 54 | 55 | 56 | # Python Modules used: 57 | * Pyarmor 58 | * Pyinstaller 59 | * Pyqt5 60 | * Pyuic5 61 | 62 | # Python Version Support 63 | * Python 3 64 | 65 | # Obfile v1.0.0 Contributors: 66 | :computer:` Vedant Bhalgama ` - helping in codes 67 | :computer:` TheBossProSniper ` - helping with system level programming and scripts 68 | 69 | # Queries, Suggestions: 70 | 71 | * You can report your issues here: 72 | 73 | https://github.com/kavinjindal/ObFile/issues 74 | 75 | * Or you can contact me on email here: 76 | 77 | kavinsjindal@gmail.com 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'main.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.4 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | from PyQt5 import QtCore, QtGui, QtWidgets 12 | 13 | 14 | class Ui_MainWindow(object): 15 | def setupUi(self, MainWindow): 16 | MainWindow.setObjectName("MainWindow") 17 | MainWindow.resize(806, 607) 18 | self.centralwidget = QtWidgets.QWidget(MainWindow) 19 | self.centralwidget.setObjectName("centralwidget") 20 | self.graphicsView = QtWidgets.QGraphicsView(self.centralwidget) 21 | self.graphicsView.setGeometry(QtCore.QRect(0, 0, 821, 581)) 22 | self.graphicsView.setObjectName("graphicsView") 23 | self.tabWidget = QtWidgets.QTabWidget(self.centralwidget) 24 | self.tabWidget.setGeometry(QtCore.QRect(0, 0, 831, 631)) 25 | self.tabWidget.setObjectName("tabWidget") 26 | self.tab = QtWidgets.QWidget() 27 | self.tab.setObjectName("tab") 28 | self.label = QtWidgets.QLabel(self.tab) 29 | self.label.setGeometry(QtCore.QRect(260, -10, 341, 161)) 30 | font = QtGui.QFont() 31 | font.setFamily("Consolas") 32 | font.setPointSize(72) 33 | font.setBold(True) 34 | font.setWeight(75) 35 | self.label.setFont(font) 36 | self.label.setTextFormat(QtCore.Qt.RichText) 37 | self.label.setObjectName("label") 38 | self.label_2 = QtWidgets.QLabel(self.tab) 39 | self.label_2.setGeometry(QtCore.QRect(100, 150, 191, 61)) 40 | font = QtGui.QFont() 41 | font.setPointSize(16) 42 | self.label_2.setFont(font) 43 | self.label_2.setObjectName("label_2") 44 | self.lineEdit = QtWidgets.QLineEdit(self.tab) 45 | self.lineEdit.setGeometry(QtCore.QRect(290, 170, 391, 31)) 46 | self.lineEdit.setObjectName("lineEdit") 47 | self.label_3 = QtWidgets.QLabel(self.tab) 48 | self.label_3.setGeometry(QtCore.QRect(100, 210, 261, 61)) 49 | font = QtGui.QFont() 50 | font.setPointSize(16) 51 | self.label_3.setFont(font) 52 | self.label_3.setObjectName("label_3") 53 | self.lineEdit_2 = QtWidgets.QLineEdit(self.tab) 54 | self.lineEdit_2.setGeometry(QtCore.QRect(360, 230, 391, 31)) 55 | self.lineEdit_2.setObjectName("lineEdit_2") 56 | self.pushButton = QtWidgets.QPushButton(self.tab, clicked = lambda: self.compile()) 57 | self.pushButton.setGeometry(QtCore.QRect(320, 280, 171, 61)) 58 | font = QtGui.QFont() 59 | font.setPointSize(26) 60 | self.pushButton.setFont(font) 61 | self.pushButton.setObjectName("pushButton") 62 | self.label_4 = QtWidgets.QLabel(self.tab) 63 | self.label_4.setGeometry(QtCore.QRect(180, 350, 431, 61)) 64 | font = QtGui.QFont() 65 | font.setPointSize(16) 66 | self.label_4.setFont(font) 67 | self.label_4.setObjectName("label_4") 68 | self.label_6 = QtWidgets.QLabel(self.tab) 69 | self.label_6.setGeometry(QtCore.QRect(360, 90, 191, 61)) 70 | font = QtGui.QFont() 71 | font.setPointSize(26) 72 | self.label_6.setFont(font) 73 | self.label_6.setObjectName("label_6") 74 | self.tabWidget.addTab(self.tab, "") 75 | self.tab_2 = QtWidgets.QWidget() 76 | self.tab_2.setObjectName("tab_2") 77 | self.label_5 = QtWidgets.QLabel(self.tab_2) 78 | self.label_5.setGeometry(QtCore.QRect(250, -10, 341, 161)) 79 | font = QtGui.QFont() 80 | font.setFamily("Consolas") 81 | font.setPointSize(72) 82 | font.setBold(True) 83 | font.setWeight(75) 84 | self.label_5.setFont(font) 85 | self.label_5.setTextFormat(QtCore.Qt.RichText) 86 | self.label_5.setObjectName("label_5") 87 | self.label_7 = QtWidgets.QLabel(self.tab_2) 88 | self.label_7.setGeometry(QtCore.QRect(330, 90, 191, 61)) 89 | font = QtGui.QFont() 90 | font.setPointSize(26) 91 | self.label_7.setFont(font) 92 | self.label_7.setObjectName("label_7") 93 | self.label_8 = QtWidgets.QLabel(self.tab_2) 94 | self.label_8.setGeometry(QtCore.QRect(130, 190, 191, 61)) 95 | font = QtGui.QFont() 96 | font.setPointSize(16) 97 | self.label_8.setFont(font) 98 | self.label_8.setObjectName("label_8") 99 | self.lineEdit_3 = QtWidgets.QLineEdit(self.tab_2) 100 | self.lineEdit_3.setGeometry(QtCore.QRect(320, 210, 391, 31)) 101 | self.lineEdit_3.setObjectName("lineEdit_3") 102 | self.pushButton_2 = QtWidgets.QPushButton(self.tab_2, clicked = lambda: self.obfuscate()) 103 | self.pushButton_2.setGeometry(QtCore.QRect(320, 290, 191, 71)) 104 | font = QtGui.QFont() 105 | font.setPointSize(26) 106 | self.pushButton_2.setFont(font) 107 | self.pushButton_2.setObjectName("pushButton_2") 108 | self.label_9 = QtWidgets.QLabel(self.tab_2) 109 | self.label_9.setGeometry(QtCore.QRect(220, 390, 431, 61)) 110 | font = QtGui.QFont() 111 | font.setPointSize(16) 112 | self.label_9.setFont(font) 113 | self.label_9.setObjectName("label_9") 114 | self.tabWidget.addTab(self.tab_2, "") 115 | self.tab_3 = QtWidgets.QWidget() 116 | self.tab_3.setObjectName("tab_3") 117 | self.label_10 = QtWidgets.QLabel(self.tab_3) 118 | self.label_10.setGeometry(QtCore.QRect(330, -10, 341, 161)) 119 | font = QtGui.QFont() 120 | font.setFamily("Consolas") 121 | font.setPointSize(72) 122 | font.setBold(True) 123 | font.setWeight(75) 124 | self.label_10.setFont(font) 125 | self.label_10.setTextFormat(QtCore.Qt.RichText) 126 | self.label_10.setObjectName("label_10") 127 | self.label_11 = QtWidgets.QLabel(self.tab_3) 128 | self.label_11.setGeometry(QtCore.QRect(250, 100, 371, 161)) 129 | font = QtGui.QFont() 130 | font.setFamily("Consolas") 131 | font.setPointSize(22) 132 | font.setBold(True) 133 | font.setWeight(75) 134 | self.label_11.setFont(font) 135 | self.label_11.setTextFormat(QtCore.Qt.RichText) 136 | self.label_11.setObjectName("label_11") 137 | self.label_12 = QtWidgets.QLabel(self.tab_3) 138 | self.label_12.setGeometry(QtCore.QRect(280, 150, 371, 161)) 139 | font = QtGui.QFont() 140 | font.setFamily("Consolas") 141 | font.setPointSize(22) 142 | font.setBold(True) 143 | font.setWeight(75) 144 | self.label_12.setFont(font) 145 | self.label_12.setTextFormat(QtCore.Qt.RichText) 146 | self.label_12.setObjectName("label_12") 147 | self.tabWidget.addTab(self.tab_3, "") 148 | MainWindow.setCentralWidget(self.centralwidget) 149 | self.menubar = QtWidgets.QMenuBar(MainWindow) 150 | self.menubar.setGeometry(QtCore.QRect(0, 0, 806, 21)) 151 | self.menubar.setObjectName("menubar") 152 | self.menuKlevrPort = QtWidgets.QMenu(self.menubar) 153 | self.menuKlevrPort.setObjectName("menuKlevrPort") 154 | MainWindow.setMenuBar(self.menubar) 155 | self.statusbar = QtWidgets.QStatusBar(MainWindow) 156 | self.statusbar.setObjectName("statusbar") 157 | MainWindow.setStatusBar(self.statusbar) 158 | self.menubar.addAction(self.menuKlevrPort.menuAction()) 159 | 160 | self.retranslateUi(MainWindow) 161 | self.tabWidget.setCurrentIndex(2) 162 | QtCore.QMetaObject.connectSlotsByName(MainWindow) 163 | def obfuscate(self): 164 | path = self.lineEdit_3.text() 165 | # disable the button 166 | self.pushButton_2.setEnabled(False) 167 | QtCore.QProcess.startDetached("pyarmor obfuscate " + path) 168 | self.pushButton_2.setEnabled(True) 169 | def compile(self): 170 | # compile the file entered into executable 171 | # get the file path 172 | file_path = self.lineEdit.text() 173 | icon_path = self.lineEdit_2.text() 174 | # get the icon path 175 | 176 | if "" in self.lineEdit_2.text(): 177 | #self.plainTextEdit.setPlainText(os.system("pyinstaller --onefile --windowed " + file_path)) 178 | self.pushButton.setEnabled(False) 179 | QtCore.QProcess.startDetached("pyinstaller -F " + file_path) 180 | self.pushButton.setEnabled(True) 181 | else: 182 | self.pushButton.setEnabled(False) 183 | 184 | QtCore.QProcess.startDetached("pyinstaller -F -i " + f" '{icon_path}' " + file_path) 185 | self.pushButton.setEnabled(True) 186 | 187 | def retranslateUi(self, MainWindow): 188 | _translate = QtCore.QCoreApplication.translate 189 | MainWindow.setWindowTitle(_translate("MainWindow", "ObFile v2.0.0")) 190 | self.label.setText(_translate("MainWindow", "ObFile")) 191 | self.label_2.setText(_translate("MainWindow", "Enter the file path:")) 192 | self.label_3.setText(_translate("MainWindow", "Enter Icon Path [optional]:")) 193 | self.pushButton.setText(_translate("MainWindow", "Compile")) 194 | self.label_4.setText(_translate("MainWindow", "Enter valid file path or else error will show up")) 195 | self.label_6.setText(_translate("MainWindow", "Compiler")) 196 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Compiler [EXE]")) 197 | self.label_5.setText(_translate("MainWindow", "ObFile")) 198 | self.label_7.setText(_translate("MainWindow", "Obfuscator")) 199 | self.label_8.setText(_translate("MainWindow", "Enter the file path:")) 200 | self.pushButton_2.setText(_translate("MainWindow", "Obfuscate")) 201 | self.label_9.setText(_translate("MainWindow", "Enter valid file path or else error will show up")) 202 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Obfuscator")) 203 | self.label_10.setText(_translate("MainWindow", "Info")) 204 | self.label_11.setText(_translate("MainWindow", "Developer: Kavin Jindal")) 205 | self.label_12.setText(_translate("MainWindow", "App Version: v2.0.0")) 206 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("MainWindow", "Info")) 207 | self.menuKlevrPort.setTitle(_translate("MainWindow", "ObFile v2.0")) 208 | 209 | 210 | if __name__ == "__main__": 211 | import sys 212 | app = QtWidgets.QApplication(sys.argv) 213 | MainWindow = QtWidgets.QMainWindow() 214 | ui = Ui_MainWindow() 215 | ui.setupUi(MainWindow) 216 | MainWindow.show() 217 | sys.exit(app.exec_()) 218 | -------------------------------------------------------------------------------- /main.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 806 10 | 607 11 | 12 | 13 | 14 | ObFile v2.0.0 15 | 16 | 17 | 18 | 19 | 20 | 0 21 | 0 22 | 821 23 | 581 24 | 25 | 26 | 27 | 28 | 29 | 30 | 0 31 | 0 32 | 831 33 | 631 34 | 35 | 36 | 37 | 0 38 | 39 | 40 | 41 | Compiler [EXE] 42 | 43 | 44 | 45 | 46 | 260 47 | -10 48 | 341 49 | 161 50 | 51 | 52 | 53 | 54 | Consolas 55 | 72 56 | 75 57 | true 58 | 59 | 60 | 61 | ObFile 62 | 63 | 64 | Qt::RichText 65 | 66 | 67 | 68 | 69 | 70 | 100 71 | 150 72 | 191 73 | 61 74 | 75 | 76 | 77 | 78 | 16 79 | 80 | 81 | 82 | Enter the file path: 83 | 84 | 85 | 86 | 87 | 88 | 290 89 | 170 90 | 391 91 | 31 92 | 93 | 94 | 95 | 96 | 97 | 98 | 100 99 | 210 100 | 261 101 | 61 102 | 103 | 104 | 105 | 106 | 16 107 | 108 | 109 | 110 | Enter Icon Path [optional]: 111 | 112 | 113 | 114 | 115 | 116 | 360 117 | 230 118 | 391 119 | 31 120 | 121 | 122 | 123 | 124 | 125 | 126 | 320 127 | 280 128 | 171 129 | 61 130 | 131 | 132 | 133 | 134 | 26 135 | 136 | 137 | 138 | Compile 139 | 140 | 141 | 142 | 143 | 144 | 180 145 | 350 146 | 431 147 | 61 148 | 149 | 150 | 151 | 152 | 16 153 | 154 | 155 | 156 | Enter valid file path or else error will show up 157 | 158 | 159 | 160 | 161 | 162 | 360 163 | 90 164 | 191 165 | 61 166 | 167 | 168 | 169 | 170 | 26 171 | 172 | 173 | 174 | Compiler 175 | 176 | 177 | 178 | 179 | 180 | Obfuscator 181 | 182 | 183 | 184 | 185 | 250 186 | -10 187 | 341 188 | 161 189 | 190 | 191 | 192 | 193 | Consolas 194 | 72 195 | 75 196 | true 197 | 198 | 199 | 200 | ObFile 201 | 202 | 203 | Qt::RichText 204 | 205 | 206 | 207 | 208 | 209 | 330 210 | 90 211 | 191 212 | 61 213 | 214 | 215 | 216 | 217 | 26 218 | 219 | 220 | 221 | Obfuscator 222 | 223 | 224 | 225 | 226 | 227 | 130 228 | 190 229 | 191 230 | 61 231 | 232 | 233 | 234 | 235 | 16 236 | 237 | 238 | 239 | Enter the file path: 240 | 241 | 242 | 243 | 244 | 245 | 320 246 | 210 247 | 391 248 | 31 249 | 250 | 251 | 252 | 253 | 254 | 255 | 320 256 | 290 257 | 191 258 | 71 259 | 260 | 261 | 262 | 263 | 26 264 | 265 | 266 | 267 | Obfuscate 268 | 269 | 270 | 271 | 272 | 273 | 220 274 | 390 275 | 431 276 | 61 277 | 278 | 279 | 280 | 281 | 16 282 | 283 | 284 | 285 | Enter valid file path or else error will show up 286 | 287 | 288 | 289 | 290 | 291 | Info 292 | 293 | 294 | 295 | 296 | 330 297 | -10 298 | 341 299 | 161 300 | 301 | 302 | 303 | 304 | Consolas 305 | 72 306 | 75 307 | true 308 | 309 | 310 | 311 | Info 312 | 313 | 314 | Qt::RichText 315 | 316 | 317 | 318 | 319 | 320 | 250 321 | 100 322 | 371 323 | 161 324 | 325 | 326 | 327 | 328 | Consolas 329 | 22 330 | 75 331 | true 332 | 333 | 334 | 335 | Developer: Kavin Jindal 336 | 337 | 338 | Qt::RichText 339 | 340 | 341 | 342 | 343 | 344 | 280 345 | 150 346 | 371 347 | 161 348 | 349 | 350 | 351 | 352 | Consolas 353 | 22 354 | 75 355 | true 356 | 357 | 358 | 359 | App Version: v2.0.0 360 | 361 | 362 | Qt::RichText 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 0 372 | 0 373 | 806 374 | 21 375 | 376 | 377 | 378 | 379 | ObFile v2.0 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | --------------------------------------------------------------------------------