Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/auser/macmap
A single method to provide a map of network interfaces to their corresponding ip addresses from ifconfig
https://github.com/auser/macmap
Last synced: 15 days ago
JSON representation
A single method to provide a map of network interfaces to their corresponding ip addresses from ifconfig
- Host: GitHub
- URL: https://github.com/auser/macmap
- Owner: auser
- License: mit
- Created: 2009-06-03T08:16:10.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2009-06-03T08:47:22.000Z (over 15 years ago)
- Last Synced: 2024-04-14T14:21:34.948Z (9 months ago)
- Language: Ruby
- Homepage:
- Size: 78.1 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- License: LICENSE
Awesome Lists containing this project
README
= macmap
Ever wanted to map your interface to an ip?
If you haven't, why not?
Alas, Macmap is here to help!
Usage is easy:
Macmap.map_iface_to_ip %x{ifconfig -a}
Or
require "rubygems"
require "popen3"
Open3.popen3('ifconfig -a') { |stdin, stdout, stderr| Macmap.map_iface_to_ip(stdout) }Try it! It's fun
== CopyrightCopyright (c) 2009 Ari Lerner. See LICENSE for details.