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
059a084d
Commit
059a084d
authored
Jul 13, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consolidated find_library code
parent
c043dfe2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
C.py
src/binwalk/core/C.py
+8
-6
No files found.
src/binwalk/core/C.py
View file @
059a084d
...
...
@@ -117,7 +117,9 @@ class Library(object):
try
:
prefix
=
open
(
self
.
settings
.
system
.
prefix
,
'r'
)
.
read
()
.
strip
()
except
:
except
KeyboardInterrupt
as
e
:
raise
e
except
Exception
:
prefix
=
''
if
isinstance
(
libraries
,
str
):
...
...
@@ -126,16 +128,16 @@ class Library(object):
for
library
in
libraries
:
system_paths
=
{
'linux'
:
[
os
.
path
.
join
(
prefix
,
'lib'
,
'lib
%
s.so'
%
library
),
'/usr/local/lib/lib
%
s.so'
%
library
],
'
linux2
'
:
[
os
.
path
.
join
(
prefix
,
'lib'
,
'lib
%
s.so'
%
library
),
'/usr/local/lib/lib
%
s.so'
%
library
],
'
linux3'
:
[
os
.
path
.
join
(
prefix
,
'lib'
,
'lib
%
s.so'
%
library
),
'/usr/local/lib/lib
%
s.so
'
%
library
],
'
cygwin
'
:
[
os
.
path
.
join
(
prefix
,
'lib'
,
'lib
%
s.so'
%
library
),
'/usr/local/lib/lib
%
s.so'
%
library
],
'
win32'
:
[
os
.
path
.
join
(
prefix
,
'lib
%
s.dll'
%
library
),
'
%
s.dll
'
%
library
],
'darwin'
:
[
os
.
path
.
join
(
prefix
,
'lib'
,
'lib
%
s.dylib'
%
library
),
'/opt/local/lib/lib
%
s.dylib'
%
library
,
'/usr/local/lib/lib
%
s.dylib'
%
library
,
]
+
glob
.
glob
(
'/usr/local/Cellar/lib
%
s/*/lib/lib
%
s.dylib'
%
(
library
,
library
)),
'cygwin'
:
[
os
.
path
.
join
(
prefix
,
'lib'
,
'lib
%
s.so'
%
library
),
'/usr/local/lib/lib
%
s.so'
%
library
],
'win32'
:
[
os
.
path
.
join
(
prefix
,
'lib
%
s.dll'
%
library
),
'
%
s.dll'
%
library
]
}
for
i
in
range
(
2
,
4
):
system_paths
[
'linux
%
d'
%
i
]
=
system_paths
[
'linux'
]
# 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.
...
...
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