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

pdfdump failed when conf.prog.pdfreader not exists #333

Closed
dark-lbp opened this issue Nov 8, 2016 · 1 comment
Closed

pdfdump failed when conf.prog.pdfreader not exists #333

dark-lbp opened this issue Nov 8, 2016 · 1 comment

Comments

@dark-lbp
Copy link
Contributor

dark-lbp commented Nov 8, 2016

The Problem is Scapy default use acroread as pdf reader. If acroread is not installed on our os, pdfdump will raise this problem.

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/scapy/packet.py", line 417, in pdfdump
    subprocess.Popen([conf.prog.pdfreader, fname+".pdf"])
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

I am using osx so this code is work for me.

Welcome to Scapy (2.3.3.dev6)
>>> conf.prog.pdfreader = 'open'
>>> a.pdfdump()
KeyboardInterrupt
>>> a=TCP()
>>> a.pdfdump()
WARNING: No IP underlayer to compute checksum. Leaving null.
Ignoring line 17070 in mapping file 'pdftex.map': Unknown token '<MinLibBol'
Ignoring line 17071 in mapping file 'pdftex.map': Unknown token '<MinLibBol'
Ignoring line 17072 in mapping file 'pdftex.map': Unknown token '<MinLibBol'
Ignoring line 17073 in mapping file 'pdftex.map': Unknown token '<MinLibBolIta'
Ignoring line 17074 in mapping file 'pdftex.map': Unknown token '<MinLibBolIta'
Ignoring line 17075 in mapping file 'pdftex.map': Unknown token '<MinLibBolIta'
Ignoring line 17076 in mapping file 'pdftex.map': Unknown token '<MinLibIta'
Ignoring line 17077 in mapping file 'pdftex.map': Unknown token '<MinLibIta'
Ignoring line 17078 in mapping file 'pdftex.map': Unknown token '<MinLibIta'
Ignoring line 17079 in mapping file 'pdftex.map': Unknown token '<MinLibReg'
Ignoring line 17080 in mapping file 'pdftex.map': Unknown token '<MinLibReg'
Ignoring line 17081 in mapping file 'pdftex.map': Unknown token '<MinLibReg'
>>>

May be we should try auto find pdfreader applications when init scapy or we just check default pdfreader is exists and warning if conf.prog.pdfreader is not exists?

@p-l-
Copy link
Member

p-l- commented Aug 12, 2017

Fixed in #692

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

No branches or pull requests

2 participants