This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
jan
/
addresslog
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
First commit, base version A OK
master
jan
2 years ago
commit
79f9dd6961
3 changed files
with
14 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-0
ReadMe.md
+1
-0
addresslog_data.csv
+10
-0
addresslog_script.sh
+ 3
- 0
ReadMe.md
View File
@ -0,0 +1,3 @@
# addresslog
Very basic ```sh``` script to log your IP into a csv file.
+ 1
- 0
addresslog_data.csv
View File
@ -0,0 +1 @@
datetime(iso8601),hostname,IPv4,IPv6
+ 10
- 0
addresslog_script.sh
View File
@ -0,0 +1,10 @@
#!/bin/sh
# Define vars
AL_CSV
=
"addresslog_data.csv"
AL_DATE
=
$(
date -u +
"%Y-%m-%dT%H:%M:%SZ"
)
AL_IPv4
=
$(
curl -4s ifconfig.co
)
AL_IPv6
=
$(
curl -6s ifconfig.co
)
printf
"
$AL_DATE
,
$(
hostname
)
,
$AL_IPv4
,
$AL_IPv6
\n
"
>>
$AL_CSV
Write
Preview
Loading…
Cancel
Save