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
e318184e
Commit
e318184e
authored
Nov 21, 2013
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed old test file.
parent
62ce8313
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
36 deletions
+0
-36
extractor.py
src/C/miniz/extractor.py
+0
-36
No files found.
src/C/miniz/extractor.py
deleted
100755 → 0
View file @
62ce8313
#!/usr/bin/env python
import
sys
import
ctypes
import
ctypes.util
from
binwalk.common
import
BlockFile
class
Foo
:
SIZE
=
33
*
1024
def
__init__
(
self
):
self
.
tinfl
=
ctypes
.
cdll
.
LoadLibrary
(
ctypes
.
util
.
find_library
(
"tinfl"
))
def
_extractor
(
self
,
file_name
):
processed
=
0
inflated_data
=
''
fd
=
BlockFile
(
file_name
,
'rb'
)
fd
.
READ_BLOCK_SIZE
=
self
.
SIZE
while
processed
<
fd
.
length
:
(
data
,
dlen
)
=
fd
.
read_block
()
inflated_block
=
self
.
tinfl
.
inflate_block
(
data
,
dlen
)
if
inflated_block
:
inflated_data
+=
ctypes
.
c_char_p
(
inflated_block
)
.
value
[
0
:
4
]
else
:
break
processed
+=
dlen
fd
.
close
()
print
inflated_data
print
"
%
s inflated to
%
d bytes"
%
(
file_name
,
len
(
inflated_data
))
Foo
()
.
_extractor
(
sys
.
argv
[
1
])
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