Autor Tema: Me sigue fallando el instalar nemesis en debian wheezy. (SOLUCIONADO)  (Leído 18770 veces)

Desconectado Mr_X

  • Moderadores
  • ******
  • Mensajes: 2635
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #10 en: 05 de Junio de 2013, 10:32:18 pm »
Si seguiste las instrucciones de tu mensaje original

Código: [Seleccionar]
wget http://www.seronline.de/download/libnet-1.0.2a.tar.gz /usr/local/src
cd /usr/local/src
tar -zxvf libnet-1.0.2a.tar.gz
cd libnet-1.0.2a
./configure && make && make install

El comando tendría que ser:

Código: [Seleccionar]
./configure --with-libnet-includes=/usr/local/src/Libnet-1.0.2a/include --with-libnet-libraries=/usr/local/src/Libnet-1.0.2a/lib

Sólo asegúrate que la ruta a libnet-1.0.2a es la correcta...
"... I'll wait I sow the seed, I set the scene and I watch the world go by..."

Desconectado Pengüin

  • Member
  • ***
  • Mensajes: 242
  • www.daboweb.com
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #11 en: 07 de Junio de 2013, 11:54:12 pm »
Si seguiste las instrucciones de tu mensaje original

Código: [Seleccionar]
wget http://www.seronline.de/download/libnet-1.0.2a.tar.gz /usr/local/src
cd /usr/local/src
tar -zxvf libnet-1.0.2a.tar.gz
cd libnet-1.0.2a
./configure && make && make install
Aquí me menciona que no reconoce x86_64-pc , te lo muestro :
Código: [Seleccionar]
./configure && make && make install
creating cache ./config.cache
Beginning autoconfiguration process for libnet-1.0.2a...
checking host system type... Invalid configuration `x86_64-pc-linux-gnu': machine `x86_64-pc' not recognized

checking target system type... Invalid configuration `x86_64-pc-linux-gnu': machine `x86_64-pc' not recognized

checking build system type... Invalid configuration `x86_64-pc-linux-gnu': machine `x86_64-pc' not recognized

checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for working const... yes
checking for a BSD compatible install... /usr/bin/install -c
checking whether make sets ${MAKE}... yes
checking for ranlib... ranlib
checking for ar... ar
checking for ln... ln
checking for strerror... yes
checking for pcap_open_live in -lpcap... yes
checking low-level packet interface type... found SOCK_PACKET
configure: warning: apparently your OS is not officially supported yet
configure: warning: this may not work
you'll have to edit the makefile by hand
please send diffs to [email protected]
checking for libnet_build_ip in -lnet... no
checking machine endianess... lil
checking if unaligned accesses fail... no
checking for sys/sockio.h... no
updating cache ./config.cache
creating ./config.status
creating Makefile
creating test/Makefile
creating test/TCP/Makefile
creating test/Ethernet/Makefile
creating test/UDP/Makefile
creating test/ICMP/Makefile
creating test/Random/Makefile
creating test/OSPF/Makefile
creating util/Makefile
creating util/Get-mac/Makefile
creating example/Makefile
creating libnet-config
creating include/config.h
sed -e 's/.*/#define VERSION "&"/' ./VERSION > version.h
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_resolve.c -o src/libnet_resolve.o
In file included from src/libnet_resolve.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
src/libnet_resolve.c: In function ‘libnet_host_lookup’:
src/libnet_resolve.c:67:17: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness [-Wpointer-sign]
In file included from src/../include/libnet.h:35:0,
                 from src/libnet_resolve.c:36:
/usr/include/stdio.h:361:12: note: expected ‘char * __restrict__’ but argument is of type ‘u_char *’
src/libnet_resolve.c:71:9: warning: pointer targets in passing argument 1 of ‘__builtin_strncpy’ differ in signedness [-Wpointer-sign]
src/libnet_resolve.c:71:9: note: expected ‘char *’ but argument is of type ‘u_char *’
src/libnet_resolve.c: In function ‘libnet_host_lookup_r’:
src/libnet_resolve.c:95:17: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness [-Wpointer-sign]
In file included from src/../include/libnet.h:35:0,
                 from src/libnet_resolve.c:36:
