Skip to content

Commit

Permalink
Preparing to migrate to Python 3
Browse files Browse the repository at this point in the history
Preparing to migrate to Python 3
  • Loading branch information
chkp-eyalit authored Nov 26, 2019
2 parents 94d3daf + 4ea70fb commit 7918f14
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ We believe that there are 3 main use cases for this IDA plugin:
## Read The Docs
https://karta.readthedocs.io/

## Installation (Python 3 & IDA >= 7.4) - Currently Under Development
For the latest versions, using Python 3, simply git clone the repository and run the ```setup.py install``` script.

## Installation (Python 2 & IDA < 7.4)
As of the release of IDA 7.4, Karta is only actively developed for IDA 7.4 or newer, and Python 3.
Python 2 and older IDA versions are still supported using the release version v.1.2.0, which is most probably going to be the last supported version due to python 2.X end of life.

## Identifier
Karta's identifier is a smaller plugin that identifies the existence, and fingerprints the versions, of the existing (supported) open source libraries within the binary. No more need to reverse engineer the same open-source library again-and-again, simply run the identifier plugin and get a detailed list of the used open sources.
Karta currently supports more than 10 open source libraries, including:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
url='https://github.com/CheckPointSW/Karta',
license='MIT',
packages=find_packages(),
install_requires=['elementals', 'sark', 'pydocstyle', 'flake8', 'click', 'scikit-learn==0.20.3'],
install_requires=['elementals==1.2.6', 'networkx==2.2', 'sark==1.0', 'pydocstyle==3.0.0', 'flake8==3.7.7', 'click==7.0', 'scikit-learn==0.20.3'],
classifiers=[
"Programming Language :: Python :: 2",
"License :: OSI Approved :: MIT License (MIT License)",
Expand Down
3 changes: 0 additions & 3 deletions src/thumbs_up/analyzers/intel.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@
# These are the byte offsets we are going to use for calibrating the classifier, before picking the final offsets
classifiers_start_offsets = { # Start of function classifier - used for functions after a code transition
0: range(0, 12),
1: range(0, 12),
}
classifiers_end_offsets = { # End of function classifier - used for functions before a code transition
0: range(-12, 0),
1: range(-12, 0),
}
classifiers_mixed_offsets = { # Start / End function classifier - used for start of functions when we don't fear code transitions
0: range(-4, 12),
1: range(-4, 12),
}

class IntelAnalyzer(Analyzer):
Expand Down
2 changes: 1 addition & 1 deletion src/thumbs_up/thumbs_up_ELF.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def analysisStart(analyzer, scs, sds):
def main():
"""Start Thumbs Up IDA plugin - ELF version."""
# Init the logger
logger = Logger("Thumb's Up Logger", [("thumbs_up.log", "w", logging.DEBUG)], use_stdout=False, min_log_level=logging.INFO)
logger = Logger("Thumbs Up Logger", [("thumbs_up.log", "w", logging.DEBUG)], use_stdout=False, min_log_level=logging.INFO)
logger.linkHandler(IdaLogHandler())
# Locate the segments
code_segments = filter(lambda x: x.type == 2, sark.segments())
Expand Down
2 changes: 1 addition & 1 deletion src/thumbs_up/thumbs_up_firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def analysisStart(analyzer, scs, sds):
def main():
"""Start Thumbs Up IDA plugin - Firmware version."""
# Init the logger
logger = Logger("Thumb's Up Logger", [("thumbs_up.log", "w", logging.DEBUG)], use_stdout=False, min_log_level=logging.INFO)
logger = Logger("Thumbs Up Logger", [("thumbs_up.log", "w", logging.DEBUG)], use_stdout=False, min_log_level=logging.INFO)
logger.linkHandler(IdaLogHandler())
# Locate the segments
code_segments = filter(lambda x: x.type == 2, sark.segments())
Expand Down
4 changes: 2 additions & 2 deletions src/thumbs_up/utils/code_regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CodeRegion:
Notes
-----
1. Code regions only live during a single thumb's up scan, during all of it's iterations
1. Code regions only live during a single Thumbs Up scan, during all of it's iterations
2. Code regions will be changed if merged together with other regions / got resized
"""

Expand Down Expand Up @@ -57,7 +57,7 @@ def resizeStart(self, new_start):
self.changed = True

class CodeRegions:
"""A class that describes the overall set of seen code regions during a thumb's up scan.
"""A class that describes the overall set of seen code regions during a Thumbs Up scan.
Attributes
----------
Expand Down

0 comments on commit 7918f14

Please sign in to comment.