Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
binwalk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-gitdep
binwalk
Commits
887e9292
Commit
887e9292
authored
Apr 30, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified C.py to search /usr/local/lib first.
parent
73b9c415
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
C.py
src/binwalk/core/C.py
+11
-7
No files found.
src/binwalk/core/C.py
View file @
887e9292
...
...
@@ -124,15 +124,19 @@ class Library(object):
'win32'
:
[
'
%
s.dll'
%
library
]
}
lib_path
=
ctypes
.
util
.
find_library
(
library
)
# If ctypes failed to find the library, check the common paths listed in system_paths
# Search the common install directories first; these are usually not in the library search path
# Search these *first*, since a) they are the most likely locations and b) there may be a
# discrepency between where ctypes.util.find_library and ctypes.cdll.LoadLibrary search for libs.
for
path
in
system_paths
[
sys
.
platform
]:
if
os
.
path
.
exists
(
path
):
lib_path
=
path
break
# If we failed to find the library, check the standard library search paths
if
not
lib_path
:
for
path
in
system_paths
[
sys
.
platform
]:
if
os
.
path
.
exists
(
path
):
lib_path
=
path
break
lib_path
=
ctypes
.
util
.
find_library
(
library
)
# If we still couldn't find the library, error out
if
not
lib_path
:
raise
Exception
(
"Failed to locate library '
%
s'"
%
library
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment