Skip to content

Commit

Permalink
Relocated libPINCE files to it's own folder
Browse files Browse the repository at this point in the history
  • Loading branch information
korcankaraokcu committed Aug 26, 2016
1 parent 2a723e1 commit 947b849
Show file tree
Hide file tree
Showing 18 changed files with 31 additions and 24 deletions.
2 changes: 1 addition & 1 deletion GUI/CustomAbstractTableModels/AsciiModel.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from PyQt5.QtCore import QVariant, Qt
from GUI.CustomAbstractTableModels.HexModel import QHexModel

import SysUtils
from libPINCE import SysUtils


class QAsciiModel(QHexModel):
Expand Down
2 changes: 1 addition & 1 deletion GUI/CustomLabels/FlagRegisterLabel.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from PyQt5.QtWidgets import QLabel, QMessageBox
from PyQt5.QtGui import QCursor
from PyQt5.QtCore import Qt
import GDB_Engine
from libPINCE import GDB_Engine
from PINCE import DialogWithButtonsForm


Expand Down
2 changes: 1 addition & 1 deletion GUI/CustomLabels/RegisterLabel.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from PyQt5.QtWidgets import QLabel
from PyQt5.QtGui import QCursor
from PyQt5.QtCore import Qt
import GDB_Engine
from libPINCE import GDB_Engine
from PINCE import DialogWithButtonsForm


Expand Down
14 changes: 7 additions & 7 deletions Notes.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Code Relocations:
--libPINCE
GuiUtils.py is used to contain GUI related utility functions
SysUtils.py is used to contain all useful but non-GDB related libraries such as psutils
GDB_Engine.py is used to contain all GDB related functions
type_defs.py is used to contain all static&shared variable definitions
All codes that'll be injected to the inferior go to the folder "Injection"
/gdb_python_script/ contains all the python scripts that'll invoked from the gdb
PINCE.py is used to interract with GUI and other utility libraries
GuiUtils.py is used to contain GUI related utility functions
SysUtils.py is used to contain all useful but non-GDB related libraries such as psutils
GDB_Engine.py is used to contain all GDB related functions
type_defs.py is used to contain all static&shared variable definitions
All codes that'll be injected to the inferior go to the folder "Injection"
/linux-inject/ injects the codes found in the Injection directory to the target process, if your contribution about linux-inject is not only PINCE specific, please also contribute to the original project itself here->https://github.com/gaffe23/linux-inject
/gdb_python_script/ contains all the python scripts that'll invoked from the gdb
/media/ contains all the images, icons n' stuff
/pince-non-stop-files/ contains old codes that made the non-stop mode alive. It'll be re-implemented when the project finishes at basic level, this folder is just a... museum(?) for now
**Don't touch anything in GUI folder, it contains auto-generated codes created by pyuic
8 changes: 4 additions & 4 deletions PINCE.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
import sys
import traceback

import GuiUtils
import SysUtils
import GDB_Engine
import type_defs
from libPINCE import GuiUtils
from libPINCE import SysUtils
from libPINCE import GDB_Engine
from libPINCE import type_defs

from GUI.MainWindow import Ui_MainWindow as MainWindow
from GUI.SelectProcess import Ui_MainWindow as ProcessWindow
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions libPINCE/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
__pycache__/
.idea/*
.directory
*.py[cod]
*$py.class
6 changes: 3 additions & 3 deletions GDB_Engine.py → libPINCE/GDB_Engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import os
import ctypes
import pickle
import SysUtils
import type_defs
from . import SysUtils
from . import type_defs

INDEX_BYTE = type_defs.VALUE_INDEX.INDEX_BYTE
INDEX_2BYTES = type_defs.VALUE_INDEX.INDEX_2BYTES
Expand Down Expand Up @@ -229,7 +229,7 @@ def attach(pid):

# gdb scripts needs to know PINCE directory, unfortunately they don't start from the place where script exists
send_command('set $PINCE_PATH=' + '"' + currentdir + '"')
send_command("source gdb_python_scripts/GDBCommandExtensions.py")
send_command("source libPINCE/gdb_python_scripts/GDBCommandExtensions.py")
inferior_arch = get_inferior_arch()
continue_inferior()

Expand Down
2 changes: 1 addition & 1 deletion GuiUtils.py → libPINCE/GuiUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"""
from PyQt5.QtWidgets import QDesktopWidget
from re import search, sub
import type_defs
from . import type_defs

INDEX_BYTE = type_defs.VALUE_INDEX.INDEX_BYTE
INDEX_2BYTES = type_defs.VALUE_INDEX.INDEX_2BYTES
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion SysUtils.py → libPINCE/SysUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import shutil
import sys
import collections
import type_defs
from . import type_defs
from re import match, search, IGNORECASE, split

PINCE_IPC_PATH = type_defs.PATHS.PINCE_IPC_PATH
Expand Down
1 change: 1 addition & 0 deletions libPINCE/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
PINCE_PATH = gdbvalue.string()
sys.path.append(PINCE_PATH) # Adds the PINCE directory to PYTHONPATH to import libraries from PINCE

import gdb_python_scripts.ScriptUtils as ScriptUtils
import SysUtils
import type_defs
from libPINCE.gdb_python_scripts import ScriptUtils
from libPINCE import SysUtils
from libPINCE import type_defs

REGISTERS_32 = ["eax", "ebx", "ecx", "edx", "esi", "edi", "ebp", "esp", "eip"]
REGISTERS_64 = ["rax", "rbx", "rcx", "rdx", "rsi", "rdi", "rbp", "rsp", "rip", "r8", "r9", "r10", "r11", "r12",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
PINCE_PATH = gdbvalue.string()
sys.path.append(PINCE_PATH) # Adds the PINCE directory to PYTHONPATH to import libraries from PINCE

import SysUtils
import type_defs
from libPINCE import SysUtils
from libPINCE import type_defs

INDEX_BYTE = type_defs.VALUE_INDEX.INDEX_BYTE
INDEX_2BYTES = type_defs.VALUE_INDEX.INDEX_2BYTES
Expand Down
1 change: 1 addition & 0 deletions libPINCE/gdb_python_scripts/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

File renamed without changes.

0 comments on commit 947b849

Please sign in to comment.