Skip to content

Commit

Permalink
Added public IP address.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alton committed Aug 18, 2018
1 parent 06805c7 commit 1efd60c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ifconfig/mac-ifconfigs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ def convert_netmask(mask)
data.each do |entry|
t << entry
end

# Grab public IP address
public_ip = `curl "https://api.ipify.org"`
t.add_separator
t.add_row ["Public IP Address", public_ip, "", "", ""]

end
table.title = "1337 H4x0Rz Mac OS Ifconfig Parser - Alton Johnson ([email protected])"
puts table

0 comments on commit 1efd60c

Please sign in to comment.