Skip to content

Commit

Permalink
添加快捷按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
init committed Apr 25, 2023
1 parent 6836298 commit 6dd23b7
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 10 deletions.
1 change: 0 additions & 1 deletion TraceThread.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ def r0capture_message(self,p,data):
p["src_port"], p["dst_addr"], p["dst_port"], data)



def default_message(self,p):
if "appinfo" in p:
self.loadAppInfoSignel.emit(p["appinfo"])
Expand Down
2 changes: 1 addition & 1 deletion custom/customs.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"name": "\u6837\u4f8b\u6a21\u677f1", "fileName": "\u6837\u4f8b\u6a21\u677f1.js", "bak": "\u81ea\u5b9a\u4e49\u7684\u6837\u4f8b\u6a21\u677f1"}, {"name": "\u6837\u4f8b\u6a21\u677f2", "fileName": "\u6837\u4f8b\u6a21\u677f2.js", "bak": "\u81ea\u5b9a\u4e49\u7684\u6837\u4f8b\u6a21\u677f2\uff0c\u5e26spawn\u5224\u65ad"}, {"name": "\u51fd\u6570\u91cd\u653e\u6837\u4f8b\u6a21\u677f1", "fileName": "\u51fd\u6570\u91cd\u653e\u6837\u4f8b\u6a21\u677f1.js", "bak": "\u81ea\u5b9a\u4e49\u51fd\u6570\u91cd\u653e\u7684\u6837\u4f8b\u6a21\u677f1"}, {"name": "jsonToString", "fileName": "jsonToString.js", "bak": "\u81ea\u5b9a\u4e49\u7684\u6837\u4f8b\u6a21\u677f1"}, {"name": "\u7c7b\u578b\u8f6cjson\u6253\u5370\u6a21\u7248", "fileName": "\u7c7b\u578b\u8f6cjson\u6253\u5370\u6a21\u7248.js", "bak": "\u901a\u8fc7\u8c03\u7528default\u4e2d\u7684toJSONString\u6765\u8f6c\u6362\u57fa\u7840\u7c7b\u578b"}, {"name": "redbook", "fileName": "redbook.js", "bak": "redboot hook"}]
[{"name": "\u6837\u4f8b\u6a21\u677f1", "fileName": "\u6837\u4f8b\u6a21\u677f1.js", "bak": "\u81ea\u5b9a\u4e49\u7684\u6837\u4f8b\u6a21\u677f1"}, {"name": "\u6837\u4f8b\u6a21\u677f2", "fileName": "\u6837\u4f8b\u6a21\u677f2.js", "bak": "\u81ea\u5b9a\u4e49\u7684\u6837\u4f8b\u6a21\u677f2\uff0c\u5e26spawn\u5224\u65ad"}, {"name": "\u51fd\u6570\u91cd\u653e\u6837\u4f8b\u6a21\u677f1", "fileName": "\u51fd\u6570\u91cd\u653e\u6837\u4f8b\u6a21\u677f1.js", "bak": "\u81ea\u5b9a\u4e49\u51fd\u6570\u91cd\u653e\u7684\u6837\u4f8b\u6a21\u677f1"}, {"name": "jsonToString", "fileName": "jsonToString.js", "bak": "\u81ea\u5b9a\u4e49\u7684\u6837\u4f8b\u6a21\u677f1"}, {"name": "\u7c7b\u578b\u8f6cjson\u6253\u5370\u6a21\u7248", "fileName": "\u7c7b\u578b\u8f6cjson\u6253\u5370\u6a21\u7248.js", "bak": "\u901a\u8fc7\u8c03\u7528default\u4e2d\u7684toJSONString\u6765\u8f6c\u6362\u57fa\u7840\u7c7b\u578b"}, {"name": "hookmap", "fileName": "hookmap.js", "bak": "hook map\u548chead"}, {"name": "vivo", "fileName": "vivo.js", "bak": "\u81ea\u5b9a\u4e49\u7684\u6837\u4f8b\u6a21\u677f1"}]
6 changes: 3 additions & 3 deletions js/sktrace.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ function stalkerTraceRange(tid, base, size) {

iterator.putCallout((context) => {
var callOutAddress=ptr(context.pc-moduleBase)
if (offsetAddr>0 && callOutAddress.compare(offsetAddr)<0){
return;
}
// if (offsetAddr>0 && callOutAddress.compare(offsetAddr)<0){
// return;
// }
send({
type: 'ctx',
tid: tid,
Expand Down
32 changes: 30 additions & 2 deletions kmainForm.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from PyQt5.QtCore import Qt, QPoint, QTranslator
from PyQt5.QtGui import QStandardItemModel, QStandardItem, QCursor
from PyQt5.QtWidgets import QMainWindow, QApplication, QFileDialog, QStatusBar, QLabel, QMessageBox, QHeaderView, \
QTableWidgetItem, QMenu, QAction, QActionGroup, qApp
QTableWidgetItem, QMenu, QAction, QActionGroup, qApp, QLineEdit

from forms import SelectPackage
from forms.AntiFrida import antiFridaForm
Expand Down Expand Up @@ -257,7 +257,33 @@ def initUi(self):

self.curFridaVer = "14.2.18"
self.actionVer14.setChecked(True)

# self.toolBarPackageNameTxt = QLineEdit(self)
# self.toolBarPackageNameTxt.setMaximumWidth(200)
# label = QLabel("进程名:", self)
# self.toolBar.insertWidget(None,label)
# self.toolBar.insertWidget(None,self.toolBarPackageNameTxt)

self.actionattach = QtWidgets.QAction(self)
self.actionattach.setText("attach")
self.actionattach.setToolTip("attach by packageName")
self.actionattach.triggered.connect(self.actionAttachNameStart)
self.toolBar.addAction(self.actionattach)

self.actionattachF = QtWidgets.QAction(self)
self.actionattachF.setText("attachF")
self.actionattachF.setToolTip("attach current top app")
self.actionattachF.triggered.connect(self.actionAttachStart)
self.toolBar.addAction(self.actionattachF)

self.actionspawn = QtWidgets.QAction(self)
self.actionspawn.setText("spawn")
self.actionspawn.triggered.connect(self.actionSpawnStart)
self.toolBar.addAction(self.actionspawn)

self.actionstop = QtWidgets.QAction(self)
self.actionstop.setText("stop")
self.actionstop.triggered.connect(self.StopAttach)
self.toolBar.addAction(self.actionstop)

# 16.0.8 15.1.9 14.2.18
# res=CmdUtil.execCmdData("frida --version")
Expand Down Expand Up @@ -600,6 +626,8 @@ def ReplaceSh(self,rfile,wfile,name):

if platform.system()=="Darwin":
adbPath= CmdUtil.execCmdData("which adb")
if adbPath=="":
adbPath="adb"
data=data.replace("%adb%",adbPath.replace("\n",""))
if self.fridaName != None and len(self.fridaName) > 0:
data = data.replace("%fName%", self.fridaName)
Expand Down
8 changes: 6 additions & 2 deletions ui/kmain.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file 'kmain.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
# Created by: PyQt5 UI code generator 5.15.7
#
# 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.
Expand Down Expand Up @@ -364,7 +364,7 @@ def setupUi(self, MainWindow):
self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 847, 26))
self.menubar.setGeometry(QtCore.QRect(0, 0, 847, 37))
self.menubar.setObjectName("menubar")
self.menufile = QtWidgets.QMenu(self.menubar)
self.menufile.setObjectName("menufile")
Expand All @@ -390,6 +390,9 @@ def setupUi(self, MainWindow):
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.toolBar = QtWidgets.QToolBar(MainWindow)
self.toolBar.setObjectName("toolBar")
MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
self.actionopen = QtWidgets.QAction(MainWindow)
self.actionopen.setObjectName("actionopen")
self.actionexit = QtWidgets.QAction(MainWindow)
Expand Down Expand Up @@ -599,6 +602,7 @@ def retranslateUi(self, MainWindow):
self.menu_2.setTitle(_translate("MainWindow", "连接方式"))
self.menufrida.setTitle(_translate("MainWindow", "frida切换"))
self.menu_3.setTitle(_translate("MainWindow", "语言"))
self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar"))
self.actionopen.setText(_translate("MainWindow", "open"))
self.actionexit.setText(_translate("MainWindow", "exit"))
self.actionabort.setText(_translate("MainWindow", "关于我"))
Expand Down
13 changes: 12 additions & 1 deletion ui/kmain.ui
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@
<x>0</x>
<y>0</y>
<width>847</width>
<height>26</height>
<height>37</height>
</rect>
</property>
<widget class="QMenu" name="menufile">
Expand Down Expand Up @@ -874,6 +874,17 @@
<addaction name="menuhelp"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<widget class="QToolBar" name="toolBar">
<property name="windowTitle">
<string>toolBar</string>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget>
<action name="actionopen">
<property name="text">
<string>open</string>
Expand Down

0 comments on commit 6dd23b7

Please sign in to comment.