Comments (8)
Also by commenting out the usage I was able to reduce the binary by 20 KB!
from arp-scan.
Something like this: https://gist.github.com/cirocosta/e61e52cc6afe2633500b
from arp-scan.
I did fix some stuff over at https://github.com/nihilus/arp-scan
from arp-scan.
You can easily look at the changes related to the hashmap. However I am not sur how this handles dupes.
from arp-scan.
I'll look at using the hcreate(), hsearch() and hdestroy() posix functions instead of the hash table implementation that I borrowed from gas. The main thing I need to check is that these functions are available on all platforms that arp-scan is used on. That is basically the various flavours of Linux and BSD, as Solaris is not used as much as it used to be.
I'm interested in the reasons behind the changes you've made. I see that you've slimmed things down a lot - is this to reduce the memory footprint of the resulting executable?
from arp-scan.
@royhills yeah, a footprint of 350kb (MIPS32r2 ISA) when statically linked aginst plain libpcap is undesirable on an embedded Linux system so I figured out I better forked it off and tailored it after my needs.
Contrary to the reentrant hashmap functions (e.g. hsearch_r()) my changes were made to work on OS X.
from arp-scan.
I've implemented your suggestion, and it seems to work fine: it builds and passes checks on Linux (Debian Jessie), FreeBSD 10.2 and Solaris 10 u11, all on x86_64 architecture. I'll check out the other popular systems when I get time.
If you know you'll always be running on Linux, and never BSD or Solaris, you could reduce your footprint a bit by removing link-bpf and link-dlpi and just keeping link-packet-socket. You could also remove the configure.ac logic that chooses between the various link layer implementations to obtain the MAC address.
from arp-scan.
The new version also works on FreeBSD 9.3, NetBSD 6.0.1 and NetBSD 7.0.1. So I suspect it's pretty portable. I'm closing this issue now, as I believe it is resolved.
from arp-scan.
Related Issues (20)
- get-oui from Fedora package arp-scan-1.9.7-7.fc37 fails with unhelpful message due to unmet dependency HOT 1
- Show MAC in arp-fingerprint HOT 6
- arp-scan does not look in /usr/share/arp-scan if trying to open ieee-oui.txt failes with EACCESS HOT 15
- Binary packaging status for version 1.10.0 HOT 2
- Potential memory leak in arp-scan/arp-scan.c HOT 2
- Command Line Argument for turning off Promiscuous Mode HOT 7
- Feature Request: Output options: Add sorting HOT 6
- "Target list from interface network X netmask Y" is displayed with --plain option HOT 1
- Parallel arp-scan missing devices HOT 2
- Will this reposity be moved to cmake? HOT 2
- how to update `ieee-oui.txt` on macOS? HOT 3
- Add windows support
- Find portable function to get interface MAC address
- Add support for Cisco ISL VLANs in addition to 802.1Q HOT 1
- many hosts respond to single arp packet HOT 4
- Duplicate ARP responses from Intel Wi-Fi 6E AX211 on Windows 11 HOT 1
- Change release tags from lightweight to annotated
- Doesn't work on WSl2 NAT network mode HOT 1
- Speed up on single mac target HOT 2
- file permission denied 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 arp-scan.