/usr/include/stdio.h:361:12: note: expected ‘char * __restrict__’ but argument is of type ‘u_char *’
src/libnet_resolve.c:100:9: warning: pointer targets in passing argument 1 of ‘__builtin_strncpy’ differ in signedness [-Wpointer-sign]
src/libnet_resolve.c:100:9: note: expected ‘char *’ but argument is of type ‘u_char *’
src/libnet_resolve.c: In function ‘libnet_name_resolve’:
src/libnet_resolve.c:116:9: warning: pointer targets in passing argument 1 of ‘inet_addr’ differ in signedness [-Wpointer-sign]
In file included from src/../include/libnet.h:71:0,
                 from src/libnet_resolve.c:36:
/usr/include/arpa/inet.h:35:18: note: expected ‘const char *’ but argument is of type ‘u_char *’
src/libnet_resolve.c:118:13: warning: pointer targets in passing argument 1 of ‘gethostbyname’ differ in signedness [-Wpointer-sign]
In file included from src/../include/libnet.h:73:0,
                 from src/libnet_resolve.c:36:
/usr/include/netdb.h:145:24: note: expected ‘const char *’ but argument is of type ‘u_char *’
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_socket.c -o src/libnet_socket.o
In file included from src/libnet_socket.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_checksum.c -o src/libnet_checksum.o
In file included from src/libnet_checksum.c:37:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_prand.c -o src/libnet_prand.o
In file included from src/libnet_prand.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_version.c -o src/libnet_version.o
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_write_ip.c -o src/libnet_write_ip.o
In file included from src/libnet_write_ip.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_insert_ipo.c -o src/libnet_insert_ipo.o
In file included from src/libnet_insert_ipo.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_insert_tcpo.c -o src/libnet_insert_tcpo.o
In file included from src/libnet_insert_tcpo.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_error.c -o src/libnet_error.o
In file included from src/libnet_error.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_link_sockpacket.c -o src/libnet_link_sockpacket.o
In file included from src/libnet_link_sockpacket.c:52:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_packet_mem.c -o src/libnet_packet_mem.o
In file included from src/libnet_packet_mem.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_build_ip.c -o src/libnet_build_ip.o
In file included from src/libnet_build_ip.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_build_tcp.c -o src/libnet_build_tcp.o
In file included from src/libnet_build_tcp.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_build_udp.c -o src/libnet_build_udp.o
In file included from src/libnet_build_udp.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_build_arp.c -o src/libnet_build_arp.o
In file included from src/libnet_build_arp.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_build_ethernet.c -o src/libnet_build_ethernet.o
In file included from src/libnet_build_ethernet.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_build_icmp.c -o src/libnet_build_icmp.o
In file included from src/libnet_build_icmp.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_build_igmp.c -o src/libnet_build_igmp.o
In file included from src/libnet_build_igmp.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_build_dns.c -o src/libnet_build_dns.o
In file included from src/libnet_build_dns.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_build_snmp.c -o src/libnet_build_snmp.o
In file included from src/libnet_build_snmp.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_build_rip.c -o src/libnet_build_rip.o
In file included from src/libnet_build_rip.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_build_ospf.c -o src/libnet_build_ospf.o
In file included from src/libnet_build_ospf.c:39:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_build_vrrp.c -o src/libnet_build_vrrp.o
In file included from src/libnet_build_vrrp.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_asn1.c -o src/libnet_asn1.o
In file included from src/libnet_asn1.c:59:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_hex_dump.c -o src/libnet_hex_dump.o
In file included from src/libnet_hex_dump.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_if_addr.c -o src/libnet_if_addr.o
In file included from src/libnet_if_addr.c:37:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
src/libnet_if_addr.c: In function ‘libnet_ifaddrlist’:
src/libnet_if_addr.c:56:52: warning: variable ‘mp’ set but not used [-Wunused-but-set-variable]
gcc -O2 -funroll-loops -fomit-frame-pointer -Wall   -DHAVE_CONFIG_H -c src/libnet_port_list.c -o src/libnet_port_list.o
In file included from src/libnet_port_list.c:36:0:
src/../include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
src/../include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
src/libnet_port_list.c: In function ‘libnet_plist_chain_dump_string’:
src/libnet_port_list.c:259:13: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness [-Wpointer-sign]
In file included from src/../include/libnet.h:35:0,
                 from src/libnet_port_list.c:36:
/usr/include/stdio.h:361:12: note: expected ‘char * __restrict__’ but argument is of type ‘u_char *’
src/libnet_port_list.c:263:13: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness [-Wpointer-sign]
In file included from src/../include/libnet.h:35:0,
                 from src/libnet_port_list.c:36:
