From 0568cf7e464c15ea0ed1c1b116ae2d70aee315cd Mon Sep 17 00:00:00 2001
From: Dirk Loss <mail@dirk-loss.de>
Date: Wed, 9 Dec 2009 22:10:16 +0100
Subject: [PATCH] Added default locations for PDF/PS viewers on Windows

This shall make it more convenient to use pdfdump()
and psdump() and automatically launch a viewer:

Default viewer for pdfdump() is Acrobat reader.
Please change your PATH variable to include the directory
where AcroRd.exe is placed.

Default viewer for psdump() is GSview. The gsview32.exe
executable is automatically searched for in GSview's
default installation directory:
%ProgramFiles%\Ghostgum\gsview
If it is not found, put the directory on your PATH.

You can manually set the paths to the executables by
changing the conf.prog.pdfreader and conf.prog.psreader
configuration parameters.
---
 scapy/arch/windows/__init__.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scapy/arch/windows/__init__.py b/scapy/arch/windows/__init__.py
index f2d5003e..f80eaf2b 100755
--- a/scapy/arch/windows/__init__.py
+++ b/scapy/arch/windows/__init__.py
@@ -54,8 +54,8 @@ def win_find_exe(filename, installsubdir=None, env="ProgramFiles"):
 class WinProgPath(ConfClass):
     _default = "<System default>"
     # We try some magic to find the appropriate executables
-    pdfreader = _default 
-    psreader = _default
+    pdfreader = win_find_exe("AcroRd32") 
+    psreader = win_find_exe("gsview32.exe", "Ghostgum/gsview")
     dot = win_find_exe("dot", "ATT/Graphviz/bin")
     tcpdump = win_find_exe("windump")
     tcpreplay = win_find_exe("tcpreplay")
-- 
GitLab