Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Errno 2] No such file or directory #84

Open
foratnegre opened this issue Nov 13, 2019 · 2 comments
Open

[Errno 2] No such file or directory #84

foratnegre opened this issue Nov 13, 2019 · 2 comments
Assignees
Labels

Comments

@foratnegre
Copy link

Trying to analyze an Office Word document gives an error of directory or file not found.
But it refers to Excel.
I have LibreOffice installed (version 6.3)

The file is analyzed here:
https://app.any.run/tasks/47980f8d-f6be-4ec3-bc56-e667fceba9ad

This is text of error:
vmonkey 0.08 - https://github.com/decalage2/ViperMonkey
THIS IS WORK IN PROGRESS - Check updates regularly!
Please report any issue at https://github.com/decalage2/ViperMonkey/issues

===============================================================================
FILE: Facturas de noviembre.doc
INFO Starting emulation...
INFO Emulating an Office (VBA) file.
INFO Reading document metadata...
Traceback (most recent call last):
File "C:\pypy\site-packages\vipermonkey-0.8-py2.7.egg\vipermonkey\vmonkey.py", line 1008, in _process_file
vm.loaded_excel = load_excel(data)
File "C:\pypy\site-packages\vipermonkey-0.8-py2.7.egg\vipermonkey\vmonkey.py", line 898, in load_excel
wb = load_excel_libreoffice(data)
File "C:\pypy\site-packages\vipermonkey-0.8-py2.7.egg\vipermonkey\vmonkey.py", line 815, in load_excel_libreoffice
f = open(out_dir, 'wb')
IOError: [Errno 2] No such file or directory: '/tmp/tmp_excel_file_3513880625'
ERROR [Errno 2] No such file or directory: '/tmp/tmp_excel_file_3513880625'

@decalage2 decalage2 added the bug label Nov 14, 2019
@decalage2 decalage2 added this to the ViperMonkey 0.08 milestone Nov 14, 2019
@BiteFoo
Copy link

BiteFoo commented Oct 29, 2020

I alse have same issues on Windows7 x64,python2.7.18 ,and I have already fixed it like below:

Firstly ,add tempfile module the vmonkey.py

# for logging
from core.logger import log
from core.logger import CappedFileHandler
from logging import LogRecord
from logging import FileHandler

# for tempfile for Windows ,it works  
import tempfile

_,tmpdir = tempfile.mkstemp()

Second,replace all "/tmp/tmp_word_file_" to " tmpdir+""+"tmp_word_file" as below

# bug windows cant' find /tmp dir
    # out_dir = "/tmp/tmp_word_file_" + str(random.randrange(0, 10000000000))
    # bugfix try tmpfile moduel 
    
    out_dir = tmpdir+"_"+"tmp_word_file_" + str(random.randrange(0, 10000000000))

Finally ,everything is works :D

@decalage2 decalage2 self-assigned this Oct 29, 2020
@decalage2
Copy link
Owner

May be fixed by kirk-sayre-work#29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants