repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Remove building with NOCRYPTO option
[minix.git]
/
external
/
bsd
/
file
/
dist
/
python
/
example.py
blob
0cd0b5e7ec2b1698c85a8118baca209ad40b0549
1
#! /usr/bin/python
2
3
import
magic
4
5
ms
=
magic
.
open
(
magic
.
NONE
)
6
ms
.
load
()
7
tp
=
ms
.
file
(
"/bin/ls"
)
8
print
(
tp
)
9
10
f
=
open
(
"/bin/ls"
,
"rb"
)
11
buf
=
f
.
read
(
4096
)
12
f
.
close
()
13
14
tp
=
ms
.
buffer
(
buf
)
15
print
(
tp
)
16
17
ms
.
close
()