/usr/include/stdio.h:361:12: note: expected ‘char * __restrict__’ but argument is of type ‘u_char *’
src/libnet_port_list.c:268:13: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness [-Wpointer-sign]
In file included from src/../include/libnet.h:35:0,
                 from src/libnet_port_list.c:36:
/usr/include/stdio.h:361:12: note: expected ‘char * __restrict__’ but argument is of type ‘u_char *’
src/libnet_port_list.c:271:5: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
In file included from src/../include/libnet.h:36:0,
                 from src/libnet_port_list.c:36:
/usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘u_char *’
src/libnet_port_list.c:271:5: warning: pointer targets in passing argument 1 of ‘__strdup’ differ in signedness [-Wpointer-sign]
In file included from /usr/include/string.h:637:0,
                 from src/../include/libnet.h:36,
                 from src/libnet_port_list.c:36:
/usr/include/x86_64-linux-gnu/bits/string2.h:1303:14: note: expected ‘const char *’ but argument is of type ‘u_char *’
src/libnet_port_list.c:271:5: warning: pointer targets in return differ in signedness [-Wpointer-sign]
ar -cr lib/libnet.a src/libnet_resolve.o src/libnet_socket.o src/libnet_checksum.o src/libnet_prand.o src/libnet_version.o src/libnet_write_ip.o src/libnet_insert_ipo.o src/libnet_insert_tcpo.o src/libnet_error.o src/libnet_link_sockpacket.o src/libnet_packet_mem.o src/libnet_build_ip.o src/libnet_build_tcp.o src/libnet_build_udp.o src/libnet_build_arp.o src/libnet_build_ethernet.o src/libnet_build_icmp.o src/libnet_build_igmp.o src/libnet_build_dns.o src/libnet_build_snmp.o src/libnet_build_rip.o src/libnet_build_ospf.o src/libnet_build_vrrp.o src/libnet_asn1.o src/libnet_hex_dump.o src/libnet_if_addr.o src/libnet_port_list.o
ranlib lib/libnet.a
ar -cr lib/libnet.a src/libnet_resolve.o src/libnet_socket.o src/libnet_checksum.o src/libnet_prand.o src/libnet_version.o src/libnet_write_ip.o src/libnet_insert_ipo.o src/libnet_insert_tcpo.o src/libnet_error.o src/libnet_link_sockpacket.o src/libnet_packet_mem.o src/libnet_build_ip.o src/libnet_build_tcp.o src/libnet_build_udp.o src/libnet_build_arp.o src/libnet_build_ethernet.o src/libnet_build_icmp.o src/libnet_build_igmp.o src/libnet_build_dns.o src/libnet_build_snmp.o src/libnet_build_rip.o src/libnet_build_ospf.o src/libnet_build_vrrp.o src/libnet_asn1.o src/libnet_hex_dump.o src/libnet_if_addr.o src/libnet_port_list.o
ranlib lib/libnet.a
./ensure-dir.sh /usr 755
./ensure-dir.sh /usr/lib/ 755
./ensure-dir.sh /usr/include/libnet 755
./ensure-dir.sh /usr/include/ 755
./ensure-dir.sh  755
chmod: falta un operando después de «755»
Pruebe `chmod --help' para más información.
./ensure-dir.sh /usr/bin/ 755
./install-sh lib/libnet.a /usr/lib/
rm -f /usr/lib/libpwrite.a
cd /usr/lib/; ln -f -s libnet.a libpwrite.a
./install-sh include/libnet.h /usr/include/
./install-sh include/libnet/libnet-headers.h /usr/include/libnet
./install-sh include/libnet/libnet-functions.h /usr/include/libnet
./install-sh include/libnet/libnet-structures.h /usr/include/libnet
./install-sh include/libnet/libnet-macros.h /usr/include/libnet
./install-sh include/libnet/libnet-asn1.h /usr/include/libnet
./install-sh include/libnet/libnet-ospf.h /usr/include/libnet
./install-sh doc/libnet.3
install: no destination specified
make: *** [install] Error 1

El comando tendría que ser:

Código: [Seleccionar]
./configure --with-libnet-includes=/usr/local/src/Libnet-1.0.2a/include --with-libnet-libraries=/usr/local/src/Libnet-1.0.2a/lib

Sólo asegúrate que la ruta a libnet-1.0.2a es la correcta...
Sí la ruta es correcta y pongo lo que tu has escrito y me da esta salida de error :
Código: [Seleccionar]
./configure --with-libnet-includes=/usr/local/src/Libnet-1.0.2a/include --with-libnet-libraries=/usr/local/src/Libnet-1.0.2a/lib
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... none
checking for gcc option to accept ANSI C... none needed
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) none
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking whether gcc needs -traditional... no
checking for an ANSI C-conforming const... yes
checking for gawk... (cached) gawk
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for fabs in -lm... yes
checking for inet_ntoa in -lnsl... yes
checking for socket in -lsocket... no
checking for hstrerror in -lresolv... yes
checking for libnet_build_ip in -lnet... yes
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for unistd.h... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking for strings.h... (cached) yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking machine/endian.h usability... no
checking machine/endian.h presence... no
checking for machine/endian.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking libnet.h usability... no
checking libnet.h presence... no
checking for libnet.h... no

   ERROR!  Libnet header not found, go get it from
   http://www.packetfactory.net/projects/libnet/
   or use the --with-libnet-* options, if you have it installed
   in unusual place
:cry:
Pen

Desconectado shicefgo

  • Member
  • ***
  • Mensajes: 166
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #12 en: 10 de Junio de 2013, 10:52:21 am »
Prueba lo siguiente:

Entra en el directorio donde tengas libnet (según parece /usr/local/src/Libnet-1.0.2a) y compila e instala normalmente.

Una vez instalada libnet, comprueba que en ese mismo directorio existe un archivo llamado libnet-config. Cópialo a /usr/local/bin y comprueba que tenga permiso de ejecución. Ahora vuelve a intentar compilar e instalar nemesis,  sin añadirle parámetros al configure, a ver si hay suerte.

Saludos.

Desconectado Pengüin

  • Member
  • ***
  • Mensajes: 242
  • www.daboweb.com
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #13 en: 11 de Junio de 2013, 07:23:32 pm »
Prueba lo siguiente:

Entra en el directorio donde tengas libnet (según parece /usr/local/src/Libnet-1.0.2a) y compila e instala normalmente.

Una vez instalada libnet, comprueba que en ese mismo directorio existe un archivo llamado libnet-config. Cópialo a /usr/local/bin y comprueba que tenga permiso de ejecución. Ahora vuelve a intentar compilar e instalar nemesis,  sin añadirle parámetros al configure, a ver si hay suerte.

Saludos.
He seguidos todos tus pasos y me devuelve : :cry:
Código: [Seleccionar]
./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... none
checking for gcc option to accept ANSI C... none needed
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) none
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking whether gcc needs -traditional... no
checking for an ANSI C-conforming const... yes
checking for gawk... (cached) gawk
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for fabs in -lm... yes
checking for inet_ntoa in -lnsl... yes
checking for socket in -lsocket... no
checking for hstrerror in -lresolv... yes
checking for libnet_build_ip in -lnet... no

   ERROR!  Libnet library not found, go get it from
   http://www.packetfactory.net/projects/libnet/
   or use the --with-libnet-* options, if you have it installed
   in unusual place
Nada que se resiste y no quiere , ¿qué otras opciones quedan?. :-o
Pen

Desconectado shicefgo

  • Member
  • ***
  • Mensajes: 166
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #14 en: 12 de Junio de 2013, 12:29:28 am »
Bueno, es que me ha picado la curiosidad de que las opciones del configure no funcionen y me he bajado los fuentes de los dos paquetes: libnet y nemesis.

El configure.in de nemesis utiliza el shell-script libnet-config para obtener algunos flags a pasar al compilador. Las opciones del configure «--with-libnet-include» y «--with-libnet-libraries» parece, a simple vista y sin profundizar, que estén ahí más para dar el pego que para otra cosa.

Así que he compilado e instalado libnet con ./configure, a continuación make y por último y ya como root make install. Esto ha situado el archivo de cabecera libnet.h directamente en /usr/include y el resto en /usr/include/libnet. El binario libnet.a se copia a /usr/lib. También he abierto libnet.h para ver si había algún error y todo está correcto, en él se incluyen los demás archivos de cabecera de /usr/include/libnet.

El archivo configure.in de nemesis hace uso del script libnet-config, por lo que éste debe estar instalado en el path y tener permisos de ejecución para todo el mundo. Cuando hice ./configure en nemesis, una vez correctamente instalada libnet, sin haber copiado libnet-config al path (/usr/local/bin o /usr/bin), me daba el mismo error que a tí, pero una vez copiado ese script a su sitio el ./configure no me ha dado ningún error.

Pero ayer tenía prisa y no compilé. Hoy he intentado compilar nemesis (con make) y ahí si que hay un error «chungo» (al menos con mi compilador gcc versión 4.7.3):
Código: [Seleccionar]
fgo@yoda:~/tmp/nemesis/nemesis-1.4$ make
make  all-recursive
make[1]: se ingresa al directorio `/home/fgo/tmp/nemesis/nemesis-1.4'
Making all in src
make[2]: se ingresa al directorio `/home/fgo/tmp/nemesis/nemesis-1.4/src'
gcc -DHAVE_CONFIG_H -I. -I..   -DLIBNET_LIL_ENDIAN -I/usr/local/include -I/sw/include  -g -O2 -Wall -funroll-loops -pipe -c nemesis-functions.c
nemesis-functions.c: In function ‘nemesis_check_link’:
nemesis-functions.c:342:36: error: dereferencing pointer to incomplete type
make[2]: *** [nemesis-functions.o] Error 1
make[2]: se sale del directorio `/home/fgo/tmp/nemesis/nemesis-1.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: se sale del directorio `/home/fgo/tmp/nemesis/nemesis-1.4'
make: *** [all] Error 2

Te pego también la salida del ./configure para que compruebes que yo no he obtenido errores haciéndolo como te he descrito:
Código: [Seleccionar]
fgo@yoda:~/tmp/nemesis/nemesis-1.4$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/fgo/tmp/nemesis/nemesis-1.4/missing: Unknown `--is-lightweight' option
Try `/home/fgo/tmp/nemesis/nemesis-1.4/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... none
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) none
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking for an ANSI C-conforming const... yes
checking for gawk... (cached) gawk
checking whether ln -s works... yes
checking for fabs in -lm... yes
checking for inet_ntoa in -lnsl... yes
checking for socket in -lsocket... no
checking for hstrerror in -lresolv... yes
checking for libnet_build_ip in -lnet... yes
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for unistd.h... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking for strings.h... (cached) yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking machine/endian.h usability... no
checking machine/endian.h presence... no
checking for machine/endian.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking libnet.h usability... yes
checking libnet.h presence... yes
checking for libnet.h... yes
checking for libnet version 1.0.2a... yes
checking for u_int8_t... yes
checking for u_int16_t... yes
checking for u_int32_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for gethostbyname... yes
checking for gettimeofday... yes
checking for inet_ntoa... yes
checking for isascii... yes
checking for working memcmp... yes
checking for memset... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strrchr... yes
checking for strtoul... yes
checking for getopt... yes
checking for inet_aton... yes
checking for strlcat... no
checking for strlcpy... no
checking for strsep... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating man/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
fgo@yoda:~/tmp/nemesis/nemesis-1.4$

El error de compilación lo da la línea nº 342 del archivo src/nemesis-functions.c en la posicón 36. Pego el código de la función que contiene esa línea:
Código: [Seleccionar]
/**
 * Determine if a source Ethernet address has been specified and fill in the
 * ETHERhdr structure if necessary.
 *
 * @param eth ETHERhdr pointer containing the source Ethernet address
 * @param device char pointer containing the Ethernet device name
 *
 * @return 0 on sucess, -1 on failure
 */
int nemesis_check_link(ETHERhdr *eth, char *device)
{
    int i;
    struct ether_addr *e = NULL;
    struct libnet_link_int l2;

    memset(&l2, 0, sizeof(struct libnet_link_int));
#ifdef DEBUG
    printf("DEBUG: determining if device %s\n       has a hardware address "
            "assigned.\n", device);
#endif
    if (!memcmp(eth->ether_shost, zero, 6))
    {
        memset(&l2, 0, sizeof(l2));
        if ((e = libnet_get_hwaddr(&l2, device, errbuf)) == NULL)  /* Posible origen el error */
            return -1;

        for (i = 0; i < 6; i++)
            eth->ether_shost[i] = e->ether_addr_octet[i];  /* Línea 342 */

        return 0;
    }
    else
        return 0;
}

El tipo de error viene a ser que un puntero no está correctamente desreferenciado (más o menos mal traducido). El puntero en cuestión es la variable 'e' que apunta (valga la redundancia) a una estructura de tipo ether_addr. Este error puede ser debido a la versión de mi compilador (estoy en Debian Sid), ya que gcc ha ido evolucionando hacia un control cada vez más estricto de los tipos de las variables.

El origen del error podría estar en el valor devuelto por la función libnet_get_hwaddr(&l2, device, errbuf), como indico en un comentario en el código de arriba, pero esto ya es cosa de andar trasteando el código, o «hackeando», en el sentido auténtico del término.

Esa función rellena los datos de una determinada estructura si ha sido especificada una dirección ethernet.  Si consigues llegar al mismo punto que yo, y obtienes también el mismo error de compilación, puedes optar por un horrororosísimo parche haciendo que esa función devuelva un '-1', como si el resultado del intento de obtener un valor para 'e' hubiera sido nulo, y a ver qué pasa :???:. También puedes optar por que devuelva '0', como si todo hubiera ido bien, depende de la influencia que pueda tener en el resultado. Pero yo voto por -1 y que haya suerte.

Código: [Seleccionar]
/**
 * Determine if a source Ethernet address has been specified and fill in the
 * ETHERhdr structure if necessary.
 *
 * @param eth ETHERhdr pointer containing the source Ethernet address
 * @param device char pointer containing the Ethernet device name
 *
 * @return 0 on sucess, -1 on failure
 */
int nemesis_check_link(ETHERhdr *eth, char *device)
{
  return -1;
}


Pues nada, «peazo tostón que m'aquedao», qué le vamos a hacer.  :ciego:

Saludos.

Desconectado Pengüin

  • Member
  • ***
  • Mensajes: 242
  • www.daboweb.com
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #15 en: 12 de Junio de 2013, 07:26:12 pm »
Gracias por vuestra paciencia , shicefgo no entiendo en lo último que posteas que devo hacer estoy confusa , no se cómo empezar o que editar. :cry:
Pen

Desconectado shicefgo

  • Member
  • ***
  • Mensajes: 166
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #16 en: 12 de Junio de 2013, 08:02:05 pm »
En ese post hay muchas cosas, vuelve a leerlo despacio, que en él detallo todo lo que he hecho hasta poner en marcha al nemesis ese. Funciona, pero supongo que las opciones relacionadas con la dirección ethernet no irán bien.

Resumiendo:

Instala libnet.
Copia el script libnet-config a /usr/local/bin o /usr/bin.
Y ya deberías poder ejecutar el ./configure de nemesis sin que te de errores relacionados con libnet.

Si al compilar obtienes el mismo error que yo, ya podremos volver sobre el asunto, pero lo primero es instalar libnet y conseguir que el configure de nemesis no de errores.

Ah, las autotools... no en vano hay que gente que dice que deberían llamarse autohell (autoinfierno)  :cry:

Yo también me he pasado ya a CMake ;)

Saludos.

Desconectado Mr_X

  • Moderadores
  • ******
  • Mensajes: 2635
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #17 en: 12 de Junio de 2013, 08:17:11 pm »
Parece que libnet tiene errores, además de que nemesis no compila por defecto en la arquitectura x86_64. Revisa este mensaje en otro foro...
"... I'll wait I sow the seed, I set the scene and I watch the world go by..."

Desconectado shicefgo

  • Member
  • ***
  • Mensajes: 166
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #18 en: 13 de Junio de 2013, 10:11:54 am »
Pero es que yo he instalado libnet sin problemas, y con el parche asqueroso ese que devuelve -1, he echado a andar nemesis. Los fuentes los he descargado a partir de los enlaces que ha puesto Pengüin.

He aquí la salida de un src/nemesis efectuado desde dentro la carpeta nemesis-1.4:

Código: [Seleccionar]
fgo@yoda:~/tmp/nemesis/nemesis-1.4$ src/nemesis

NEMESIS -=- The NEMESIS Project Version 1.4 (Build 26)

NEMESIS Usage:
  src/nemesis [mode] [options]

NEMESIS modes:
  arp
  dns
  ethernet
  icmp
  igmp
  ip
  ospf (currently non-functional)
  rip
  tcp
  udp

NEMESIS options:
  To display options, specify a mode with the option "help".

Y cuando, como  root, hago: src/nemesis ip me dice:
Código: [Seleccionar]
IP Packet Injected

O sea, que algo hace...

Visto esto, me da por pensar que el problema con libnet puede ser debido a las «autoinfierno» y no a la librería en sí misma, y ya que lo mencionas, también es posible que el problema de compilación que he obtenido sea debido a la antigüedad del paquete y a que mi arquitectura es de 64 bits. Pero vamos, que se instala una máquina virtual de 32 bits y se hacen pruebas. (Aunque yo no estoy muy por la labor de andar perdiendo mucho más tiempo con esto).

Ah, una cosa más por si acaso: Instalar las autotools (paquetes autoconf y automake) y hacer un autoreconf previo al ./configure. Es que estuve trasteando en el configure.in de nemesis (al final lo dejé como estaba) y cuando se toca ahí hay que reconfigurar, y tal vez eso haya influido en mi resultado...

Saludos.

Desconectado Pengüin

  • Member
  • ***
  • Mensajes: 242
  • www.daboweb.com
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #19 en: 16 de Junio de 2013, 07:48:26 pm »
Parece que libnet tiene errores, además de que nemesis no compila por defecto en la arquitectura x86_64. Revisa este mensaje en otro foro...
Uso :
Código: [Seleccionar]
Edit "/usr/include/libnet/libnet-headers.h" file (use your specific location) and change:
Code:
#if (!__GLIBC__)
struct ether_addr
{
    u_char  ether_addr_octet[6];
};
#endif

to
Code:
//#if (!__GLIBC__)
struct ether_addr
{
    u_char  ether_addr_octet[6];
};
//#endif
Y me compila pero sólo ./configure :

Código: [Seleccionar]
./configure --with-libnet-includes=/usr/local/src/Libnet-1.0.2a/include --with-libnet-libraries=/usr/local/src/Libnet-1.0.2a/lib
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... none
checking for gcc option to accept ANSI C... none needed
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) none
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking whether gcc needs -traditional... no
checking for an ANSI C-conforming const... yes
checking for gawk... (cached) gawk
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for fabs in -lm... yes
checking for inet_ntoa in -lnsl... yes
checking for socket in -lsocket... no
checking for hstrerror in -lresolv... yes
checking for libnet_build_ip in -lnet... yes
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for unistd.h... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking for strings.h... (cached) yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking machine/endian.h usability... no
checking machine/endian.h presence... no
checking for machine/endian.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking libnet.h usability... yes
checking libnet.h presence... yes
checking for libnet.h... yes
checking for libnet version 1.0.2a... yes
checking for u_int8_t... yes
checking for u_int16_t... yes
checking for u_int32_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for gethostbyname... yes
checking for gettimeofday... yes
checking for inet_ntoa... yes
checking for isascii... yes
checking for working memcmp... yes
checking for memset... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strrchr... yes
checking for strtoul... yes
checking for getopt... yes
checking for inet_aton... yes
checking for strlcat... no
checking for strlcpy... no
checking for strsep... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating man/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
Pero a la hora de hacer make falla :

Código: [Seleccionar]
make

make  all-recursive
make[1]: se ingresa al directorio `/home/Eva/Escritorio/nemesis-1.4'
Making all in src
make[2]: se ingresa al directorio `/home/Eva/Escritorio/nemesis-1.4/src'
gcc -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/local/src/Libnet-1.0.2a/include -DLIBNET_LIL_ENDIAN -I/usr/local/include -I/sw/include  -g -O2 -Wall -funroll-loops -pipe -c `test -f 'nemesis-functions.c' || echo './'`nemesis-functions.c
In file included from nemesis-functions.c:48:0:
/usr/local/src/Libnet-1.0.2a/include/libnet.h:87:8: warning: missing terminating " character [enabled by default]
/usr/local/src/Libnet-1.0.2a/include/libnet.h:89:50: warning: missing terminating " character [enabled by default]
nemesis-functions.c: In function ‘nemesis_check_link’:
nemesis-functions.c:342:36: error: dereferencing pointer to incomplete type
make[2]: *** [nemesis-functions.o] Error 1
make[2]: se sale del directorio `/home/Eva/Escritorio/nemesis-1.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: se sale del directorio `/home/Eva/Escritorio/nemesis-1.4'
make: *** [all] Error 2
¿Qué puedo seguir haciendo?. :-o :cry:
Pen

 

Aviso Legal | Política de Privacidad | Política de Cookies

el contenido de la web se rige bajo licencia
Creative Commons License