Seite 1 von 1

PCapy installation

Verfasst: Mittwoch 28. April 2021, 19:00
von tomycat
hallo,
ich bin einer Anleitung nachgegangen:
https://github.com/OpenRCE/sulley/wiki/ ... stallation

Es hat vom Prinzip her alles gut geklappt. :-)
Punkt 13 ist mein Sorgenkind.
C:\sulley_build\pcapy-0.10.5>python setup.py build_ext -c mingw32 -I "C:\sulley_
build\WpdPack\Include" -L "C:\sulley_build\WpdPack\Lib"
running build_ext
building 'pcapy' extension
C:\MinGW\bin\gcc.exe -mdll -O -Wall -DWIN32=1 -Ic:\sulley_build\wpdpack\Include
-IC:\sulley_build\WpdPack\Include -IC:\Python27\include -IC:\Python27\PC -c pcap
dumper.cc -o build\temp.win32-2.7\Release\pcapdumper.o
In file included from pcapdumper.cc:15:0:
pcapy.h:20:14: warning: 'char* luid_to_guid(char*)' declared 'static' but never
defined [-Wunused-function]
static char* luid_to_guid(char *luid);
^~~~~~~~~~~~
C:\MinGW\bin\gcc.exe -mdll -O -Wall -DWIN32=1 -Ic:\sulley_build\wpdpack\Include
-IC:\sulley_build\WpdPack\Include -IC:\Python27\include -IC:\Python27\PC -c bpfo
bj.cc -o build\temp.win32-2.7\Release\bpfobj.o
In file included from c:\sulley_build\wpdpack\Include/pcap/pcap.h:54:0,
from c:\sulley_build\wpdpack\Include/pcap.h:45,
from bpfobj.cc:10:
c:\mingw\include\stdio.h:345:12: error: expected initializer before '__mingw__sn
printf'
extern int __mingw_stdio_redirect__(snprintf)(char*, size_t, const char*, ...);

^
c:\mingw\include\stdio.h:349:12: error: expected initializer before '__mingw__vs
nprintf'
extern int __mingw_stdio_redirect__(vsnprintf)(char*, size_t, const char*, __VA
LIST);
^
In file included from bpfobj.cc:14:0:
pcapy.h:20:14: warning: 'char* luid_to_guid(char*)' declared 'static' but never
defined [-Wunused-function]
static char* luid_to_guid(char *luid);
^~~~~~~~~~~~
error: command 'C:\\MinGW\\bin\\gcc.exe' failed with exit status 1

C:\sulley_build\pcapy-0.10.5>
Idee 2
C:\sulley_build>c:\Python27\Scripts\pip install pcapy==0.11.2
Downloading/unpacking pcapy==0.11.2
Downloading pcapy-0.11.2.tar.gz
Running setup.py (path:c:\users\tomycat\appdata\local\temp\pip_build_tomycat\p
capy\setup.py) egg_info for package pcapy

Installing collected packages: pcapy
Running setup.py install for pcapy
building 'pcapy' extension
error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat).
Get it from http://aka.ms/vcpython27
Complete output from command C:\Python27\python.exe -c "import setuptools, t
okenize;__file__='c:\\users\\tomycat\\appdata\\local\\temp\\pip_build_tomycat\\p
capy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().re
place('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\tomycat\appda
ta\local\temp\pip-4smeiu-record\install-record.txt --single-version-externally-m
anaged --compile:
running install

running build

running build_ext

building 'pcapy' extension

error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get
it from http://aka.ms/vcpython27

----------------------------------------
Cleaning up...
Command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\use
rs\\tomycat\\appdata\\local\\temp\\pip_build_tomycat\\pcapy\\setup.py';exec(comp
ile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __fi
le__, 'exec'))" install --record c:\users\tomycat\appdata\local\temp\pip-4smeiu-
record\install-record.txt --single-version-externally-managed --compile failed w
ith error code 1 in c:\users\tomycat\appdata\local\temp\pip_build_tomycat\pcapy
Storing debug log for failure in C:\Users\tomycat\pip\pip.log

C:\sulley_build>
Was mir ins Auge sticht:

error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat).

Visual c++ 9 gibts nicht mehr.
http://aka.ms/vcpython27 ist tot.

Re: PCapy installation

Verfasst: Mittwoch 28. April 2021, 20:54
von __deets__
Deine Fehlermeldung kann man googeln, und findet https://github.com/helpsystems/pcapy/issues/40

Vielleicht hilft es. Aber das ist alles veralteter Mist, ungepflegt und jenseits seiner Lebensdauer. Such dir mal Dinge, die aktueller sind.

Re: PCapy installation

Verfasst: Donnerstag 29. April 2021, 17:49
von tomycat
thx all,
den link habe ich schon ausprobiert, leider ohne Erfolg.
Ich will NICHT aufgeben. Die Anleitung hat sich zu tief in meinem Kopf gebohrt.
Google Google google....
Ahhhhhhh...
https://breakingcode.wordpress.com/2012 ... 5-2-6-2-7/
Die pcapy und die Impacket ist die gleiche Version wie in der Anleitung, als Installer. :-) :-)

letzter Punkt geht nicht:
C:\sulley_build\sulley>python network_monitor.py
Traceback (most recent call last):
File "network_monitor.py", line 7, in <module>
import pcapy
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.

C:\sulley_build\sulley>
Die Code:
#!c:\\python\\python.exe
import threading
import getopt
import time
import sys
import os
import pcapy <----Zeile 7
import impacket
---Schnipp----
Wie bekomme ich es hin, dass pcapy benützt wird, obwohl ich es jetzt in der Systemsteuerung/Programme vorhanden ist.
Wenn ich das jetzt auch noch hinbekomme, dann mache ich Komplettanleitung "Wie installiere Sulley, in Deutsch" :-)

Re: PCapy installation

Verfasst: Dienstag 4. Mai 2021, 20:47
von tomycat
hat niemand eine Idee?
Wie ist denn das Ablauf?
in der py Datei steht include abc
Wie bekommt man heraus, wo python auf das abc Modul zugreift?
Das muss doch irgendwo registiert sein.
Z.B. WENN include abc DANN ---------> c:\lblabla\abc.dll

Re: PCapy installation

Verfasst: Mittwoch 5. Mai 2021, 14:01
von __blackjack__
@tomycat: Die Details zu ``import`` findest Du hier: https://docs.python.org/2.7/reference/s ... -statement