-
Notifications
You must be signed in to change notification settings - Fork 2
/
kaishi.py
158 lines (138 loc) · 5.17 KB
/
kaishi.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'kaishi.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
import Encry_nettrans as Encry
class Ui_MainWindow(QtWidgets.QMainWindow):
def change_byte(self,str):
self.by_int = 0
self.by_low = 0
if str[0] == '0':
self.by_int = 0
if str[0] == '1':
self.by_int = 1
if str[0] == '2':
self.by_int = 2
if str[0] == '3':
self.by_int = 3
if str[0] == '4':
self.by_int = 4
if str[0] == '5':
self.by_int = 5
if str[0] == '6':
self.by_int = 6
if str[0] == '7':
self.by_int = 7
if str[0] == '8':
self.by_int = 8
if str[0] == '9':
self.by_int = 9
if str[0] == 'a':
self.by_int = 10
if str[0] == 'b':
self.by_int = 11
if str[0] == 'c':
self.by_int = 12
if str[0] == 'd':
self.by_int = 13
if str[0] == 'e':
self.by_int = 14
if str[0] == 'f':
self.by_int = 15
if str[1] == '0':
self.by_low = 0
if str[1] == '1':
self.by_low = 1
if str[1] == '2':
self.by_low = 2
if str[1] == '3':
self.by_low = 3
if str[1] == '4':
self.by_low = 4
if str[1] == '5':
self.by_low = 5
if str[1] == '6':
self.by_low = 6
if str[1] == '7':
self.by_low = 7
if str[1] == '8':
self.by_low = 8
if str[1] == '9':
self.by_low = 9
if str[1] == 'a':
self.by_low = 10
if str[1] == 'b':
self.by_low = 11
if str[1] == 'c':
self.by_low = 12
if str[1] == 'd':
self.by_low = 13
if str[1] == 'e':
self.by_low = 14
if str[1] == 'f':
self.by_low = 15
return self.by_int*16+self.by_low
def open_ss(self):
from PyQt5.QtWidgets import QFileDialog
self.directory = QFileDialog.getExistingDirectory(self, "选择文件夹", "c://user/")
#分割输入字符串通过change_byte函数得到char型的int型数据
self.text =self.textEdit.toPlainText().split("\\x")
self.byte_rssk = list()
#获取shellcode数组用于go函数第一个参数
for i in range(len(self.text)-1):
self.byte_rssk.append(self.change_byte(self.text[i+1]))
#self.y = [ord(c) for c in self.text]
Encryto = Encry.ENCRYTO()
Encryto.go(self.byte_rssk,self.directory+"/artif.exe")
import queding
self.Mai = QtWidgets.QMainWindow()
ui_queding = queding.Ui_MainWindow()
ui_queding.setupUi(self.Mai)
self.Mai.show()
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(400, 320)
MainWindow.setMinimumSize(QtCore.QSize(400, 320))
MainWindow.setMaximumSize(QtCore.QSize(400, 320))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("img/icon.jpg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.textEdit = QtWidgets.QTextEdit(self.centralwidget)
self.textEdit.setGeometry(QtCore.QRect(10, 20, 381, 221))
self.textEdit.setObjectName("textEdit")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(13, 0, 271, 20))
self.label.setObjectName("label")
self.pushButton = QtWidgets.QPushButton(self.centralwidget)
self.pushButton.setGeometry(QtCore.QRect(130, 250, 131, 31))
self.pushButton.setObjectName("pushButton")
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 400, 22))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
self.pushButton.clicked.connect(self.open_ss)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "GalaXY"))
self.label.setText(_translate("MainWindow", "请输入shellcode 如:\\xfc\\xe8\\x89\\xff"))
self.pushButton.setText(_translate("MainWindow", "选择保存路径"))
if __name__ == "__main__":
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
ui_zhuye = Ui_MainWindow()
ui_zhuye.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())