-
Notifications
You must be signed in to change notification settings - Fork 9
/
attack_SendIMSI.py
147 lines (129 loc) · 7.08 KB
/
attack_SendIMSI.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'attack_SendIMSI.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# 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.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(822, 650)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("./logo.jpg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.cip = QtWidgets.QLineEdit(self.centralwidget)
self.cip.setGeometry(QtCore.QRect(200, 0, 301, 31))
self.cip.setObjectName("cip")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(0, 0, 151, 21))
self.label.setStyleSheet("font: 16pt \"Noto Sans\";")
self.label.setObjectName("label")
self.sport = QtWidgets.QLineEdit(self.centralwidget)
self.sport.setGeometry(QtCore.QRect(200, 130, 311, 31))
self.sport.setObjectName("sport")
self.label_2 = QtWidgets.QLabel(self.centralwidget)
self.label_2.setGeometry(QtCore.QRect(0, 40, 131, 21))
self.label_2.setStyleSheet("font: 16pt \"Noto Sans\";")
self.label_2.setObjectName("label_2")
self.cport = QtWidgets.QLineEdit(self.centralwidget)
self.cport.setGeometry(QtCore.QRect(200, 40, 311, 41))
self.cport.setObjectName("cport")
self.label_3 = QtWidgets.QLabel(self.centralwidget)
self.label_3.setGeometry(QtCore.QRect(0, 80, 131, 21))
self.label_3.setStyleSheet("font: 16pt \"Noto Sans\";\n"
"")
self.label_3.setObjectName("label_3")
self.sip = QtWidgets.QLineEdit(self.centralwidget)
self.sip.setGeometry(QtCore.QRect(200, 90, 311, 31))
self.sip.setObjectName("sip")
self.label_5 = QtWidgets.QLabel(self.centralwidget)
self.label_5.setGeometry(QtCore.QRect(0, 160, 201, 31))
self.label_5.setStyleSheet("font: 16pt \"Noto Sans\";")
self.label_5.setObjectName("label_5")
self.label_4 = QtWidgets.QLabel(self.centralwidget)
self.label_4.setGeometry(QtCore.QRect(0, 120, 131, 21))
self.label_4.setStyleSheet("font: 16pt \"Noto Sans\";")
self.label_4.setObjectName("label_4")
self.netindicator = QtWidgets.QLineEdit(self.centralwidget)
self.netindicator.setGeometry(QtCore.QRect(200, 170, 311, 31))
self.netindicator.setObjectName("netindicator")
self.msisdn = QtWidgets.QLineEdit(self.centralwidget)
self.msisdn.setGeometry(QtCore.QRect(200, 210, 311, 41))
self.msisdn.setObjectName("msisdn")
self.label_6 = QtWidgets.QLabel(self.centralwidget)
self.label_6.setGeometry(QtCore.QRect(0, 210, 181, 31))
self.label_6.setStyleSheet("font: 16pt \"Noto Sans\";")
self.label_6.setObjectName("label_6")
self.local_gt = QtWidgets.QLineEdit(self.centralwidget)
self.local_gt.setGeometry(QtCore.QRect(200, 270, 311, 41))
self.local_gt.setObjectName("local_gt")
self.label_8 = QtWidgets.QLabel(self.centralwidget)
self.label_8.setGeometry(QtCore.QRect(0, 270, 181, 31))
self.label_8.setStyleSheet("font: 16pt \"Noto Sans\";")
self.label_8.setObjectName("label_8")
self.run = QtWidgets.QPushButton(self.centralwidget)
self.run.setGeometry(QtCore.QRect(399, 330, 191, 41))
self.run.setObjectName("run")
self.label_13 = QtWidgets.QLabel(self.centralwidget)
self.label_13.setGeometry(QtCore.QRect(450, 380, 181, 31))
self.label_13.setStyleSheet("font: 16pt \"Noto Sans\";")
self.label_13.setObjectName("label_13")
self.output = QtWidgets.QTextEdit(self.centralwidget)
self.output.setGeometry(QtCore.QRect(-40, 410, 1181, 191))
self.output.setObjectName("output")
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 822, 20))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Attacker_SendIMSI"))
self.cip.setText(_translate("MainWindow", "(i.e 192.168.56.101)"))
self.label.setText(_translate("MainWindow", "client_ip"))
self.sport.setText(_translate("MainWindow", "(i.e 2906)"))
self.label_2.setText(_translate("MainWindow", "client_port"))
self.cport.setText(_translate("MainWindow", "(i.e 2905)"))
self.label_3.setText(_translate("MainWindow", "server_ip"))
self.sip.setText(_translate("MainWindow", "(i.e 192.168.56.102)"))
self.label_5.setText(_translate("MainWindow", "Network_Indicator"))
self.label_4.setText(_translate("MainWindow", "server_port"))
self.netindicator.setText(_translate("MainWindow", "(i.e 0)"))
self.msisdn.setText(_translate("MainWindow", "(i.e 201512345678)"))
self.label_6.setText(_translate("MainWindow", "Targer_MSISDN"))
self.local_gt.setText(_translate("MainWindow", "(i.e 999599)"))
self.label_8.setText(_translate("MainWindow", "locael_GT"))
self.run.setText(_translate("MainWindow", "run"))
self.label_13.setText(_translate("MainWindow", "Output"))
self.run.clicked.connect(self.runing)
def runing(self):
import attack_gui_web as atck_gui
import os
import subprocess as sp
client_ip = str(self.cip.text()).replace(")","").replace("(","")
client_port = str(self.cport.text()).replace(")","").replace("(","")
server_ip = str(self.sip.text()).replace(")","").replace("(","")
server_port = str(self.sport.text()).replace(")","").replace("(","")
Network_Indicator = str(self.netindicator.text()).replace(")","").replace("(","")
locael_GT = str(self.local_gt.text()).replace(")","").replace("(","")
Targer_MSISDN = str(self.msisdn.text()).replace(")","").replace("(","")
atck_gui.attack_SendIMSI(client_ip,client_port,server_ip,server_port,Network_Indicator,Targer_MSISDN,locael_GT)
data = open('outingss7.txt','r').read().replace('[0m',' \n ').replace('\x1b[31m',' \n ').replace('\x1b[32m',' \n ').replace('\x1b',' \n ').replace('[34m',' ')
self.output.append(str(data))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())