mirror of
https://github.com/opnsense/src.git
synced 2026-02-11 23:06:12 -05:00
18 lines
207 B
Python
18 lines
207 B
Python
|
|
#! /usr/bin/python
|
||
|
|
|
||
|
|
import magic
|
||
|
|
|
||
|
|
ms = magic.open(magic.NONE)
|
||
|
|
ms.load()
|
||
|
|
tp = ms.file("/bin/ls")
|
||
|
|
print (tp)
|
||
|
|
|
||
|
|
f = open("/bin/ls", "rb")
|
||
|
|
buf = f.read(4096)
|
||
|
|
f.close()
|
||
|
|
|
||
|
|
tp = ms.buffer(buf)
|
||
|
|
print (tp)
|
||
|
|
|
||
|
|
ms.close()
|