Git Product home page Git Product logo

Comments (5)

daimor avatar daimor commented on July 26, 2024

Using gcc 4.4.7 on CentOS 6.5 x86_64
Linux srv 2.6.32-358.18.1.el6.x86_64 #1 SMP Wed Aug 28 17:19:38 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

[root@srv pwnat-master]# make
gcc -Wall -Wshadow -Wpointer-arith -Wwrite-strings -D LINUX   -c -o socket.o socket.c
gcc -Wall -Wshadow -Wpointer-arith -Wwrite-strings -D LINUX   -c -o message.o message.c
gcc -Wall -Wshadow -Wpointer-arith -Wwrite-strings -D LINUX   -c -o strlcpy.o strlcpy.c
gcc -Wall -Wshadow -Wpointer-arith -Wwrite-strings -D LINUX   -c -o client.o client.c
gcc -Wall -Wshadow -Wpointer-arith -Wwrite-strings -D LINUX   -c -o packet.o packet.c
gcc -Wall -Wshadow -Wpointer-arith -Wwrite-strings -D LINUX   -c -o list.o list.c
gcc -Wall -Wshadow -Wpointer-arith -Wwrite-strings -D LINUX   -c -o destination.o destination.c
gcc -Wall -Wshadow -Wpointer-arith -Wwrite-strings -D LINUX   -c -o udpserver.o udpserver.c
gcc -Wall -Wshadow -Wpointer-arith -Wwrite-strings -D LINUX   -c -o udpclient.o udpclient.c
gcc -Wall -Wshadow -Wpointer-arith -Wwrite-strings -D LINUX -o pwnat pwnat.c socket.o message.o strlcpy.o client.o packet.o list.o destination.o udpserver.o udpclient.o
[root@srv pwnat-master]# ./pwnat -s
Segmentation fault (core dumped)
[root@srv pwnat-master]# gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)

from pwnat.

wolfwood avatar wolfwood commented on July 26, 2024

I am also experiencing a segfault at udpserver.c:186, stemming from gethostbyname (which the man page reports as obsolete) returning a null pointer on line 179.

I am running Gentoo linux with version 2.20 of libc

from pwnat.

wolfwood avatar wolfwood commented on July 26, 2024

gethostbyname is returning null and not setting errno. This turns out to be a sign that the DNS lookup is failing.

I fixed it by editing my /etc/hosts, adding hostname to the line:
'127.0.0.1 hostname localhost'

this is likely specific to gentoo, and this stack overflow suggests that gethostbyname is requiring a DNS configuration that is not needed in configurations like mine, using dhcp with no DNS server.
http://stackoverflow.com/questions/8106882/cant-obtain-local-ip-using-gethostbyname

from pwnat.

samyk avatar samyk commented on July 26, 2024

I'm accepting patches if anyone wants to take a stab! Not reproducing in my environment, haven't had a chance to take a look further.

from pwnat.

nestorwheelock avatar nestorwheelock commented on July 26, 2024

Has anyone taken a crack at this yet since 2015? I'm about to try to run a pwnat server on FBSD 12.

from pwnat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.