Skip to content

Commit

Permalink
enough to get CASC working with IDA 7.1 (for the most part)
Browse files Browse the repository at this point in the history
  • Loading branch information
demonduck committed Apr 23, 2018
1 parent b23b4ab commit 280c42f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions plugin/casc_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

# Python Modules
import collections
import struct
import bisect
import pickle
import math
Expand Down Expand Up @@ -67,7 +68,14 @@
#<IDAROOT>/python/lib/python2.7/site-packages. Make this prettier in the future.
import os
import site
site.addsitedir(os.path.join(GetIdaDirectory(), "python", "lib", "python2.7", "site-packages"))
try:
site.addsitedir(os.path.join(GetIdaDirectory(), "python", "lib", "python2.7", "site-packages"))
except NameError:
try:
import ida_diskio
site.addsitedir(os.path.join(ida_diskio.get_ida_subdirs('python')[1], 'lib', 'python2.7', 'site-packages'))
except ImportError:
print 'Get IDA directory'

import yara
import ply
Expand All @@ -86,7 +94,8 @@
sigalyzer_required_modules_loaded = False

SIGALYZER_COLOR_HIGHLIGHTED = 0x4dd811

AR_LONG = 65
AR_STR = 83
# Global Variables
#-------------------------------------------------------------------------------
b_asm_sig_handler_loaded = True
Expand Down Expand Up @@ -2728,8 +2737,6 @@ class ClamAVSigCreatorPlugin(plugin_t):
def init(self):
global clamav_sig_creator_plugin

file_type = IDAW.GetCharPrm(INF_FILETYPE)

# Currently only supports intel_x86
if get_file_type() not in [1, 6, 9]:
msg_str = '{0} does not support this file type.\n'
Expand Down

0 comments on commit 280c42f

Please sign in to comment.