Comments (6)
Can you tell me details? Change which file?
from stegoveritas.
So i just switched it over. It's the fact that I was utilizing the GNU file command, which won't be installed by default on Windows machines. I haven't had a chance to test this, so let me know how it works for you.
You'll need to pip install python-magic
The changes are in the "noFileCommand" branch for now (https://github.com/Owlz/stegoVeritas/tree/noFileCommand).
from stegoveritas.
windows7 x64 python 3.5.2
if I just install python-magic
result
F:\steganography\stegoVeritas-noFileCommand>python3 stegoveritas.py "miao~870F6C
667A6CDC0D1F533859E72C48E0.jpg"
Type: JPEG (ISO 10918)
Mode: RGB
Checking Meta Data
Exif Data
Image ResolutionUnit: Pixels/Inch
Image XResolution: 144
Image YResolution: 144
Image Artist: key:m1a0@888
Image YCbCrPositioning: Centered
Checking for trailing data
Running image filters
Attempting to brute force LSB items
Trying 0.0.0
Traceback (most recent call last):
File "stegoveritas.py", line 70, in
modules.image.run(fArray,args)
File "F:\steganography\stegoVeritas-noFileCommand\modules\image_init_.py",
line 98, in run
autoAnalysis(f,args)
File "F:\steganography\stegoVeritas-noFileCommand\modules\image_init_.py",
line 37, in autoAnalysis
modules.image.imageLSB.auto(f,args)
File "F:\steganography\stegoVeritas-noFileCommand\modules\image\imageLSB.py",
line 143, in auto
testOutput(o,args)
File "F:\steganography\stegoVeritas-noFileCommand\modules\image\imageLSB.py",
line 23, in testOutput
m = magic.from_buffer(b,mime=True)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\lib\site-packag
es\python_magic-0.4.13-py3.5.egg\magic.py", line 142, in from_buffer
File "C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\lib\site-packag
es\python_magic-0.4.13-py3.5.egg\magic.py", line 118, in _get_magic_type
File "C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\lib\site-packag
es\python_magic-0.4.13-py3.5.egg\magic.py", line 67, in init
File "C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\lib\site-packag
es\python_magic-0.4.13-py3.5.egg\magic.py", line 259, in magic_load
File "C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\lib\site-packag
es\python_magic-0.4.13-py3.5.egg\magic.py", line 190, in errorcheck_negative_one
magic.MagicException: b'could not find any magic files!'
then I change the imageLSB.py file
changed code
def testOutput(b,args):
import magic
m = magic.Magic(magic_file="C:\GnuWin32\share\misc")
m2 = m.from_buffer(b,mime=True)
if m2 != 'application/octet-stream':
m2 = magic.from_buffer(b,mime=False)
print("Found something worth keeping!\n{0}".format(m))
# Save it to disk
with open(os.path.join(args.outDir,str(time.time())), "wb") as f:
f.write(b)
result
Traceback (most recent call last):
File "stegoveritas.py", line 70, in
modules.image.run(fArray,args)
File "F:\steganography\stegoVeritas-noFileCommand\modules\image_init_.py
line 98, in run
autoAnalysis(f,args)
File "F:\steganography\stegoVeritas-noFileCommand\modules\image_init_.py
line 37, in autoAnalysis
modules.image.imageLSB.auto(f,args)
File "F:\steganography\stegoVeritas-noFileCommand\modules\image\imageLSB.py
line 144, in auto
testOutput(o,args)
File "F:\steganography\stegoVeritas-noFileCommand\modules\image\imageLSB.py
line 24, in testOutput
m2 = m.from_buffer(b,mime=True)
TypeError: from_buffer() got an unexpected keyword argument 'mime'
**I guess that the magic.from_buffer have some problem, I know a little about magic.from_buffer,maybe you have some solutions **
from stegoveritas.
Hmm.. So looks like this library (and most others I've seen) relies on libmagic. That said, one thing you probably want to do is provide the fill magic file path instead of the directory:
m = magic.Magic(magic_file="C:\GnuWin32\share\misc\magic")
Another issue I'm seeing on the windows side is getting the proper DLLs (and right architecture for them) in the correct places. Not sure what a good answer is for now as it seems the Windows solutions for libmagic aren't the greatest.
I'll keep this issue open as a reminder.
from stegoveritas.
I should say, my guess is that the DLLs could be packaged with python and a smart setup script created for them so that libmagic will work out of the box. However, that would involve updating their rep/creating my own fork of it, as well as shipping with DLLs. Not a horrible thing, but not really what one wants to do with python either.
from stegoveritas.
This issue ticket is from well before the refactor. Not really a thing anymore.
from stegoveritas.
Related Issues (20)
- AttributeError: module 'magic' has no attribute 'from_buffer' HOT 13
- Propagate default run down to veritas class
- Add py3exiv2 HOT 1
- relative path error HOT 3
- stegoveritas-binwalk HOT 1
- platform.dist() deprecation HOT 1
- BA package broken - ask for review HOT 1
- Conflicting License Info
- Getting syntax error HOT 18
- New issue when trying to use stegoVeritas HOT 1
- get this error when I run stegoveritas /home/user/Desktop/DSWii6x.png HOT 4
- Integrate Ciphey
- cant run stegoveritas in terminal (Kali)
- stegoveritas_install_deps error on mac HOT 6
- Python 3.9 compatibility error HOT 1
- parrot testing HOT 2
- png colortype rgb with alpha not supported by PIL HOT 1
- Incorporate OpenStego
- _dumpLSBRGBA HOT 1
- ModuleNotFoundError: No module named 'magic' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stegoveritas.