mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
fix modules
This commit is contained in:
12
jc/jc.py
12
jc/jc.py
@ -6,9 +6,9 @@ Main input module
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
import jc.parsers.ifconfig
|
from parsers import ifconfig
|
||||||
import jc.parsers.ls
|
from parsers import ls
|
||||||
import jc.parsers.netstat
|
from parsers import netstat
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
pretty = False
|
pretty = False
|
||||||
@ -27,11 +27,11 @@ def main():
|
|||||||
pretty = True
|
pretty = True
|
||||||
|
|
||||||
if arg == '--ifconfig':
|
if arg == '--ifconfig':
|
||||||
result = jc.parsers.ifconfig.parse(data)
|
result = ifconfig.parse(data)
|
||||||
elif arg == '--ls':
|
elif arg == '--ls':
|
||||||
result = jc.parsers.ls.parse(data)
|
result = ls.parse(data)
|
||||||
elif arg == '--netstat':
|
elif arg == '--netstat':
|
||||||
result = jc.parsers.netstat.parse(data)
|
result = netstat.parse(data)
|
||||||
|
|
||||||
# output resulting dictionary as json
|
# output resulting dictionary as json
|
||||||
if pretty:
|
if pretty:
|
||||||
|
Reference in New Issue
Block a user