Comments (7)
You need to run it as root. Have you tried that?
On Oct 31, 2014 7:15 PM, "Diogo Mónica" [email protected] wrote:
Im on a Macbook Pro running 10.9.5.
Compiling the latest version from github (master):
$ g++ traceroute.cpp -o traceroute -O3 -std=c++11 -lpthread -ltins
Running with any IPs:
$ ./traceroute 10.0.1.1
libc++abi.dylib: terminating
Abort trap: 6—
Reply to this email directly or view it on GitHub
#42.
from libtins.
I haven't tried that, but if I've been able run the example above that also
creates a packet from scratch without root privileges, why would trac route
require it?! Is it because we changing the TTL field?!
On Fri, Oct 31, 2014 at 8:34 PM Matias Fontanini [email protected]
wrote:
You need to run it as root. Have you tried that?
On Oct 31, 2014 7:15 PM, "Diogo Mónica" [email protected] wrote:Im on a Macbook Pro running 10.9.5.
Compiling the latest version from github (master):
$ g++ traceroute.cpp -o traceroute -O3 -std=c++11 -lpthread -ltins
Running with any IPs:
$ ./traceroute 10.0.1.1
libc++abi.dylib: terminating
Abort trap: 6—
Reply to this email directly or view it on GitHub
#42.—
Reply to this email directly or view it on GitHub
#42 (comment).
from libtins.
You need root to send an receive raw packets. Just like you implicitly need
root to run ping or traceroute (implicitly because they're both SUID
binaries).
On Oct 31, 2014 8:37 PM, "Diogo Mónica" [email protected] wrote:
I haven't tried that, but if I've been able run the example above that
also
creates a packet from scratch without root privileges, why would trac
route
require it?! Is it because we changing the TTL field?!
On Fri, Oct 31, 2014 at 8:34 PM Matias Fontanini [email protected]wrote:
You need to run it as root. Have you tried that?
On Oct 31, 2014 7:15 PM, "Diogo Mónica" [email protected]
wrote:Im on a Macbook Pro running 10.9.5.
Compiling the latest version from github (master):
$ g++ traceroute.cpp -o traceroute -O3 -std=c++11 -lpthread -ltins
Running with any IPs:
$ ./traceroute 10.0.1.1
libc++abi.dylib: terminating
Abort trap: 6—
Reply to this email directly or view it on GitHub
#42.—
Reply to this email directly or view it on GitHub
#42 (comment).—
Reply to this email directly or view it on GitHub
#42 (comment).
from libtins.
Traceroute does work with sudo, sorry for not checking that first.
I guess my question still maintains though, why can I run this program without root:
using namespace Tins;
int main() {
NetworkInterface iface = NetworkInterface::default_interface();
NetworkInterface::Info info = iface.addresses();
EthernetII eth("77:22:33:11:ad:ad", info.hw_addr);
eth /= IP("192.168.0.1", info.ip_addr);
eth /= TCP(13, 15);
eth /= RawPDU("I'm a payload!");
PacketSender sender;
sender.send(eth, iface);
}
Isn't this a raw packet too?
from libtins.
Hi
I'm no expert and I haven't used PacketSender, but the raw packet is
wrapped into an IP/TCP header, so it is no longer a raw packet - it's just
a payload.
Cheers
Einar Jón
On 2 November 2014 00:33, Diogo Mónica [email protected] wrote:
Traceroute does work with sudo, sorry for not checking that first.
I guess my question still maintains:
Why can I run this program without root:
using namespace Tins;
int main() {
NetworkInterface iface = NetworkInterface::default_interface();
NetworkInterface::Info info = iface.addresses();
EthernetII eth("77:22:33:11:ad:ad", info.hw_addr);
eth /= IP("192.168.0.1", info.ip_addr);
eth /= TCP(13, 15);
eth /= RawPDU("I'm a payload!");
PacketSender sender;
sender.send(eth, iface);
}Isn't this a raw packet too?
—
Reply to this email directly or view it on GitHub
#42 (comment).
Regards
Einar Jón
+36 30 31 43 665
from libtins.
I've just tested that and I'm surprised that it works. I'm not very used to OSX, so I don't really know which permissions you would need to do this, but you shouldn't be able to use it without root. That won't work on Linux for sure.
from libtins.
Agreed, that is exactly what threw me off. Thank you Matias.
from libtins.
Related Issues (20)
- Consider using modern CMake (>=3.12) with targets
- Unable to compile Libtins for AIX
- how to call the Stream::user_data() to set and get the custom data ? HOT 1
- IPv6Address::to_string() return a local address HOT 1
- Error: live packet capture not supported on this system
- libtins.so.4.5: cannot open shared object file: No such file or directory HOT 1
- libtins 4.4 conan recipe is conan2.0 incompatible HOT 1
- Multicast packet ( specifically fieldbus) is not parsed
- Tagging a new release / fixup release with GCC 13 patch HOT 1
- 'unresolved external symbol' in Visual Studio 2022 HOT 3
- add #496 in the release notes for v4.5
- Send SYN packet failed on Windows 10 HOT 8
- Any passthru example?
- [bug] UDP::matches_response() return 0 when no inner PDU is available
- How to get gateway? HOT 1
- matches_response() implementation for EthernetII / Dot3
- DataTracker::advance_sequence removes too much data
- Seeing "android ifaddr not supported" regardless of Android version HOT 1
- failures with gtest 1.13+ HOT 1
- wrong "enum OptionTypes" definition HOT 1
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 libtins.