Comments (5)
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.
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.
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.
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.
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)
- [GENERAL QUESTION] how to penetrate symmetric NATs
- Couldn't create privileged icmp/raw socket: Operation not permitted HOT 1
- Will this work behind a Carrier Grade NAT (CGNAT)
- What license is pwnat under? HOT 4
- it does not work on different networks.
- Does pwnat still work? HOT 7
- how much is the success rate of pwnat's hole punching In the case of stun only?
- What protocols does pwnat support? HOT 1
- manpage HOT 4
- Cross compiling for OpenWRT or generic mips
- segmentation fault HOT 3
- Failed to send ICMP packet: Invalid argument
- Unable to cross compile on Linux HOT 4
- Create 'obj' directory during make HOT 3
- A full guide for pwnat for establishing an ssh tunnel. HOT 1
- Not working under my ISP network HOT 1
- If I can use icmp package to send messages? HOT 2
- how we can build in Windows OS ?
- Wireguard?
- Rewrite in C# Unity and use it on andriod
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pwnat.