17 lines
412 B
Python
17 lines
412 B
Python
#!/usr/bin/env python3
|
|
import sys
|
|
import NetLib
|
|
|
|
def get_ip_address(*args):
|
|
try:
|
|
# Llama a ogGetIpAddress desde NetLib y captura el resultado
|
|
result = NetLib.ogGetIpAddress(*args)
|
|
print(result.strip())
|
|
except Exception as e:
|
|
print(f"Error ejecutando ogGetIpAddress: {e}", file=sys.stderr)
|
|
sys.exit(1)
|
|
|
|
if __name__ == "__main__":
|
|
get_ip_address(*sys.argv[1:])
|
|
|