mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-23 00:29:59 +02:00
332
README.md
332
README.md
@ -61,6 +61,8 @@ To access the raw, pre-processed JSON, use the `-r` cli option or the `raw=True`
|
||||
|
||||
Schemas for each parser can be found in the [`docs/parsers`](https://github.com/kellyjonbrazil/jc/tree/master/docs/parsers) folder.
|
||||
|
||||
Release notes can be found [here](https://blog.kellybrazil.com/category/jc-news/).
|
||||
|
||||
For more information on the motivations for this project, please see my [blog post](https://blog.kellybrazil.com/2019/11/26/bringing-the-unix-philosophy-to-the-21st-century/).
|
||||
|
||||
## Installation
|
||||
@ -73,10 +75,6 @@ $ pip3 install --upgrade jc
|
||||
```
|
||||
COMMAND | jc PARSER [OPTIONS]
|
||||
```
|
||||
or
|
||||
```
|
||||
COMMAND | jc [OPTIONS] PARSER
|
||||
```
|
||||
Alternatively, the "magic" syntax can be used by prepending `jc` to the command to be converted. Options can be passed to `jc` immediately before the command is given. (Note: command aliases are not supported)
|
||||
```
|
||||
jc [OPTIONS] COMMAND
|
||||
@ -85,14 +83,18 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio
|
||||
|
||||
### Parsers
|
||||
- `--arp` enables the `arp` command parser
|
||||
- `--blkid` enables the `blkid` command parser
|
||||
- `--crontab` enables the `crontab` command and file parser
|
||||
- `--crontab-u` enables the `crontab` file parser with user support
|
||||
- `--csv` enables the CSV file parser
|
||||
- `--df` enables the `df` command parser
|
||||
- `--dig` enables the `dig` command parser
|
||||
- `--du` enables the `du` command parser
|
||||
- `--env` enables the `env` command parser
|
||||
- `--free` enables the `free` command parser
|
||||
- `--fstab` enables the `/etc/fstab` file parser
|
||||
- `--group` enables the `/etc/group` file parser
|
||||
- `--gshadow` enables the `/etc/gshadow` file parser
|
||||
- `--history` enables the `history` command parser
|
||||
- `--hosts` enables the `/etc/hosts` file parser
|
||||
- `--id` enables the `id` command parser
|
||||
@ -100,16 +102,19 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio
|
||||
- `--ini` enables the `INI` file parser
|
||||
- `--iptables` enables the `iptables` command parser
|
||||
- `--jobs` enables the `jobs` command parser
|
||||
- `--last` enables the `last` and `lastb` command parser
|
||||
- `--ls` enables the `ls` command parser
|
||||
- `--lsblk` enables the `lsblk` command parser
|
||||
- `--lsmod` enables the `lsmod` command parser
|
||||
- `--lsof` enables the `lsof` command parser
|
||||
- `--mount` enables the `mount` command parser
|
||||
- `--netstat` enables the `netstat` command parser
|
||||
- `--passwd` enables the `/etc/passwd` file parser
|
||||
- `--pip-list` enables the `pip list` command parser
|
||||
- `--pip-show` enables the `pip show` command parser
|
||||
- `--ps` enables the `ps` command parser
|
||||
- `--route` enables the `route` command parser
|
||||
- `--shadow` enables the `/etc/shadow` file parser
|
||||
- `--ss` enables the `ss` command parser
|
||||
- `--stat` enables the `stat` command parser
|
||||
- `--systemctl` enables the `systemctl` command parser
|
||||
@ -119,6 +124,7 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio
|
||||
- `--uname` enables the `uname -a` command parser
|
||||
- `--uptime` enables the `uptime` command parser
|
||||
- `--w` enables the `w` command parser
|
||||
- `--who` enables the `who` command parser
|
||||
- `--xml` enables the `XML` file parser
|
||||
- `--yaml` enables the `YAML` file parser
|
||||
|
||||
@ -209,6 +215,53 @@ $ arp -a | jc --arp -p # or: jc -p arp -a
|
||||
}
|
||||
]
|
||||
```
|
||||
### blkid
|
||||
```
|
||||
$ blkid | jc --blkid -p # or: jc -p blkid
|
||||
[
|
||||
{
|
||||
"device": "/dev/sda1",
|
||||
"uuid": "05d927ab-5875-49e4-ada1-7f46cb32c932",
|
||||
"type": "xfs"
|
||||
},
|
||||
{
|
||||
"device": "/dev/sda2",
|
||||
"uuid": "3klkIj-w1kk-DkJi-0XBJ-y3i7-i2Ac-vHqWBM",
|
||||
"type": "LVM2_member"
|
||||
},
|
||||
{
|
||||
"device": "/dev/mapper/centos-root",
|
||||
"uuid": "07d718ff-950c-4e5b-98f0-42a1147c77d9",
|
||||
"type": "xfs"
|
||||
},
|
||||
{
|
||||
"device": "/dev/mapper/centos-swap",
|
||||
"uuid": "615eb89a-bcbf-46fd-80e3-c483ff5c931f",
|
||||
"type": "swap"
|
||||
}
|
||||
]
|
||||
```
|
||||
```
|
||||
$ sudo blkid -o udev -ip /dev/sda2 | jc --blkid -p # or: sudo jc -p blkid -o udev -ip /dev/sda2
|
||||
[
|
||||
{
|
||||
"id_fs_uuid": "3klkIj-w1kk-DkJi-0XBJ-y3i7-i2Ac-vHqWBM",
|
||||
"id_fs_uuid_enc": "3klkIj-w1kk-DkJi-0XBJ-y3i7-i2Ac-vHqWBM",
|
||||
"id_fs_version": "LVM2\x20001",
|
||||
"id_fs_type": "LVM2_member",
|
||||
"id_fs_usage": "raid",
|
||||
"id_iolimit_minimum_io_size": 512,
|
||||
"id_iolimit_physical_sector_size": 512,
|
||||
"id_iolimit_logical_sector_size": 512,
|
||||
"id_part_entry_scheme": "dos",
|
||||
"id_part_entry_type": "0x8e",
|
||||
"id_part_entry_number": 2,
|
||||
"id_part_entry_offset": 2099200,
|
||||
"id_part_entry_size": 39843840,
|
||||
"id_part_entry_disk": "8:0"
|
||||
}
|
||||
]
|
||||
```
|
||||
### crontab
|
||||
```
|
||||
$ cat /etc/crontab | jc --crontab -p # or: jc -p crontab -l
|
||||
@ -356,6 +409,53 @@ $ cat /etc/crontab | jc --crontab-u -p
|
||||
]
|
||||
}
|
||||
```
|
||||
### CSV files
|
||||
```
|
||||
$ cat homes.csv
|
||||
"Sell", "List", "Living", "Rooms", "Beds", "Baths", "Age", "Acres", "Taxes"
|
||||
142, 160, 28, 10, 5, 3, 60, 0.28, 3167
|
||||
175, 180, 18, 8, 4, 1, 12, 0.43, 4033
|
||||
129, 132, 13, 6, 3, 1, 41, 0.33, 1471
|
||||
...
|
||||
|
||||
$ cat homes.csv | jc --csv -p
|
||||
[
|
||||
{
|
||||
"Sell": "142",
|
||||
"List": "160",
|
||||
"Living": "28",
|
||||
"Rooms": "10",
|
||||
"Beds": "5",
|
||||
"Baths": "3",
|
||||
"Age": "60",
|
||||
"Acres": "0.28",
|
||||
"Taxes": "3167"
|
||||
},
|
||||
{
|
||||
"Sell": "175",
|
||||
"List": "180",
|
||||
"Living": "18",
|
||||
"Rooms": "8",
|
||||
"Beds": "4",
|
||||
"Baths": "1",
|
||||
"Age": "12",
|
||||
"Acres": "0.43",
|
||||
"Taxes": "4033"
|
||||
},
|
||||
{
|
||||
"Sell": "129",
|
||||
"List": "132",
|
||||
"Living": "13",
|
||||
"Rooms": "6",
|
||||
"Beds": "3",
|
||||
"Baths": "1",
|
||||
"Age": "41",
|
||||
"Acres": "0.33",
|
||||
"Taxes": "1471"
|
||||
},
|
||||
...
|
||||
]
|
||||
```
|
||||
### df
|
||||
```
|
||||
$ df | jc --df -p # or: jc -p df
|
||||
@ -646,6 +746,68 @@ $ cat /etc/fstab | jc --fstab -p
|
||||
}
|
||||
]
|
||||
```
|
||||
### /etc/group file
|
||||
```
|
||||
$ cat /etc/group | jc --group -p
|
||||
[
|
||||
{
|
||||
"group_name": "nobody",
|
||||
"password": "*",
|
||||
"gid": -2,
|
||||
"members": []
|
||||
},
|
||||
{
|
||||
"group_name": "nogroup",
|
||||
"password": "*",
|
||||
"gid": -1,
|
||||
"members": []
|
||||
},
|
||||
{
|
||||
"group_name": "wheel",
|
||||
"password": "*",
|
||||
"gid": 0,
|
||||
"members": [
|
||||
"root"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_name": "certusers",
|
||||
"password": "*",
|
||||
"gid": 29,
|
||||
"members": [
|
||||
"root",
|
||||
"_jabber",
|
||||
"_postfix",
|
||||
"_cyrus",
|
||||
"_calendar",
|
||||
"_dovecot"
|
||||
]
|
||||
},
|
||||
...
|
||||
]
|
||||
```
|
||||
### /etc/gshadow file
|
||||
```
|
||||
$ cat /etc/gshadow | jc --gshadow -p
|
||||
[
|
||||
{
|
||||
"group_name": "root",
|
||||
"password": "*",
|
||||
"administrators": [],
|
||||
"members": []
|
||||
},
|
||||
{
|
||||
"group_name": "adm",
|
||||
"password": "*",
|
||||
"administrators": [],
|
||||
"members": [
|
||||
"syslog",
|
||||
"joeuser"
|
||||
]
|
||||
},
|
||||
...
|
||||
]
|
||||
```
|
||||
### history
|
||||
```
|
||||
$ history | jc --history -p
|
||||
@ -946,6 +1108,36 @@ $ jobs -l | jc --jobs -p # or: jc -p jobs
|
||||
}
|
||||
]
|
||||
```
|
||||
### last and lastb
|
||||
```
|
||||
$ last | jc --last -p # or: jc -p last
|
||||
[
|
||||
{
|
||||
"user": "joeuser",
|
||||
"tty": "ttys002",
|
||||
"hostname": null,
|
||||
"login": "Thu Feb 27 14:31",
|
||||
"logout": "still logged in"
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"tty": "ttys003",
|
||||
"hostname": null,
|
||||
"login": "Thu Feb 27 10:38",
|
||||
"logout": "10:38",
|
||||
"duration": "00:00"
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"tty": "ttys003",
|
||||
"hostname": null,
|
||||
"login": "Thu Feb 27 10:18",
|
||||
"logout": "10:18",
|
||||
"duration": "00:00"
|
||||
},
|
||||
...
|
||||
]
|
||||
```
|
||||
### ls
|
||||
```
|
||||
$ ls -l /usr/bin | jc --ls -p # or: jc -p ls -l /usr/bin
|
||||
@ -1292,6 +1484,40 @@ $ sudo netstat -apee | jc --netstat -p # or: sudo jc -p netstat -apee
|
||||
...
|
||||
]
|
||||
```
|
||||
### /etc/passwd file
|
||||
```
|
||||
$ cat /etc/passwd | jc --passwd -p
|
||||
[
|
||||
{
|
||||
"username": "nobody",
|
||||
"password": "*",
|
||||
"uid": -2,
|
||||
"gid": -2,
|
||||
"comment": "Unprivileged User",
|
||||
"home": "/var/empty",
|
||||
"shell": "/usr/bin/false"
|
||||
},
|
||||
{
|
||||
"username": "root",
|
||||
"password": "*",
|
||||
"uid": 0,
|
||||
"gid": 0,
|
||||
"comment": "System Administrator",
|
||||
"home": "/var/root",
|
||||
"shell": "/bin/sh"
|
||||
},
|
||||
{
|
||||
"username": "daemon",
|
||||
"password": "*",
|
||||
"uid": 1,
|
||||
"gid": 1,
|
||||
"comment": "System Services",
|
||||
"home": "/var/root",
|
||||
"shell": "/usr/bin/false"
|
||||
},
|
||||
...
|
||||
]
|
||||
```
|
||||
### pip list
|
||||
```
|
||||
$ pip list | jc --pip-list -p # or: jc -p pip list # or: jc -p pip3 list
|
||||
@ -1469,6 +1695,43 @@ $ route -ee | jc --route -p # or: jc -p route -ee
|
||||
}
|
||||
]
|
||||
```
|
||||
### /etc/shadow file
|
||||
```
|
||||
$ sudo cat /etc/shadow | jc --shadow -p
|
||||
[
|
||||
{
|
||||
"username": "root",
|
||||
"password": "*",
|
||||
"last_changed": 18113,
|
||||
"minimum": 0,
|
||||
"maximum": 99999,
|
||||
"warn": 7,
|
||||
"inactive": null,
|
||||
"expire": null
|
||||
},
|
||||
{
|
||||
"username": "daemon",
|
||||
"password": "*",
|
||||
"last_changed": 18113,
|
||||
"minimum": 0,
|
||||
"maximum": 99999,
|
||||
"warn": 7,
|
||||
"inactive": null,
|
||||
"expire": null
|
||||
},
|
||||
{
|
||||
"username": "bin",
|
||||
"password": "*",
|
||||
"last_changed": 18113,
|
||||
"minimum": 0,
|
||||
"maximum": 99999,
|
||||
"warn": 7,
|
||||
"inactive": null,
|
||||
"expire": null
|
||||
},
|
||||
...
|
||||
]
|
||||
```
|
||||
### ss
|
||||
```
|
||||
$ sudo ss -a | jc --ss -p # or: sudo jc -p ss -a
|
||||
@ -1790,6 +2053,67 @@ $ w | jc --w -p # or: jc -p w
|
||||
}
|
||||
]
|
||||
```
|
||||
### who
|
||||
```
|
||||
$ who | jc --who -p # or: jc -p who
|
||||
[
|
||||
{
|
||||
"user": "joeuser",
|
||||
"tty": "ttyS0",
|
||||
"time": "2020-03-02 02:52"
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"tty": "pts/0",
|
||||
"time": "2020-03-02 05:15",
|
||||
"from": "192.168.71.1"
|
||||
}
|
||||
]
|
||||
```
|
||||
```
|
||||
$ who -a | jc --who -p # or: jc -p who -a
|
||||
[
|
||||
{
|
||||
"event": "reboot",
|
||||
"time": "Feb 7 23:31",
|
||||
"pid": 1
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "-",
|
||||
"tty": "console",
|
||||
"time": "Feb 7 23:32",
|
||||
"idle": "old",
|
||||
"pid": 105
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "+",
|
||||
"tty": "ttys000",
|
||||
"time": "Feb 13 16:44",
|
||||
"idle": ".",
|
||||
"pid": 51217,
|
||||
"comment": "term=0 exit=0"
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "?",
|
||||
"tty": "ttys003",
|
||||
"time": "Feb 28 08:59",
|
||||
"idle": "01:36",
|
||||
"pid": 41402
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "+",
|
||||
"tty": "ttys004",
|
||||
"time": "Mar 1 16:35",
|
||||
"idle": ".",
|
||||
"pid": 15679,
|
||||
"from": "192.168.1.5"
|
||||
}
|
||||
]
|
||||
```
|
||||
### XML files
|
||||
```
|
||||
$ cat cd_catalog.xml
|
||||
|
@ -1,5 +1,15 @@
|
||||
jc changelog
|
||||
|
||||
20200303 v1.8.0
|
||||
- Added blkid command parser
|
||||
- Added last and lastb command parser
|
||||
- Added who command parser
|
||||
- Added CSV file parser
|
||||
- Added /etc/passwd file parser
|
||||
- Added /etc/shadow file parser
|
||||
- Added /etc/group file parser
|
||||
- Added /etc/gshadow file parser
|
||||
|
||||
20200227 v1.7.5
|
||||
- Updated ls parser to support filenames with newline characters
|
||||
|
||||
|
@ -5,14 +5,18 @@ cd jc
|
||||
pydocmd simple jc+ > ../docs/readme.md
|
||||
pydocmd simple utils+ > ../docs/utils.md
|
||||
pydocmd simple jc.parsers.arp+ > ../docs/parsers/arp.md
|
||||
pydocmd simple jc.parsers.blkid+ > ../docs/parsers/blkid.md
|
||||
pydocmd simple jc.parsers.crontab+ > ../docs/parsers/crontab.md
|
||||
pydocmd simple jc.parsers.crontab_u+ > ../docs/parsers/crontab_u.md
|
||||
pydocmd simple jc.parsers.csv+ > ../docs/parsers/csv.md
|
||||
pydocmd simple jc.parsers.df+ > ../docs/parsers/df.md
|
||||
pydocmd simple jc.parsers.dig+ > ../docs/parsers/dig.md
|
||||
pydocmd simple jc.parsers.du+ > ../docs/parsers/du.md
|
||||
pydocmd simple jc.parsers.env+ > ../docs/parsers/env.md
|
||||
pydocmd simple jc.parsers.free+ > ../docs/parsers/free.md
|
||||
pydocmd simple jc.parsers.fstab+ > ../docs/parsers/fstab.md
|
||||
pydocmd simple jc.parsers.group+ > ../docs/parsers/group.md
|
||||
pydocmd simple jc.parsers.gshadow+ > ../docs/parsers/gshadow.md
|
||||
pydocmd simple jc.parsers.history+ > ../docs/parsers/history.md
|
||||
pydocmd simple jc.parsers.hosts+ > ../docs/parsers/hosts.md
|
||||
pydocmd simple jc.parsers.id+ > ../docs/parsers/id.md
|
||||
@ -20,16 +24,19 @@ pydocmd simple jc.parsers.ifconfig+ > ../docs/parsers/ifconfig.md
|
||||
pydocmd simple jc.parsers.ini+ > ../docs/parsers/ini.md
|
||||
pydocmd simple jc.parsers.iptables+ > ../docs/parsers/iptables.md
|
||||
pydocmd simple jc.parsers.jobs+ > ../docs/parsers/jobs.md
|
||||
pydocmd simple jc.parsers.last+ > ../docs/parsers/last.md
|
||||
pydocmd simple jc.parsers.ls+ > ../docs/parsers/ls.md
|
||||
pydocmd simple jc.parsers.lsblk+ > ../docs/parsers/lsblk.md
|
||||
pydocmd simple jc.parsers.lsmod+ > ../docs/parsers/lsmod.md
|
||||
pydocmd simple jc.parsers.lsof+ > ../docs/parsers/lsof.md
|
||||
pydocmd simple jc.parsers.mount+ > ../docs/parsers/mount.md
|
||||
pydocmd simple jc.parsers.netstat+ > ../docs/parsers/netstat.md
|
||||
pydocmd simple jc.parsers.passwd+ > ../docs/parsers/passwd.md
|
||||
pydocmd simple jc.parsers.pip_list+ > ../docs/parsers/pip_list.md
|
||||
pydocmd simple jc.parsers.pip_show+ > ../docs/parsers/pip_show.md
|
||||
pydocmd simple jc.parsers.ps+ > ../docs/parsers/ps.md
|
||||
pydocmd simple jc.parsers.route+ > ../docs/parsers/route.md
|
||||
pydocmd simple jc.parsers.shadow+ > ../docs/parsers/shadow.md
|
||||
pydocmd simple jc.parsers.ss+ > ../docs/parsers/ss.md
|
||||
pydocmd simple jc.parsers.stat+ > ../docs/parsers/stat.md
|
||||
pydocmd simple jc.parsers.systemctl+ > ../docs/parsers/systemctl.md
|
||||
@ -39,5 +46,6 @@ pydocmd simple jc.parsers.systemctl_luf+ > ../docs/parsers/systemctl_luf.md
|
||||
pydocmd simple jc.parsers.uname+ > ../docs/parsers/uname.md
|
||||
pydocmd simple jc.parsers.uptime+ > ../docs/parsers/uptime.md
|
||||
pydocmd simple jc.parsers.w+ > ../docs/parsers/w.md
|
||||
pydocmd simple jc.parsers.who+ > ../docs/parsers/who.md
|
||||
pydocmd simple jc.parsers.xml+ > ../docs/parsers/xml.md
|
||||
pydocmd simple jc.parsers.yaml+ > ../docs/parsers/yaml.md
|
||||
|
148
docs/parsers/blkid.md
Normal file
148
docs/parsers/blkid.md
Normal file
@ -0,0 +1,148 @@
|
||||
# jc.parsers.blkid
|
||||
jc - JSON CLI output utility blkid Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --blkid as the first argument if the piped input is coming from blkid
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux'
|
||||
|
||||
Examples:
|
||||
|
||||
$ blkid | jc --blkid -p
|
||||
[
|
||||
{
|
||||
"device": "/dev/sda1",
|
||||
"uuid": "05d927ab-5875-49e4-ada1-7f46cb32c932",
|
||||
"type": "xfs"
|
||||
},
|
||||
{
|
||||
"device": "/dev/sda2",
|
||||
"uuid": "3klkIj-w1kk-DkJi-0XBJ-y3i7-i2Ac-vHqWBM",
|
||||
"type": "LVM2_member"
|
||||
},
|
||||
{
|
||||
"device": "/dev/mapper/centos-root",
|
||||
"uuid": "07d718ff-950c-4e5b-98f0-42a1147c77d9",
|
||||
"type": "xfs"
|
||||
},
|
||||
{
|
||||
"device": "/dev/mapper/centos-swap",
|
||||
"uuid": "615eb89a-bcbf-46fd-80e3-c483ff5c931f",
|
||||
"type": "swap"
|
||||
}
|
||||
]
|
||||
|
||||
$ sudo blkid -o udev -ip /dev/sda2 | jc --blkid -p
|
||||
[
|
||||
{
|
||||
"id_fs_uuid": "3klkIj-w1kk-DkJi-0XBJ-y3i7-i2Ac-vHqWBM",
|
||||
"id_fs_uuid_enc": "3klkIj-w1kk-DkJi-0XBJ-y3i7-i2Ac-vHqWBM",
|
||||
"id_fs_version": "LVM2\x20001",
|
||||
"id_fs_type": "LVM2_member",
|
||||
"id_fs_usage": "raid",
|
||||
"id_iolimit_minimum_io_size": 512,
|
||||
"id_iolimit_physical_sector_size": 512,
|
||||
"id_iolimit_logical_sector_size": 512,
|
||||
"id_part_entry_scheme": "dos",
|
||||
"id_part_entry_type": "0x8e",
|
||||
"id_part_entry_number": 2,
|
||||
"id_part_entry_offset": 2099200,
|
||||
"id_part_entry_size": 39843840,
|
||||
"id_part_entry_disk": "8:0"
|
||||
}
|
||||
]
|
||||
|
||||
$ sudo blkid -ip /dev/sda1 | jc --blkid -p -r
|
||||
[
|
||||
{
|
||||
"devname": "/dev/sda1",
|
||||
"uuid": "05d927bb-5875-49e3-ada1-7f46cb31c932",
|
||||
"type": "xfs",
|
||||
"usage": "filesystem",
|
||||
"minimum_io_size": "512",
|
||||
"physical_sector_size": "512",
|
||||
"logical_sector_size": "512",
|
||||
"part_entry_scheme": "dos",
|
||||
"part_entry_type": "0x83",
|
||||
"part_entry_flags": "0x80",
|
||||
"part_entry_number": "1",
|
||||
"part_entry_offset": "2048",
|
||||
"part_entry_size": "2097152",
|
||||
"part_entry_disk": "8:0"
|
||||
}
|
||||
]
|
||||
|
||||
## info
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"device": string,
|
||||
"uuid": string,
|
||||
"type": string,
|
||||
"usage": string,
|
||||
"part_entry_scheme": string,
|
||||
"part_entry_type": string,
|
||||
"part_entry_flags": string,
|
||||
"part_entry_number": integer,
|
||||
"part_entry_offset": integer,
|
||||
"part_entry_size": integer,
|
||||
"part_entry_disk": string,
|
||||
"id_fs_uuid": string,
|
||||
"id_fs_uuid_enc": string,
|
||||
"id_fs_version": string,
|
||||
"id_fs_type": string,
|
||||
"id_fs_usage": string,
|
||||
"id_part_entry_scheme": string,
|
||||
"id_part_entry_type": string,
|
||||
"id_part_entry_flags": string,
|
||||
"id_part_entry_number": integer,
|
||||
"id_part_entry_offset": integer,
|
||||
"id_part_entry_size": integer,
|
||||
"id_iolimit_minimum_io_size": integer,
|
||||
"id_iolimit_physical_sector_size": integer,
|
||||
"id_iolimit_logical_sector_size": integer,
|
||||
"id_part_entry_disk": string,
|
||||
"minimum_io_size": integer,
|
||||
"physical_sector_size": integer,
|
||||
"logical_sector_size": integer
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
|
105
docs/parsers/csv.md
Normal file
105
docs/parsers/csv.md
Normal file
@ -0,0 +1,105 @@
|
||||
# jc.parsers.csv
|
||||
jc - JSON CLI output utility csv Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --csv as the first argument if the piped input is coming from a csv file.
|
||||
the csv parser will attempt to automatically detect the delimiter character.
|
||||
if the delimiter cannot be detected it will default to comma.
|
||||
the first row of the file must be a header row.
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat homes.csv
|
||||
"Sell", "List", "Living", "Rooms", "Beds", "Baths", "Age", "Acres", "Taxes"
|
||||
142, 160, 28, 10, 5, 3, 60, 0.28, 3167
|
||||
175, 180, 18, 8, 4, 1, 12, 0.43, 4033
|
||||
129, 132, 13, 6, 3, 1, 41, 0.33, 1471
|
||||
...
|
||||
|
||||
$ cat homes.csv | jc --csv -p
|
||||
[
|
||||
{
|
||||
"Sell": "142",
|
||||
"List": "160",
|
||||
"Living": "28",
|
||||
"Rooms": "10",
|
||||
"Beds": "5",
|
||||
"Baths": "3",
|
||||
"Age": "60",
|
||||
"Acres": "0.28",
|
||||
"Taxes": "3167"
|
||||
},
|
||||
{
|
||||
"Sell": "175",
|
||||
"List": "180",
|
||||
"Living": "18",
|
||||
"Rooms": "8",
|
||||
"Beds": "4",
|
||||
"Baths": "1",
|
||||
"Age": "12",
|
||||
"Acres": "0.43",
|
||||
"Taxes": "4033"
|
||||
},
|
||||
{
|
||||
"Sell": "129",
|
||||
"List": "132",
|
||||
"Living": "13",
|
||||
"Rooms": "6",
|
||||
"Beds": "3",
|
||||
"Baths": "1",
|
||||
"Age": "41",
|
||||
"Acres": "0.33",
|
||||
"Taxes": "1471"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
## info
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Each dictionary represents a row in the csv file:
|
||||
|
||||
[
|
||||
{
|
||||
csv file converted to a Dictionary
|
||||
https://docs.python.org/3/library/csv.html
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
|
141
docs/parsers/group.md
Normal file
141
docs/parsers/group.md
Normal file
@ -0,0 +1,141 @@
|
||||
# jc.parsers.group
|
||||
jc - JSON CLI output utility /etc/group file Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --group as the first argument if the piped input is coming from /etc/group
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux', 'darwin', 'aix', 'freebsd'
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat /etc/group | jc --group -p
|
||||
[
|
||||
{
|
||||
"group_name": "nobody",
|
||||
"password": "*",
|
||||
"gid": -2,
|
||||
"members": []
|
||||
},
|
||||
{
|
||||
"group_name": "nogroup",
|
||||
"password": "*",
|
||||
"gid": -1,
|
||||
"members": []
|
||||
},
|
||||
{
|
||||
"group_name": "wheel",
|
||||
"password": "*",
|
||||
"gid": 0,
|
||||
"members": [
|
||||
"root"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_name": "certusers",
|
||||
"password": "*",
|
||||
"gid": 29,
|
||||
"members": [
|
||||
"root",
|
||||
"_jabber",
|
||||
"_postfix",
|
||||
"_cyrus",
|
||||
"_calendar",
|
||||
"_dovecot"
|
||||
]
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ cat /etc/group | jc --group -p -r
|
||||
[
|
||||
{
|
||||
"group_name": "nobody",
|
||||
"password": "*",
|
||||
"gid": "-2",
|
||||
"members": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_name": "nogroup",
|
||||
"password": "*",
|
||||
"gid": "-1",
|
||||
"members": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_name": "wheel",
|
||||
"password": "*",
|
||||
"gid": "0",
|
||||
"members": [
|
||||
"root"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_name": "certusers",
|
||||
"password": "*",
|
||||
"gid": "29",
|
||||
"members": [
|
||||
"root",
|
||||
"_jabber",
|
||||
"_postfix",
|
||||
"_cyrus",
|
||||
"_calendar",
|
||||
"_dovecot"
|
||||
]
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
## info
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"group_name": string,
|
||||
"password": string,
|
||||
"gid": integer,
|
||||
"members": [
|
||||
string
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
|
109
docs/parsers/gshadow.md
Normal file
109
docs/parsers/gshadow.md
Normal file
@ -0,0 +1,109 @@
|
||||
# jc.parsers.gshadow
|
||||
jc - JSON CLI output utility /etc/gshadow file Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --gshadow as the first argument if the piped input is coming from /etc/gshadow
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux', 'aix', 'freebsd'
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat /etc/gshadow | jc --gshadow -p
|
||||
[
|
||||
{
|
||||
"group_name": "root",
|
||||
"password": "*",
|
||||
"administrators": [],
|
||||
"members": []
|
||||
},
|
||||
{
|
||||
"group_name": "adm",
|
||||
"password": "*",
|
||||
"administrators": [],
|
||||
"members": [
|
||||
"syslog",
|
||||
"joeuser"
|
||||
]
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ cat /etc/gshadow | jc --gshadow -p -r
|
||||
[
|
||||
{
|
||||
"group_name": "root",
|
||||
"password": "*",
|
||||
"administrators": [
|
||||
""
|
||||
],
|
||||
"members": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_name": "adm",
|
||||
"password": "*",
|
||||
"administrators": [
|
||||
""
|
||||
],
|
||||
"members": [
|
||||
"syslog",
|
||||
"joeuser"
|
||||
]
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
## info
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"group_name": string,
|
||||
"password": string,
|
||||
"administrators": [
|
||||
string
|
||||
],
|
||||
"members": [
|
||||
string
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
|
118
docs/parsers/last.md
Normal file
118
docs/parsers/last.md
Normal file
@ -0,0 +1,118 @@
|
||||
# jc.parsers.last
|
||||
jc - JSON CLI output utility last Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --last as the first argument if the piped input is coming from last or lastb
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux', 'darwin', 'aix', 'freebsd'
|
||||
|
||||
Examples:
|
||||
|
||||
$ last | jc --last -p
|
||||
[
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys002",
|
||||
"hostname": null,
|
||||
"login": "Thu Feb 27 14:31",
|
||||
"logout": "still logged in"
|
||||
},
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys003",
|
||||
"hostname": null,
|
||||
"login": "Thu Feb 27 10:38",
|
||||
"logout": "10:38",
|
||||
"duration": "00:00"
|
||||
},
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys003",
|
||||
"hostname": null,
|
||||
"login": "Thu Feb 27 10:18",
|
||||
"logout": "10:18",
|
||||
"duration": "00:00"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ last | jc --last -p -r
|
||||
[
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys002",
|
||||
"hostname": "-",
|
||||
"login": "Thu Feb 27 14:31",
|
||||
"logout": "still_logged_in"
|
||||
},
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys003",
|
||||
"hostname": "-",
|
||||
"login": "Thu Feb 27 10:38",
|
||||
"logout": "10:38",
|
||||
"duration": "00:00"
|
||||
},
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys003",
|
||||
"hostname": "-",
|
||||
"login": "Thu Feb 27 10:18",
|
||||
"logout": "10:18",
|
||||
"duration": "00:00"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
|
||||
## info
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"user": string,
|
||||
"tty": string,
|
||||
"hostname": string,
|
||||
"login": string,
|
||||
"logout": string,
|
||||
"duration": string
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
|
@ -1,18 +1,19 @@
|
||||
# jc.parsers.ls
|
||||
jc - JSON CLI output utility ls Parser
|
||||
|
||||
Note: The -l option of ls should be used to correctly parse filenames that include newline characters.
|
||||
Note: The -l or -b option of ls should be used to correctly parse filenames that include newline characters.
|
||||
Since ls does not encode newlines in filenames when outputting to a pipe it will cause jc to see
|
||||
multiple files instead of a single file if -l is not used.
|
||||
multiple files instead of a single file if -l or -b is not used.
|
||||
|
||||
Usage:
|
||||
|
||||
specify --ls as the first argument if the piped input is coming from ls
|
||||
|
||||
ls options supported:
|
||||
- laR
|
||||
|
||||
-lbaR
|
||||
--time-style=full-iso
|
||||
- h file sizes will be available in text form with -r but larger file sizes
|
||||
-h file sizes will be available in text form with -r but larger file sizes
|
||||
with human readable suffixes will be converted to Null in default view
|
||||
since the parser attempts to convert this field to an integer.
|
||||
|
||||
|
126
docs/parsers/passwd.md
Normal file
126
docs/parsers/passwd.md
Normal file
@ -0,0 +1,126 @@
|
||||
# jc.parsers.passwd
|
||||
jc - JSON CLI output utility /etc/passwd file Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --passwd as the first argument if the piped input is coming from /etc/passwd
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux', 'darwin', 'aix', 'freebsd'
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat /etc/passwd | jc --passwd -p
|
||||
[
|
||||
{
|
||||
"username": "nobody",
|
||||
"password": "*",
|
||||
"uid": -2,
|
||||
"gid": -2,
|
||||
"comment": "Unprivileged User",
|
||||
"home": "/var/empty",
|
||||
"shell": "/usr/bin/false"
|
||||
},
|
||||
{
|
||||
"username": "root",
|
||||
"password": "*",
|
||||
"uid": 0,
|
||||
"gid": 0,
|
||||
"comment": "System Administrator",
|
||||
"home": "/var/root",
|
||||
"shell": "/bin/sh"
|
||||
},
|
||||
{
|
||||
"username": "daemon",
|
||||
"password": "*",
|
||||
"uid": 1,
|
||||
"gid": 1,
|
||||
"comment": "System Services",
|
||||
"home": "/var/root",
|
||||
"shell": "/usr/bin/false"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ cat /etc/passwd | jc --passwd -p -r
|
||||
[
|
||||
{
|
||||
"username": "nobody",
|
||||
"password": "*",
|
||||
"uid": "-2",
|
||||
"gid": "-2",
|
||||
"comment": "Unprivileged User",
|
||||
"home": "/var/empty",
|
||||
"shell": "/usr/bin/false"
|
||||
},
|
||||
{
|
||||
"username": "root",
|
||||
"password": "*",
|
||||
"uid": "0",
|
||||
"gid": "0",
|
||||
"comment": "System Administrator",
|
||||
"home": "/var/root",
|
||||
"shell": "/bin/sh"
|
||||
},
|
||||
{
|
||||
"username": "daemon",
|
||||
"password": "*",
|
||||
"uid": "1",
|
||||
"gid": "1",
|
||||
"comment": "System Services",
|
||||
"home": "/var/root",
|
||||
"shell": "/usr/bin/false"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
## info
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"username": string,
|
||||
"password": string,
|
||||
"uid": integer,
|
||||
"gid": integer,
|
||||
"comment": string,
|
||||
"home": string,
|
||||
"shell": string
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
|
133
docs/parsers/shadow.md
Normal file
133
docs/parsers/shadow.md
Normal file
@ -0,0 +1,133 @@
|
||||
# jc.parsers.shadow
|
||||
jc - JSON CLI output utility /etc/shadow file Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --shadow as the first argument if the piped input is coming from /etc/shadow
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux', 'darwin', 'aix', 'freebsd'
|
||||
|
||||
Examples:
|
||||
|
||||
$ sudo cat /etc/shadow | jc --shadow -p
|
||||
[
|
||||
{
|
||||
"username": "root",
|
||||
"password": "*",
|
||||
"last_changed": 18113,
|
||||
"minimum": 0,
|
||||
"maximum": 99999,
|
||||
"warn": 7,
|
||||
"inactive": null,
|
||||
"expire": null
|
||||
},
|
||||
{
|
||||
"username": "daemon",
|
||||
"password": "*",
|
||||
"last_changed": 18113,
|
||||
"minimum": 0,
|
||||
"maximum": 99999,
|
||||
"warn": 7,
|
||||
"inactive": null,
|
||||
"expire": null
|
||||
},
|
||||
{
|
||||
"username": "bin",
|
||||
"password": "*",
|
||||
"last_changed": 18113,
|
||||
"minimum": 0,
|
||||
"maximum": 99999,
|
||||
"warn": 7,
|
||||
"inactive": null,
|
||||
"expire": null
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ sudo cat /etc/shadow | jc --shadow -p -r
|
||||
[
|
||||
{
|
||||
"username": "root",
|
||||
"password": "*",
|
||||
"last_changed": "18113",
|
||||
"minimum": "0",
|
||||
"maximum": "99999",
|
||||
"warn": "7",
|
||||
"inactive": "",
|
||||
"expire": ""
|
||||
},
|
||||
{
|
||||
"username": "daemon",
|
||||
"password": "*",
|
||||
"last_changed": "18113",
|
||||
"minimum": "0",
|
||||
"maximum": "99999",
|
||||
"warn": "7",
|
||||
"inactive": "",
|
||||
"expire": ""
|
||||
},
|
||||
{
|
||||
"username": "bin",
|
||||
"password": "*",
|
||||
"last_changed": "18113",
|
||||
"minimum": "0",
|
||||
"maximum": "99999",
|
||||
"warn": "7",
|
||||
"inactive": "",
|
||||
"expire": ""
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
## info
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"username": string,
|
||||
"password": string,
|
||||
"last_changed": integer,
|
||||
"minimum": integer,
|
||||
"maximum": integer,
|
||||
"warn": integer,
|
||||
"inactive": integer,
|
||||
"expire": integer
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
|
152
docs/parsers/who.md
Normal file
152
docs/parsers/who.md
Normal file
@ -0,0 +1,152 @@
|
||||
# jc.parsers.who
|
||||
jc - JSON CLI output utility who Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --who as the first argument if the piped input is coming from who
|
||||
|
||||
accepts any of the following who options (or no options): -aTH
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
||||
|
||||
Examples:
|
||||
|
||||
$ who -a | jc --who -p
|
||||
[
|
||||
{
|
||||
"event": "reboot",
|
||||
"time": "Feb 7 23:31",
|
||||
"pid": 1
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "-",
|
||||
"tty": "console",
|
||||
"time": "Feb 7 23:32",
|
||||
"idle": "old",
|
||||
"pid": 105
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "+",
|
||||
"tty": "ttys000",
|
||||
"time": "Feb 13 16:44",
|
||||
"idle": ".",
|
||||
"pid": 51217,
|
||||
"comment": "term=0 exit=0"
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "?",
|
||||
"tty": "ttys003",
|
||||
"time": "Feb 28 08:59",
|
||||
"idle": "01:36",
|
||||
"pid": 41402
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "+",
|
||||
"tty": "ttys004",
|
||||
"time": "Mar 1 16:35",
|
||||
"idle": ".",
|
||||
"pid": 15679,
|
||||
"from": "192.168.1.5"
|
||||
}
|
||||
]
|
||||
|
||||
$ who -a | jc --who -p -r
|
||||
[
|
||||
{
|
||||
"event": "reboot",
|
||||
"time": "Feb 7 23:31",
|
||||
"pid": "1"
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "-",
|
||||
"tty": "console",
|
||||
"time": "Feb 7 23:32",
|
||||
"idle": "old",
|
||||
"pid": "105"
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "+",
|
||||
"tty": "ttys000",
|
||||
"time": "Feb 13 16:44",
|
||||
"idle": ".",
|
||||
"pid": "51217",
|
||||
"comment": "term=0 exit=0"
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "?",
|
||||
"tty": "ttys003",
|
||||
"time": "Feb 28 08:59",
|
||||
"idle": "01:36",
|
||||
"pid": "41402"
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "+",
|
||||
"tty": "ttys004",
|
||||
"time": "Mar 1 16:35",
|
||||
"idle": ".",
|
||||
"pid": "15679",
|
||||
"from": "192.168.1.5"
|
||||
}
|
||||
]
|
||||
|
||||
## info
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"user": string,
|
||||
"event": string,
|
||||
"writeable_tty": string,
|
||||
"tty": string,
|
||||
"time": string,
|
||||
"idle": string,
|
||||
"pid": integer,
|
||||
"from": string,
|
||||
"comment": string
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
|
14
jc/cli.py
14
jc/cli.py
@ -13,7 +13,7 @@ import jc.utils
|
||||
|
||||
|
||||
class info():
|
||||
version = '1.7.5'
|
||||
version = '1.8.0'
|
||||
description = 'jc cli output JSON conversion tool'
|
||||
author = 'Kelly Brazil'
|
||||
author_email = 'kellyjonbrazil@gmail.com'
|
||||
@ -23,14 +23,18 @@ __version__ = info.version
|
||||
|
||||
parsers = [
|
||||
'arp',
|
||||
'blkid',
|
||||
'crontab',
|
||||
'crontab-u',
|
||||
'csv',
|
||||
'df',
|
||||
'dig',
|
||||
'du',
|
||||
'env',
|
||||
'free',
|
||||
'fstab',
|
||||
'group',
|
||||
'gshadow',
|
||||
'history',
|
||||
'hosts',
|
||||
'id',
|
||||
@ -38,16 +42,19 @@ parsers = [
|
||||
'ini',
|
||||
'iptables',
|
||||
'jobs',
|
||||
'last',
|
||||
'ls',
|
||||
'lsblk',
|
||||
'lsmod',
|
||||
'lsof',
|
||||
'mount',
|
||||
'netstat',
|
||||
'passwd',
|
||||
'pip-list',
|
||||
'pip-show',
|
||||
'ps',
|
||||
'route',
|
||||
'shadow',
|
||||
'ss',
|
||||
'stat',
|
||||
'systemctl',
|
||||
@ -57,6 +64,7 @@ parsers = [
|
||||
'uname',
|
||||
'uptime',
|
||||
'w',
|
||||
'who',
|
||||
'xml',
|
||||
'yaml'
|
||||
]
|
||||
@ -145,10 +153,6 @@ def helptext(message):
|
||||
|
||||
Usage: COMMAND | jc PARSER [OPTIONS]
|
||||
|
||||
or
|
||||
|
||||
COMMAND | jc [OPTIONS] PARSER
|
||||
|
||||
or magic syntax:
|
||||
|
||||
jc [OPTIONS] COMMAND
|
||||
|
219
jc/parsers/blkid.py
Normal file
219
jc/parsers/blkid.py
Normal file
@ -0,0 +1,219 @@
|
||||
"""jc - JSON CLI output utility blkid Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --blkid as the first argument if the piped input is coming from blkid
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux'
|
||||
|
||||
Examples:
|
||||
|
||||
$ blkid | jc --blkid -p
|
||||
[
|
||||
{
|
||||
"device": "/dev/sda1",
|
||||
"uuid": "05d927ab-5875-49e4-ada1-7f46cb32c932",
|
||||
"type": "xfs"
|
||||
},
|
||||
{
|
||||
"device": "/dev/sda2",
|
||||
"uuid": "3klkIj-w1kk-DkJi-0XBJ-y3i7-i2Ac-vHqWBM",
|
||||
"type": "LVM2_member"
|
||||
},
|
||||
{
|
||||
"device": "/dev/mapper/centos-root",
|
||||
"uuid": "07d718ff-950c-4e5b-98f0-42a1147c77d9",
|
||||
"type": "xfs"
|
||||
},
|
||||
{
|
||||
"device": "/dev/mapper/centos-swap",
|
||||
"uuid": "615eb89a-bcbf-46fd-80e3-c483ff5c931f",
|
||||
"type": "swap"
|
||||
}
|
||||
]
|
||||
|
||||
$ sudo blkid -o udev -ip /dev/sda2 | jc --blkid -p
|
||||
[
|
||||
{
|
||||
"id_fs_uuid": "3klkIj-w1kk-DkJi-0XBJ-y3i7-i2Ac-vHqWBM",
|
||||
"id_fs_uuid_enc": "3klkIj-w1kk-DkJi-0XBJ-y3i7-i2Ac-vHqWBM",
|
||||
"id_fs_version": "LVM2\\x20001",
|
||||
"id_fs_type": "LVM2_member",
|
||||
"id_fs_usage": "raid",
|
||||
"id_iolimit_minimum_io_size": 512,
|
||||
"id_iolimit_physical_sector_size": 512,
|
||||
"id_iolimit_logical_sector_size": 512,
|
||||
"id_part_entry_scheme": "dos",
|
||||
"id_part_entry_type": "0x8e",
|
||||
"id_part_entry_number": 2,
|
||||
"id_part_entry_offset": 2099200,
|
||||
"id_part_entry_size": 39843840,
|
||||
"id_part_entry_disk": "8:0"
|
||||
}
|
||||
]
|
||||
|
||||
$ sudo blkid -ip /dev/sda1 | jc --blkid -p -r
|
||||
[
|
||||
{
|
||||
"devname": "/dev/sda1",
|
||||
"uuid": "05d927bb-5875-49e3-ada1-7f46cb31c932",
|
||||
"type": "xfs",
|
||||
"usage": "filesystem",
|
||||
"minimum_io_size": "512",
|
||||
"physical_sector_size": "512",
|
||||
"logical_sector_size": "512",
|
||||
"part_entry_scheme": "dos",
|
||||
"part_entry_type": "0x83",
|
||||
"part_entry_flags": "0x80",
|
||||
"part_entry_number": "1",
|
||||
"part_entry_offset": "2048",
|
||||
"part_entry_size": "2097152",
|
||||
"part_entry_disk": "8:0"
|
||||
}
|
||||
]
|
||||
"""
|
||||
import shlex
|
||||
import jc.utils
|
||||
|
||||
|
||||
class info():
|
||||
version = '1.0'
|
||||
description = 'blkid command parser'
|
||||
author = 'Kelly Brazil'
|
||||
author_email = 'kellyjonbrazil@gmail.com'
|
||||
# details = 'enter any other details here'
|
||||
|
||||
# compatible options: linux, darwin, cygwin, win32, aix, freebsd
|
||||
compatible = ['linux']
|
||||
magic_commands = ['blkid']
|
||||
|
||||
|
||||
__version__ = info.version
|
||||
|
||||
|
||||
def process(proc_data):
|
||||
"""
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"device": string,
|
||||
"uuid": string,
|
||||
"type": string,
|
||||
"usage": string,
|
||||
"part_entry_scheme": string,
|
||||
"part_entry_type": string,
|
||||
"part_entry_flags": string,
|
||||
"part_entry_number": integer,
|
||||
"part_entry_offset": integer,
|
||||
"part_entry_size": integer,
|
||||
"part_entry_disk": string,
|
||||
"id_fs_uuid": string,
|
||||
"id_fs_uuid_enc": string,
|
||||
"id_fs_version": string,
|
||||
"id_fs_type": string,
|
||||
"id_fs_usage": string,
|
||||
"id_part_entry_scheme": string,
|
||||
"id_part_entry_type": string,
|
||||
"id_part_entry_flags": string,
|
||||
"id_part_entry_number": integer,
|
||||
"id_part_entry_offset": integer,
|
||||
"id_part_entry_size": integer,
|
||||
"id_iolimit_minimum_io_size": integer,
|
||||
"id_iolimit_physical_sector_size": integer,
|
||||
"id_iolimit_logical_sector_size": integer,
|
||||
"id_part_entry_disk": string,
|
||||
"minimum_io_size": integer,
|
||||
"physical_sector_size": integer,
|
||||
"logical_sector_size": integer
|
||||
}
|
||||
]
|
||||
"""
|
||||
for entry in proc_data:
|
||||
if 'devname' in entry:
|
||||
entry['device'] = entry.pop('devname')
|
||||
|
||||
int_list = ['part_entry_number', 'part_entry_offset', 'part_entry_size', 'id_part_entry_number',
|
||||
'id_part_entry_offset', 'id_part_entry_size', 'minimum_io_size', 'physical_sector_size',
|
||||
'logical_sector_size', 'id_iolimit_minimum_io_size', 'id_iolimit_physical_sector_size',
|
||||
'id_iolimit_logical_sector_size']
|
||||
for key in int_list:
|
||||
if key in entry:
|
||||
try:
|
||||
key_int = int(entry[key])
|
||||
entry[key] = key_int
|
||||
except (ValueError):
|
||||
entry[key] = None
|
||||
|
||||
return proc_data
|
||||
|
||||
|
||||
def parse(data, raw=False, quiet=False):
|
||||
"""
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
"""
|
||||
if not quiet:
|
||||
jc.utils.compatibility(__name__, info.compatible)
|
||||
|
||||
raw_output = []
|
||||
|
||||
if data:
|
||||
# if the first field is a device, use normal parsing:
|
||||
if data.split(maxsplit=1)[0][-1] == ':':
|
||||
linedata = data.splitlines()
|
||||
|
||||
for line in linedata:
|
||||
output_line = {}
|
||||
entries = shlex.split(line)
|
||||
output_line['device'] = entries.pop(0)[:-1]
|
||||
|
||||
for entry in entries:
|
||||
key = entry.split('=', maxsplit=1)[0].lower()
|
||||
value = entry.split('=', maxsplit=1)[1]
|
||||
output_line[key] = value
|
||||
|
||||
raw_output.append(output_line)
|
||||
|
||||
# else use key/value per line parsing
|
||||
else:
|
||||
linedata = data.splitlines()
|
||||
output_line = {}
|
||||
for line in linedata:
|
||||
if line == '':
|
||||
if output_line:
|
||||
raw_output.append(output_line)
|
||||
output_line = {}
|
||||
continue
|
||||
continue
|
||||
|
||||
key = line.split('=', maxsplit=1)[0].lower()
|
||||
value = line.split('=', maxsplit=1)[1]
|
||||
output_line[key] = value
|
||||
|
||||
if output_line:
|
||||
raw_output.append(output_line)
|
||||
|
||||
if raw:
|
||||
return raw_output
|
||||
else:
|
||||
return process(raw_output)
|
141
jc/parsers/csv.py
Normal file
141
jc/parsers/csv.py
Normal file
@ -0,0 +1,141 @@
|
||||
"""jc - JSON CLI output utility csv Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --csv as the first argument if the piped input is coming from a csv file.
|
||||
the csv parser will attempt to automatically detect the delimiter character.
|
||||
if the delimiter cannot be detected it will default to comma.
|
||||
the first row of the file must be a header row.
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat homes.csv
|
||||
"Sell", "List", "Living", "Rooms", "Beds", "Baths", "Age", "Acres", "Taxes"
|
||||
142, 160, 28, 10, 5, 3, 60, 0.28, 3167
|
||||
175, 180, 18, 8, 4, 1, 12, 0.43, 4033
|
||||
129, 132, 13, 6, 3, 1, 41, 0.33, 1471
|
||||
...
|
||||
|
||||
$ cat homes.csv | jc --csv -p
|
||||
[
|
||||
{
|
||||
"Sell": "142",
|
||||
"List": "160",
|
||||
"Living": "28",
|
||||
"Rooms": "10",
|
||||
"Beds": "5",
|
||||
"Baths": "3",
|
||||
"Age": "60",
|
||||
"Acres": "0.28",
|
||||
"Taxes": "3167"
|
||||
},
|
||||
{
|
||||
"Sell": "175",
|
||||
"List": "180",
|
||||
"Living": "18",
|
||||
"Rooms": "8",
|
||||
"Beds": "4",
|
||||
"Baths": "1",
|
||||
"Age": "12",
|
||||
"Acres": "0.43",
|
||||
"Taxes": "4033"
|
||||
},
|
||||
{
|
||||
"Sell": "129",
|
||||
"List": "132",
|
||||
"Living": "13",
|
||||
"Rooms": "6",
|
||||
"Beds": "3",
|
||||
"Baths": "1",
|
||||
"Age": "41",
|
||||
"Acres": "0.33",
|
||||
"Taxes": "1471"
|
||||
},
|
||||
...
|
||||
]
|
||||
"""
|
||||
import jc.utils
|
||||
import csv
|
||||
|
||||
|
||||
class info():
|
||||
version = '1.0'
|
||||
description = 'CSV file parser'
|
||||
author = 'Kelly Brazil'
|
||||
author_email = 'kellyjonbrazil@gmail.com'
|
||||
details = 'Using the python standard csv library'
|
||||
|
||||
# compatible options: linux, darwin, cygwin, win32, aix, freebsd
|
||||
compatible = ['linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd']
|
||||
|
||||
|
||||
__version__ = info.version
|
||||
|
||||
|
||||
def process(proc_data):
|
||||
"""
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Each dictionary represents a row in the csv file:
|
||||
|
||||
[
|
||||
{
|
||||
csv file converted to a Dictionary
|
||||
https://docs.python.org/3/library/csv.html
|
||||
}
|
||||
]
|
||||
"""
|
||||
|
||||
# No further processing
|
||||
return proc_data
|
||||
|
||||
|
||||
def parse(data, raw=False, quiet=False):
|
||||
"""
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
"""
|
||||
if not quiet:
|
||||
jc.utils.compatibility(__name__, info.compatible)
|
||||
|
||||
raw_output = []
|
||||
cleandata = data.splitlines()
|
||||
|
||||
# Clear any blank lines
|
||||
cleandata = list(filter(None, cleandata))
|
||||
|
||||
if cleandata:
|
||||
dialect = None
|
||||
try:
|
||||
dialect = csv.Sniffer().sniff(data[:1024])
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
reader = csv.DictReader(cleandata, dialect=dialect)
|
||||
|
||||
for row in reader:
|
||||
raw_output.append(row)
|
||||
|
||||
if raw:
|
||||
return raw_output
|
||||
else:
|
||||
return process(raw_output)
|
190
jc/parsers/group.py
Normal file
190
jc/parsers/group.py
Normal file
@ -0,0 +1,190 @@
|
||||
"""jc - JSON CLI output utility /etc/group file Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --group as the first argument if the piped input is coming from /etc/group
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux', 'darwin', 'aix', 'freebsd'
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat /etc/group | jc --group -p
|
||||
[
|
||||
{
|
||||
"group_name": "nobody",
|
||||
"password": "*",
|
||||
"gid": -2,
|
||||
"members": []
|
||||
},
|
||||
{
|
||||
"group_name": "nogroup",
|
||||
"password": "*",
|
||||
"gid": -1,
|
||||
"members": []
|
||||
},
|
||||
{
|
||||
"group_name": "wheel",
|
||||
"password": "*",
|
||||
"gid": 0,
|
||||
"members": [
|
||||
"root"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_name": "certusers",
|
||||
"password": "*",
|
||||
"gid": 29,
|
||||
"members": [
|
||||
"root",
|
||||
"_jabber",
|
||||
"_postfix",
|
||||
"_cyrus",
|
||||
"_calendar",
|
||||
"_dovecot"
|
||||
]
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ cat /etc/group | jc --group -p -r
|
||||
[
|
||||
{
|
||||
"group_name": "nobody",
|
||||
"password": "*",
|
||||
"gid": "-2",
|
||||
"members": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_name": "nogroup",
|
||||
"password": "*",
|
||||
"gid": "-1",
|
||||
"members": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_name": "wheel",
|
||||
"password": "*",
|
||||
"gid": "0",
|
||||
"members": [
|
||||
"root"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_name": "certusers",
|
||||
"password": "*",
|
||||
"gid": "29",
|
||||
"members": [
|
||||
"root",
|
||||
"_jabber",
|
||||
"_postfix",
|
||||
"_cyrus",
|
||||
"_calendar",
|
||||
"_dovecot"
|
||||
]
|
||||
},
|
||||
...
|
||||
]
|
||||
"""
|
||||
import jc.utils
|
||||
|
||||
|
||||
class info():
|
||||
version = '1.0'
|
||||
description = '/etc/group file parser'
|
||||
author = 'Kelly Brazil'
|
||||
author_email = 'kellyjonbrazil@gmail.com'
|
||||
# details = 'enter any other details here'
|
||||
|
||||
# compatible options: linux, darwin, cygwin, win32, aix, freebsd
|
||||
compatible = ['linux', 'darwin', 'aix', 'freebsd']
|
||||
|
||||
|
||||
__version__ = info.version
|
||||
|
||||
|
||||
def process(proc_data):
|
||||
"""
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"group_name": string,
|
||||
"password": string,
|
||||
"gid": integer,
|
||||
"members": [
|
||||
string
|
||||
]
|
||||
}
|
||||
]
|
||||
"""
|
||||
for entry in proc_data:
|
||||
int_list = ['gid']
|
||||
for key in int_list:
|
||||
if key in entry:
|
||||
try:
|
||||
key_int = int(entry[key])
|
||||
entry[key] = key_int
|
||||
except (ValueError):
|
||||
entry[key] = None
|
||||
|
||||
if entry['members'] == ['']:
|
||||
entry['members'] = []
|
||||
|
||||
return proc_data
|
||||
|
||||
|
||||
def parse(data, raw=False, quiet=False):
|
||||
"""
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
"""
|
||||
if not quiet:
|
||||
jc.utils.compatibility(__name__, info.compatible)
|
||||
|
||||
raw_output = []
|
||||
cleandata = data.splitlines()
|
||||
|
||||
# Clear any blank lines
|
||||
cleandata = list(filter(None, cleandata))
|
||||
|
||||
if cleandata:
|
||||
for entry in cleandata:
|
||||
if entry.startswith('#'):
|
||||
continue
|
||||
|
||||
output_line = {}
|
||||
fields = entry.split(':')
|
||||
|
||||
output_line['group_name'] = fields[0]
|
||||
output_line['password'] = fields[1]
|
||||
output_line['gid'] = fields[2]
|
||||
output_line['members'] = fields[3].split(',')
|
||||
|
||||
raw_output.append(output_line)
|
||||
|
||||
if raw:
|
||||
return raw_output
|
||||
else:
|
||||
return process(raw_output)
|
152
jc/parsers/gshadow.py
Normal file
152
jc/parsers/gshadow.py
Normal file
@ -0,0 +1,152 @@
|
||||
"""jc - JSON CLI output utility /etc/gshadow file Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --gshadow as the first argument if the piped input is coming from /etc/gshadow
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux', 'aix', 'freebsd'
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat /etc/gshadow | jc --gshadow -p
|
||||
[
|
||||
{
|
||||
"group_name": "root",
|
||||
"password": "*",
|
||||
"administrators": [],
|
||||
"members": []
|
||||
},
|
||||
{
|
||||
"group_name": "adm",
|
||||
"password": "*",
|
||||
"administrators": [],
|
||||
"members": [
|
||||
"syslog",
|
||||
"joeuser"
|
||||
]
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ cat /etc/gshadow | jc --gshadow -p -r
|
||||
[
|
||||
{
|
||||
"group_name": "root",
|
||||
"password": "*",
|
||||
"administrators": [
|
||||
""
|
||||
],
|
||||
"members": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_name": "adm",
|
||||
"password": "*",
|
||||
"administrators": [
|
||||
""
|
||||
],
|
||||
"members": [
|
||||
"syslog",
|
||||
"joeuser"
|
||||
]
|
||||
},
|
||||
...
|
||||
]
|
||||
"""
|
||||
import jc.utils
|
||||
|
||||
|
||||
class info():
|
||||
version = '1.0'
|
||||
description = '/etc/gshadow file parser'
|
||||
author = 'Kelly Brazil'
|
||||
author_email = 'kellyjonbrazil@gmail.com'
|
||||
# details = 'enter any other details here'
|
||||
|
||||
# compatible options: linux, darwin, cygwin, win32, aix, freebsd
|
||||
compatible = ['linux', 'aix', 'freebsd']
|
||||
|
||||
|
||||
__version__ = info.version
|
||||
|
||||
|
||||
def process(proc_data):
|
||||
"""
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"group_name": string,
|
||||
"password": string,
|
||||
"administrators": [
|
||||
string
|
||||
],
|
||||
"members": [
|
||||
string
|
||||
]
|
||||
}
|
||||
]
|
||||
"""
|
||||
for entry in proc_data:
|
||||
if entry['administrators'] == ['']:
|
||||
entry['administrators'] = []
|
||||
|
||||
if entry['members'] == ['']:
|
||||
entry['members'] = []
|
||||
|
||||
return proc_data
|
||||
|
||||
|
||||
def parse(data, raw=False, quiet=False):
|
||||
"""
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
"""
|
||||
if not quiet:
|
||||
jc.utils.compatibility(__name__, info.compatible)
|
||||
|
||||
raw_output = []
|
||||
cleandata = data.splitlines()
|
||||
|
||||
# Clear any blank lines
|
||||
cleandata = list(filter(None, cleandata))
|
||||
|
||||
if cleandata:
|
||||
for entry in cleandata:
|
||||
if entry.startswith('#'):
|
||||
continue
|
||||
|
||||
output_line = {}
|
||||
fields = entry.split(':')
|
||||
|
||||
output_line['group_name'] = fields[0]
|
||||
output_line['password'] = fields[1]
|
||||
output_line['administrators'] = fields[2].split(',')
|
||||
output_line['members'] = fields[3].split(',')
|
||||
|
||||
raw_output.append(output_line)
|
||||
|
||||
if raw:
|
||||
return raw_output
|
||||
else:
|
||||
return process(raw_output)
|
181
jc/parsers/last.py
Normal file
181
jc/parsers/last.py
Normal file
@ -0,0 +1,181 @@
|
||||
"""jc - JSON CLI output utility last Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --last as the first argument if the piped input is coming from last or lastb
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux', 'darwin', 'aix', 'freebsd'
|
||||
|
||||
Examples:
|
||||
|
||||
$ last | jc --last -p
|
||||
[
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys002",
|
||||
"hostname": null,
|
||||
"login": "Thu Feb 27 14:31",
|
||||
"logout": "still logged in"
|
||||
},
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys003",
|
||||
"hostname": null,
|
||||
"login": "Thu Feb 27 10:38",
|
||||
"logout": "10:38",
|
||||
"duration": "00:00"
|
||||
},
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys003",
|
||||
"hostname": null,
|
||||
"login": "Thu Feb 27 10:18",
|
||||
"logout": "10:18",
|
||||
"duration": "00:00"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ last | jc --last -p -r
|
||||
[
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys002",
|
||||
"hostname": "-",
|
||||
"login": "Thu Feb 27 14:31",
|
||||
"logout": "still_logged_in"
|
||||
},
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys003",
|
||||
"hostname": "-",
|
||||
"login": "Thu Feb 27 10:38",
|
||||
"logout": "10:38",
|
||||
"duration": "00:00"
|
||||
},
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys003",
|
||||
"hostname": "-",
|
||||
"login": "Thu Feb 27 10:18",
|
||||
"logout": "10:18",
|
||||
"duration": "00:00"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
"""
|
||||
import re
|
||||
import jc.utils
|
||||
|
||||
|
||||
class info():
|
||||
version = '1.0'
|
||||
description = 'last and lastb command parser'
|
||||
author = 'Kelly Brazil'
|
||||
author_email = 'kellyjonbrazil@gmail.com'
|
||||
# details = 'enter any other details here'
|
||||
|
||||
# compatible options: linux, darwin, cygwin, win32, aix, freebsd
|
||||
compatible = ['linux', 'darwin', 'aix', 'freebsd']
|
||||
magic_commands = ['last', 'lastb']
|
||||
|
||||
|
||||
__version__ = info.version
|
||||
|
||||
|
||||
def process(proc_data):
|
||||
"""
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"user": string,
|
||||
"tty": string,
|
||||
"hostname": string,
|
||||
"login": string,
|
||||
"logout": string,
|
||||
"duration": string
|
||||
}
|
||||
]
|
||||
"""
|
||||
for entry in proc_data:
|
||||
if 'tty' in entry and entry['tty'] == '~':
|
||||
entry['tty'] = None
|
||||
|
||||
if 'tty' in entry and entry['tty'] == 'system_boot':
|
||||
entry['tty'] = 'system boot'
|
||||
|
||||
if 'hostname' in entry and entry['hostname'] == '-':
|
||||
entry['hostname'] = None
|
||||
|
||||
if 'logout' in entry and entry['logout'] == 'still_logged_in':
|
||||
entry['logout'] = 'still logged in'
|
||||
|
||||
return proc_data
|
||||
|
||||
|
||||
def parse(data, raw=False, quiet=False):
|
||||
"""
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
"""
|
||||
if not quiet:
|
||||
jc.utils.compatibility(__name__, info.compatible)
|
||||
|
||||
raw_output = []
|
||||
cleandata = data.splitlines()
|
||||
|
||||
# Clear any blank lines
|
||||
cleandata = list(filter(None, cleandata))
|
||||
|
||||
if cleandata:
|
||||
for entry in cleandata:
|
||||
output_line = {}
|
||||
|
||||
if entry.startswith('wtmp begins ') or entry.startswith('btmp begins '):
|
||||
continue
|
||||
|
||||
entry = entry.replace('system boot', 'system_boot')
|
||||
entry = entry.replace(' still logged in', '- still_logged_in')
|
||||
|
||||
linedata = entry.split()
|
||||
if re.match(r'[MTWFS][ouerha][nedritnu] [JFMASOND][aepuco][nbrynlgptvc]', ' '.join(linedata[2:4])):
|
||||
linedata.insert(2, '-')
|
||||
|
||||
output_line['user'] = linedata[0]
|
||||
output_line['tty'] = linedata[1]
|
||||
output_line['hostname'] = linedata[2]
|
||||
output_line['login'] = ' '.join(linedata[3:7])
|
||||
|
||||
if len(linedata) > 8:
|
||||
output_line['logout'] = linedata[8]
|
||||
|
||||
if len(linedata) > 9:
|
||||
output_line['duration'] = linedata[9].replace('(', '').replace(')', '')
|
||||
|
||||
raw_output.append(output_line)
|
||||
|
||||
if raw:
|
||||
return raw_output
|
||||
else:
|
||||
return process(raw_output)
|
@ -1,17 +1,18 @@
|
||||
"""jc - JSON CLI output utility ls Parser
|
||||
|
||||
Note: The -l option of ls should be used to correctly parse filenames that include newline characters.
|
||||
Note: The -l or -b option of ls should be used to correctly parse filenames that include newline characters.
|
||||
Since ls does not encode newlines in filenames when outputting to a pipe it will cause jc to see
|
||||
multiple files instead of a single file if -l is not used.
|
||||
multiple files instead of a single file if -l or -b is not used.
|
||||
|
||||
Usage:
|
||||
|
||||
specify --ls as the first argument if the piped input is coming from ls
|
||||
|
||||
ls options supported:
|
||||
- laR
|
||||
|
||||
-lbaR
|
||||
--time-style=full-iso
|
||||
- h file sizes will be available in text form with -r but larger file sizes
|
||||
-h file sizes will be available in text form with -r but larger file sizes
|
||||
with human readable suffixes will be converted to Null in default view
|
||||
since the parser attempts to convert this field to an integer.
|
||||
|
||||
@ -227,11 +228,11 @@ def parse(data, raw=False, quiet=False):
|
||||
|
||||
# Delete first line if it starts with 'total 1234'
|
||||
if linedata:
|
||||
if re.match('^total [0-9]+', linedata[0]):
|
||||
if re.match(r'total [0-9]+', linedata[0]):
|
||||
linedata.pop(0)
|
||||
|
||||
# Look for parent line if glob or -R is used
|
||||
if not re.match('^[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', linedata[0]) \
|
||||
if not re.match(r'[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', linedata[0]) \
|
||||
and linedata[0].endswith(':'):
|
||||
parent = linedata.pop(0)[:-1]
|
||||
# Pop following total line
|
||||
@ -239,13 +240,13 @@ def parse(data, raw=False, quiet=False):
|
||||
|
||||
if linedata:
|
||||
# Check if -l was used to parse extra data
|
||||
if re.match('^[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', linedata[0]):
|
||||
if re.match(r'[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', linedata[0]):
|
||||
for entry in linedata:
|
||||
output_line = {}
|
||||
|
||||
parsed_line = entry.split(maxsplit=8)
|
||||
|
||||
if not re.match('^[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', entry) \
|
||||
if not re.match(r'[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', entry) \
|
||||
and entry.endswith(':'):
|
||||
parent = entry[:-1]
|
||||
new_section = True
|
||||
@ -254,13 +255,13 @@ def parse(data, raw=False, quiet=False):
|
||||
raw_output[-1]['filename'] = raw_output[-1]['filename'][:-1]
|
||||
continue
|
||||
|
||||
if re.match('^total [0-9]+', entry):
|
||||
if re.match(r'total [0-9]+', entry):
|
||||
new_section = False
|
||||
continue
|
||||
|
||||
# fixup for filenames with newlines
|
||||
if not new_section \
|
||||
and not re.match('^[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', entry):
|
||||
and not re.match(r'[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', entry):
|
||||
raw_output[-1]['filename'] = raw_output[-1]['filename'] + '\n' + entry
|
||||
continue
|
||||
|
||||
@ -301,7 +302,7 @@ def parse(data, raw=False, quiet=False):
|
||||
continue
|
||||
|
||||
if not quiet and next_is_parent and not entry.endswith(':') and not warned:
|
||||
jc.utils.warning_message('Newline characters detected. Filenames probably corrupted. Use ls -l instead.')
|
||||
jc.utils.warning_message('Newline characters detected. Filenames probably corrupted. Use ls -l or -b instead.')
|
||||
warned = True
|
||||
|
||||
output_line['filename'] = entry
|
||||
|
175
jc/parsers/passwd.py
Normal file
175
jc/parsers/passwd.py
Normal file
@ -0,0 +1,175 @@
|
||||
"""jc - JSON CLI output utility /etc/passwd file Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --passwd as the first argument if the piped input is coming from /etc/passwd
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux', 'darwin', 'aix', 'freebsd'
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat /etc/passwd | jc --passwd -p
|
||||
[
|
||||
{
|
||||
"username": "nobody",
|
||||
"password": "*",
|
||||
"uid": -2,
|
||||
"gid": -2,
|
||||
"comment": "Unprivileged User",
|
||||
"home": "/var/empty",
|
||||
"shell": "/usr/bin/false"
|
||||
},
|
||||
{
|
||||
"username": "root",
|
||||
"password": "*",
|
||||
"uid": 0,
|
||||
"gid": 0,
|
||||
"comment": "System Administrator",
|
||||
"home": "/var/root",
|
||||
"shell": "/bin/sh"
|
||||
},
|
||||
{
|
||||
"username": "daemon",
|
||||
"password": "*",
|
||||
"uid": 1,
|
||||
"gid": 1,
|
||||
"comment": "System Services",
|
||||
"home": "/var/root",
|
||||
"shell": "/usr/bin/false"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ cat /etc/passwd | jc --passwd -p -r
|
||||
[
|
||||
{
|
||||
"username": "nobody",
|
||||
"password": "*",
|
||||
"uid": "-2",
|
||||
"gid": "-2",
|
||||
"comment": "Unprivileged User",
|
||||
"home": "/var/empty",
|
||||
"shell": "/usr/bin/false"
|
||||
},
|
||||
{
|
||||
"username": "root",
|
||||
"password": "*",
|
||||
"uid": "0",
|
||||
"gid": "0",
|
||||
"comment": "System Administrator",
|
||||
"home": "/var/root",
|
||||
"shell": "/bin/sh"
|
||||
},
|
||||
{
|
||||
"username": "daemon",
|
||||
"password": "*",
|
||||
"uid": "1",
|
||||
"gid": "1",
|
||||
"comment": "System Services",
|
||||
"home": "/var/root",
|
||||
"shell": "/usr/bin/false"
|
||||
},
|
||||
...
|
||||
]
|
||||
"""
|
||||
import jc.utils
|
||||
|
||||
|
||||
class info():
|
||||
version = '1.0'
|
||||
description = '/etc/passwd file parser'
|
||||
author = 'Kelly Brazil'
|
||||
author_email = 'kellyjonbrazil@gmail.com'
|
||||
# details = 'enter any other details here'
|
||||
|
||||
# compatible options: linux, darwin, cygwin, win32, aix, freebsd
|
||||
compatible = ['linux', 'darwin', 'aix', 'freebsd']
|
||||
|
||||
|
||||
__version__ = info.version
|
||||
|
||||
|
||||
def process(proc_data):
|
||||
"""
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"username": string,
|
||||
"password": string,
|
||||
"uid": integer,
|
||||
"gid": integer,
|
||||
"comment": string,
|
||||
"home": string,
|
||||
"shell": string
|
||||
}
|
||||
]
|
||||
"""
|
||||
for entry in proc_data:
|
||||
int_list = ['uid', 'gid']
|
||||
for key in int_list:
|
||||
if key in entry:
|
||||
try:
|
||||
key_int = int(entry[key])
|
||||
entry[key] = key_int
|
||||
except (ValueError):
|
||||
entry[key] = None
|
||||
|
||||
return proc_data
|
||||
|
||||
|
||||
def parse(data, raw=False, quiet=False):
|
||||
"""
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
"""
|
||||
if not quiet:
|
||||
jc.utils.compatibility(__name__, info.compatible)
|
||||
|
||||
raw_output = []
|
||||
cleandata = data.splitlines()
|
||||
|
||||
# Clear any blank lines
|
||||
cleandata = list(filter(None, cleandata))
|
||||
|
||||
if cleandata:
|
||||
for entry in cleandata:
|
||||
if entry.startswith('#'):
|
||||
continue
|
||||
|
||||
output_line = {}
|
||||
fields = entry.split(':')
|
||||
|
||||
output_line['username'] = fields[0]
|
||||
output_line['password'] = fields[1]
|
||||
output_line['uid'] = fields[2]
|
||||
output_line['gid'] = fields[3]
|
||||
output_line['comment'] = fields[4]
|
||||
output_line['home'] = fields[5]
|
||||
output_line['shell'] = fields[6]
|
||||
|
||||
raw_output.append(output_line)
|
||||
|
||||
if raw:
|
||||
return raw_output
|
||||
else:
|
||||
return process(raw_output)
|
183
jc/parsers/shadow.py
Normal file
183
jc/parsers/shadow.py
Normal file
@ -0,0 +1,183 @@
|
||||
"""jc - JSON CLI output utility /etc/shadow file Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --shadow as the first argument if the piped input is coming from /etc/shadow
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux', 'darwin', 'aix', 'freebsd'
|
||||
|
||||
Examples:
|
||||
|
||||
$ sudo cat /etc/shadow | jc --shadow -p
|
||||
[
|
||||
{
|
||||
"username": "root",
|
||||
"password": "*",
|
||||
"last_changed": 18113,
|
||||
"minimum": 0,
|
||||
"maximum": 99999,
|
||||
"warn": 7,
|
||||
"inactive": null,
|
||||
"expire": null
|
||||
},
|
||||
{
|
||||
"username": "daemon",
|
||||
"password": "*",
|
||||
"last_changed": 18113,
|
||||
"minimum": 0,
|
||||
"maximum": 99999,
|
||||
"warn": 7,
|
||||
"inactive": null,
|
||||
"expire": null
|
||||
},
|
||||
{
|
||||
"username": "bin",
|
||||
"password": "*",
|
||||
"last_changed": 18113,
|
||||
"minimum": 0,
|
||||
"maximum": 99999,
|
||||
"warn": 7,
|
||||
"inactive": null,
|
||||
"expire": null
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ sudo cat /etc/shadow | jc --shadow -p -r
|
||||
[
|
||||
{
|
||||
"username": "root",
|
||||
"password": "*",
|
||||
"last_changed": "18113",
|
||||
"minimum": "0",
|
||||
"maximum": "99999",
|
||||
"warn": "7",
|
||||
"inactive": "",
|
||||
"expire": ""
|
||||
},
|
||||
{
|
||||
"username": "daemon",
|
||||
"password": "*",
|
||||
"last_changed": "18113",
|
||||
"minimum": "0",
|
||||
"maximum": "99999",
|
||||
"warn": "7",
|
||||
"inactive": "",
|
||||
"expire": ""
|
||||
},
|
||||
{
|
||||
"username": "bin",
|
||||
"password": "*",
|
||||
"last_changed": "18113",
|
||||
"minimum": "0",
|
||||
"maximum": "99999",
|
||||
"warn": "7",
|
||||
"inactive": "",
|
||||
"expire": ""
|
||||
},
|
||||
...
|
||||
]
|
||||
"""
|
||||
import jc.utils
|
||||
|
||||
|
||||
class info():
|
||||
version = '1.0'
|
||||
description = '/etc/shadow file parser'
|
||||
author = 'Kelly Brazil'
|
||||
author_email = 'kellyjonbrazil@gmail.com'
|
||||
# details = 'enter any other details here'
|
||||
|
||||
# compatible options: linux, darwin, cygwin, win32, aix, freebsd
|
||||
compatible = ['linux', 'darwin', 'aix', 'freebsd']
|
||||
|
||||
|
||||
__version__ = info.version
|
||||
|
||||
|
||||
def process(proc_data):
|
||||
"""
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"username": string,
|
||||
"password": string,
|
||||
"last_changed": integer,
|
||||
"minimum": integer,
|
||||
"maximum": integer,
|
||||
"warn": integer,
|
||||
"inactive": integer,
|
||||
"expire": integer
|
||||
}
|
||||
]
|
||||
"""
|
||||
for entry in proc_data:
|
||||
int_list = ['last_changed', 'minimum', 'maximum', 'warn', 'inactive', 'expire']
|
||||
for key in int_list:
|
||||
if key in entry:
|
||||
try:
|
||||
key_int = int(entry[key])
|
||||
entry[key] = key_int
|
||||
except (ValueError):
|
||||
entry[key] = None
|
||||
|
||||
return proc_data
|
||||
|
||||
|
||||
def parse(data, raw=False, quiet=False):
|
||||
"""
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
"""
|
||||
if not quiet:
|
||||
jc.utils.compatibility(__name__, info.compatible)
|
||||
|
||||
raw_output = []
|
||||
cleandata = data.splitlines()
|
||||
|
||||
# Clear any blank lines
|
||||
cleandata = list(filter(None, cleandata))
|
||||
|
||||
if cleandata:
|
||||
for entry in cleandata:
|
||||
if entry.startswith('#'):
|
||||
continue
|
||||
|
||||
output_line = {}
|
||||
fields = entry.split(':')
|
||||
|
||||
output_line['username'] = fields[0]
|
||||
output_line['password'] = fields[1]
|
||||
output_line['last_changed'] = fields[2]
|
||||
output_line['minimum'] = fields[3]
|
||||
output_line['maximum'] = fields[4]
|
||||
output_line['warn'] = fields[5]
|
||||
output_line['inactive'] = fields[6]
|
||||
output_line['expire'] = fields[7]
|
||||
|
||||
raw_output.append(output_line)
|
||||
|
||||
if raw:
|
||||
return raw_output
|
||||
else:
|
||||
return process(raw_output)
|
284
jc/parsers/who.py
Normal file
284
jc/parsers/who.py
Normal file
@ -0,0 +1,284 @@
|
||||
"""jc - JSON CLI output utility who Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --who as the first argument if the piped input is coming from who
|
||||
|
||||
accepts any of the following who options (or no options): -aTH
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
||||
|
||||
Examples:
|
||||
|
||||
$ who -a | jc --who -p
|
||||
[
|
||||
{
|
||||
"event": "reboot",
|
||||
"time": "Feb 7 23:31",
|
||||
"pid": 1
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "-",
|
||||
"tty": "console",
|
||||
"time": "Feb 7 23:32",
|
||||
"idle": "old",
|
||||
"pid": 105
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "+",
|
||||
"tty": "ttys000",
|
||||
"time": "Feb 13 16:44",
|
||||
"idle": ".",
|
||||
"pid": 51217,
|
||||
"comment": "term=0 exit=0"
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "?",
|
||||
"tty": "ttys003",
|
||||
"time": "Feb 28 08:59",
|
||||
"idle": "01:36",
|
||||
"pid": 41402
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "+",
|
||||
"tty": "ttys004",
|
||||
"time": "Mar 1 16:35",
|
||||
"idle": ".",
|
||||
"pid": 15679,
|
||||
"from": "192.168.1.5"
|
||||
}
|
||||
]
|
||||
|
||||
$ who -a | jc --who -p -r
|
||||
[
|
||||
{
|
||||
"event": "reboot",
|
||||
"time": "Feb 7 23:31",
|
||||
"pid": "1"
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "-",
|
||||
"tty": "console",
|
||||
"time": "Feb 7 23:32",
|
||||
"idle": "old",
|
||||
"pid": "105"
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "+",
|
||||
"tty": "ttys000",
|
||||
"time": "Feb 13 16:44",
|
||||
"idle": ".",
|
||||
"pid": "51217",
|
||||
"comment": "term=0 exit=0"
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "?",
|
||||
"tty": "ttys003",
|
||||
"time": "Feb 28 08:59",
|
||||
"idle": "01:36",
|
||||
"pid": "41402"
|
||||
},
|
||||
{
|
||||
"user": "joeuser",
|
||||
"writeable_tty": "+",
|
||||
"tty": "ttys004",
|
||||
"time": "Mar 1 16:35",
|
||||
"idle": ".",
|
||||
"pid": "15679",
|
||||
"from": "192.168.1.5"
|
||||
}
|
||||
]
|
||||
"""
|
||||
import re
|
||||
import jc.utils
|
||||
|
||||
|
||||
class info():
|
||||
version = '1.0'
|
||||
description = 'who command parser'
|
||||
author = 'Kelly Brazil'
|
||||
author_email = 'kellyjonbrazil@gmail.com'
|
||||
# details = 'enter any other details here'
|
||||
|
||||
# compatible options: linux, darwin, cygwin, win32, aix, freebsd
|
||||
compatible = ['linux', 'darwin', 'cygwin', 'aix', 'freebsd']
|
||||
magic_commands = ['who']
|
||||
|
||||
|
||||
__version__ = info.version
|
||||
|
||||
|
||||
def process(proc_data):
|
||||
"""
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"user": string,
|
||||
"event": string,
|
||||
"writeable_tty": string,
|
||||
"tty": string,
|
||||
"time": string,
|
||||
"idle": string,
|
||||
"pid": integer,
|
||||
"from": string,
|
||||
"comment": string
|
||||
}
|
||||
]
|
||||
"""
|
||||
for entry in proc_data:
|
||||
int_list = ['pid']
|
||||
for key in int_list:
|
||||
if key in entry:
|
||||
try:
|
||||
key_int = int(entry[key])
|
||||
entry[key] = key_int
|
||||
except (ValueError):
|
||||
entry[key] = None
|
||||
|
||||
return proc_data
|
||||
|
||||
|
||||
def parse(data, raw=False, quiet=False):
|
||||
"""
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
"""
|
||||
if not quiet:
|
||||
jc.utils.compatibility(__name__, info.compatible)
|
||||
|
||||
raw_output = []
|
||||
cleandata = data.splitlines()
|
||||
|
||||
# Clear any blank lines
|
||||
cleandata = list(filter(None, cleandata))
|
||||
|
||||
if cleandata:
|
||||
for line in cleandata:
|
||||
output_line = {}
|
||||
linedata = line.split()
|
||||
|
||||
# clear headers, if they exist
|
||||
if ''.join(linedata[0:3]) == 'NAMELINETIME' \
|
||||
or ''.join(linedata[0:3]) == 'USERLINEWHEN':
|
||||
linedata.pop(0)
|
||||
continue
|
||||
|
||||
# mac reboot line
|
||||
if linedata[0] == 'reboot':
|
||||
output_line['event'] = 'reboot'
|
||||
output_line['time'] = ' '.join(linedata[2:5])
|
||||
output_line['pid'] = linedata[6]
|
||||
raw_output.append(output_line)
|
||||
continue
|
||||
|
||||
# linux reboot line
|
||||
if ''.join(linedata[0:2]) == 'systemboot':
|
||||
output_line['event'] = 'reboot'
|
||||
output_line['time'] = ' '.join(linedata[2:4])
|
||||
raw_output.append(output_line)
|
||||
continue
|
||||
|
||||
# linux login line
|
||||
if linedata[0] == 'LOGIN':
|
||||
output_line['event'] = 'login'
|
||||
output_line['tty'] = linedata[1]
|
||||
output_line['time'] = ' '.join(linedata[2:4])
|
||||
output_line['pid'] = linedata[4]
|
||||
if len(linedata) > 5:
|
||||
output_line['comment'] = ' '.join(linedata[5:])
|
||||
raw_output.append(output_line)
|
||||
continue
|
||||
|
||||
# linux run-level
|
||||
if linedata[0] == 'run-level':
|
||||
output_line['event'] = ' '.join(linedata[0:2])
|
||||
output_line['time'] = ' '.join(linedata[2:4])
|
||||
raw_output.append(output_line)
|
||||
continue
|
||||
|
||||
# mac run-level (ignore because not enough useful info)
|
||||
if linedata[1] == 'run-level':
|
||||
continue
|
||||
|
||||
# pts lines with no user information
|
||||
if linedata[0].startswith('pts/'):
|
||||
output_line['tty'] = linedata[0]
|
||||
output_line['time'] = ' '.join(linedata[1:3])
|
||||
output_line['pid'] = linedata[3]
|
||||
output_line['comment'] = ' '.join(linedata[4:])
|
||||
raw_output.append(output_line)
|
||||
continue
|
||||
|
||||
# user logins
|
||||
output_line['user'] = linedata.pop(0)
|
||||
|
||||
if linedata[0] in '+-?':
|
||||
output_line['writeable_tty'] = linedata.pop(0)
|
||||
|
||||
output_line['tty'] = linedata.pop(0)
|
||||
|
||||
# mac
|
||||
if re.match(r'[JFMASOND][aepuco][nbrynlgptvc]', linedata[0]):
|
||||
output_line['time'] = ' '.join([linedata.pop(0),
|
||||
linedata.pop(0),
|
||||
linedata.pop(0)])
|
||||
# linux
|
||||
else:
|
||||
output_line['time'] = ' '.join([linedata.pop(0),
|
||||
linedata.pop(0)])
|
||||
|
||||
# if just one more field, then it's the remote IP
|
||||
if len(linedata) == 1:
|
||||
output_line['from'] = linedata[0].replace('(', '').replace(')', '')
|
||||
raw_output.append(output_line)
|
||||
continue
|
||||
|
||||
# extended info: idle
|
||||
if len(linedata) > 0:
|
||||
output_line['idle'] = linedata.pop(0)
|
||||
|
||||
# extended info: pid
|
||||
if len(linedata) > 0:
|
||||
output_line['pid'] = linedata.pop(0)
|
||||
|
||||
# extended info is from
|
||||
if len(linedata) > 0 and linedata[0].startswith('('):
|
||||
output_line['from'] = linedata[0].replace('(', '').replace(')', '')
|
||||
|
||||
# else, extended info is comment
|
||||
elif len(linedata) > 0:
|
||||
output_line['comment'] = ' '.join(linedata)
|
||||
|
||||
raw_output.append(output_line)
|
||||
|
||||
if raw:
|
||||
return raw_output
|
||||
else:
|
||||
return process(raw_output)
|
2
setup.py
2
setup.py
@ -5,7 +5,7 @@ with open('README.md', 'r') as f:
|
||||
|
||||
setuptools.setup(
|
||||
name='jc',
|
||||
version='1.7.5',
|
||||
version='1.8.0',
|
||||
author='Kelly Brazil',
|
||||
author_email='kellyjonbrazil@gmail.com',
|
||||
description='This tool serializes the output of popular command line tools and filetypes to structured JSON output.',
|
||||
|
1
tests/fixtures/centos-7.7/blkid-ip-multi.json
vendored
Normal file
1
tests/fixtures/centos-7.7/blkid-ip-multi.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"uuid": "3klkIj-w1qk-DkJi-0XBJ-y3o7-i2Ac-vHqWBM", "version": "LVM2 001", "type": "LVM2_member", "usage": "raid", "minimum_io_size": 512, "physical_sector_size": 512, "logical_sector_size": 512, "part_entry_scheme": "dos", "part_entry_type": "0x8e", "part_entry_number": 2, "part_entry_offset": 2099200, "part_entry_size": 39843840, "part_entry_disk": "8:0", "device": "/dev/sda2"}, {"uuid": "05d927bb-5875-49e3-ada1-7f46cb31c932", "type": "xfs", "usage": "filesystem", "minimum_io_size": 512, "physical_sector_size": 512, "logical_sector_size": 512, "part_entry_scheme": "dos", "part_entry_type": "0x83", "part_entry_flags": "0x80", "part_entry_number": 1, "part_entry_offset": 2048, "part_entry_size": 2097152, "part_entry_disk": "8:0", "device": "/dev/sda1"}]
|
29
tests/fixtures/centos-7.7/blkid-ip-multi.out
vendored
Normal file
29
tests/fixtures/centos-7.7/blkid-ip-multi.out
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
DEVNAME=/dev/sda2
|
||||
UUID=3klkIj-w1qk-DkJi-0XBJ-y3o7-i2Ac-vHqWBM
|
||||
VERSION=LVM2 001
|
||||
TYPE=LVM2_member
|
||||
USAGE=raid
|
||||
MINIMUM_IO_SIZE=512
|
||||
PHYSICAL_SECTOR_SIZE=512
|
||||
LOGICAL_SECTOR_SIZE=512
|
||||
PART_ENTRY_SCHEME=dos
|
||||
PART_ENTRY_TYPE=0x8e
|
||||
PART_ENTRY_NUMBER=2
|
||||
PART_ENTRY_OFFSET=2099200
|
||||
PART_ENTRY_SIZE=39843840
|
||||
PART_ENTRY_DISK=8:0
|
||||
|
||||
DEVNAME=/dev/sda1
|
||||
UUID=05d927bb-5875-49e3-ada1-7f46cb31c932
|
||||
TYPE=xfs
|
||||
USAGE=filesystem
|
||||
MINIMUM_IO_SIZE=512
|
||||
PHYSICAL_SECTOR_SIZE=512
|
||||
LOGICAL_SECTOR_SIZE=512
|
||||
PART_ENTRY_SCHEME=dos
|
||||
PART_ENTRY_TYPE=0x83
|
||||
PART_ENTRY_FLAGS=0x80
|
||||
PART_ENTRY_NUMBER=1
|
||||
PART_ENTRY_OFFSET=2048
|
||||
PART_ENTRY_SIZE=2097152
|
||||
PART_ENTRY_DISK=8:0
|
1
tests/fixtures/centos-7.7/blkid-ip-udev-multi.json
vendored
Normal file
1
tests/fixtures/centos-7.7/blkid-ip-udev-multi.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"id_fs_uuid": "3klkIj-w1qk-DkJi-0XBJ-y3o7-i2Ac-vHqWBM", "id_fs_uuid_enc": "3klkIj-w1qk-DkJi-0XBJ-y3o7-i2Ac-vHqWBM", "id_fs_version": "LVM2\\x20001", "id_fs_type": "LVM2_member", "id_fs_usage": "raid", "id_iolimit_minimum_io_size": 512, "id_iolimit_physical_sector_size": 512, "id_iolimit_logical_sector_size": 512, "id_part_entry_scheme": "dos", "id_part_entry_type": "0x8e", "id_part_entry_number": 2, "id_part_entry_offset": 2099200, "id_part_entry_size": 39843840, "id_part_entry_disk": "8:0"}, {"id_fs_uuid": "05d927bb-5875-49e3-ada1-7f46cb31c932", "id_fs_uuid_enc": "05d927bb-5875-49e3-ada1-7f46cb31c932", "id_fs_type": "xfs", "id_fs_usage": "filesystem", "id_iolimit_minimum_io_size": 512, "id_iolimit_physical_sector_size": 512, "id_iolimit_logical_sector_size": 512, "id_part_entry_scheme": "dos", "id_part_entry_type": "0x83", "id_part_entry_flags": "0x80", "id_part_entry_number": 1, "id_part_entry_offset": 2048, "id_part_entry_size": 2097152, "id_part_entry_disk": "8:0"}]
|
29
tests/fixtures/centos-7.7/blkid-ip-udev-multi.out
vendored
Normal file
29
tests/fixtures/centos-7.7/blkid-ip-udev-multi.out
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
ID_FS_UUID=3klkIj-w1qk-DkJi-0XBJ-y3o7-i2Ac-vHqWBM
|
||||
ID_FS_UUID_ENC=3klkIj-w1qk-DkJi-0XBJ-y3o7-i2Ac-vHqWBM
|
||||
ID_FS_VERSION=LVM2\x20001
|
||||
ID_FS_TYPE=LVM2_member
|
||||
ID_FS_USAGE=raid
|
||||
ID_IOLIMIT_MINIMUM_IO_SIZE=512
|
||||
ID_IOLIMIT_PHYSICAL_SECTOR_SIZE=512
|
||||
ID_IOLIMIT_LOGICAL_SECTOR_SIZE=512
|
||||
ID_PART_ENTRY_SCHEME=dos
|
||||
ID_PART_ENTRY_TYPE=0x8e
|
||||
ID_PART_ENTRY_NUMBER=2
|
||||
ID_PART_ENTRY_OFFSET=2099200
|
||||
ID_PART_ENTRY_SIZE=39843840
|
||||
ID_PART_ENTRY_DISK=8:0
|
||||
|
||||
ID_FS_UUID=05d927bb-5875-49e3-ada1-7f46cb31c932
|
||||
ID_FS_UUID_ENC=05d927bb-5875-49e3-ada1-7f46cb31c932
|
||||
ID_FS_TYPE=xfs
|
||||
ID_FS_USAGE=filesystem
|
||||
ID_IOLIMIT_MINIMUM_IO_SIZE=512
|
||||
ID_IOLIMIT_PHYSICAL_SECTOR_SIZE=512
|
||||
ID_IOLIMIT_LOGICAL_SECTOR_SIZE=512
|
||||
ID_PART_ENTRY_SCHEME=dos
|
||||
ID_PART_ENTRY_TYPE=0x83
|
||||
ID_PART_ENTRY_FLAGS=0x80
|
||||
ID_PART_ENTRY_NUMBER=1
|
||||
ID_PART_ENTRY_OFFSET=2048
|
||||
ID_PART_ENTRY_SIZE=2097152
|
||||
ID_PART_ENTRY_DISK=8:0
|
1
tests/fixtures/centos-7.7/blkid-ip-udev.json
vendored
Normal file
1
tests/fixtures/centos-7.7/blkid-ip-udev.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"id_fs_uuid": "05d927bb-5875-49e3-ada1-7f46cb31c932", "id_fs_uuid_enc": "05d927bb-5875-49e3-ada1-7f46cb31c932", "id_fs_type": "xfs", "id_fs_usage": "filesystem", "id_iolimit_minimum_io_size": 512, "id_iolimit_physical_sector_size": 512, "id_iolimit_logical_sector_size": 512, "id_part_entry_scheme": "dos", "id_part_entry_type": "0x83", "id_part_entry_flags": "0x80", "id_part_entry_number": 1, "id_part_entry_offset": 2048, "id_part_entry_size": 2097152, "id_part_entry_disk": "8:0"}]
|
14
tests/fixtures/centos-7.7/blkid-ip-udev.out
vendored
Normal file
14
tests/fixtures/centos-7.7/blkid-ip-udev.out
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
ID_FS_UUID=05d927bb-5875-49e3-ada1-7f46cb31c932
|
||||
ID_FS_UUID_ENC=05d927bb-5875-49e3-ada1-7f46cb31c932
|
||||
ID_FS_TYPE=xfs
|
||||
ID_FS_USAGE=filesystem
|
||||
ID_IOLIMIT_MINIMUM_IO_SIZE=512
|
||||
ID_IOLIMIT_PHYSICAL_SECTOR_SIZE=512
|
||||
ID_IOLIMIT_LOGICAL_SECTOR_SIZE=512
|
||||
ID_PART_ENTRY_SCHEME=dos
|
||||
ID_PART_ENTRY_TYPE=0x83
|
||||
ID_PART_ENTRY_FLAGS=0x80
|
||||
ID_PART_ENTRY_NUMBER=1
|
||||
ID_PART_ENTRY_OFFSET=2048
|
||||
ID_PART_ENTRY_SIZE=2097152
|
||||
ID_PART_ENTRY_DISK=8:0
|
1
tests/fixtures/centos-7.7/blkid-sda2.json
vendored
Normal file
1
tests/fixtures/centos-7.7/blkid-sda2.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"device": "/dev/sda2", "uuid": "3klkIj-w1qk-DkJi-0XBJ-y3o7-i2Ac-vHqWBM", "type": "LVM2_member"}]
|
1
tests/fixtures/centos-7.7/blkid-sda2.out
vendored
Normal file
1
tests/fixtures/centos-7.7/blkid-sda2.out
vendored
Normal file
@ -0,0 +1 @@
|
||||
/dev/sda2: UUID="3klkIj-w1qk-DkJi-0XBJ-y3o7-i2Ac-vHqWBM" TYPE="LVM2_member"
|
1
tests/fixtures/centos-7.7/blkid.json
vendored
Normal file
1
tests/fixtures/centos-7.7/blkid.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"device": "/dev/sda1", "uuid": "05d927bb-5875-49e3-ada1-7f46cb31c932", "type": "xfs"}, {"device": "/dev/sda2", "uuid": "3klkIj-w1qk-DkJi-0XBJ-y3o7-i2Ac-vHqWBM", "type": "LVM2_member"}, {"device": "/dev/mapper/centos-root", "uuid": "07d718ef-950c-4e5b-98e0-42a1147b77d9", "type": "xfs"}, {"device": "/dev/mapper/centos-swap", "uuid": "615eb89d-bcbf-46ad-80e3-c483ef5c931f", "type": "swap"}]
|
4
tests/fixtures/centos-7.7/blkid.out
vendored
Normal file
4
tests/fixtures/centos-7.7/blkid.out
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/dev/sda1: UUID="05d927bb-5875-49e3-ada1-7f46cb31c932" TYPE="xfs"
|
||||
/dev/sda2: UUID="3klkIj-w1qk-DkJi-0XBJ-y3o7-i2Ac-vHqWBM" TYPE="LVM2_member"
|
||||
/dev/mapper/centos-root: UUID="07d718ef-950c-4e5b-98e0-42a1147b77d9" TYPE="xfs"
|
||||
/dev/mapper/centos-swap: UUID="615eb89d-bcbf-46ad-80e3-c483ef5c931f" TYPE="swap"
|
1
tests/fixtures/centos-7.7/group.json
vendored
Normal file
1
tests/fixtures/centos-7.7/group.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"group_name": "root", "password": "x", "gid": 0, "members": []}, {"group_name": "bin", "password": "x", "gid": 1, "members": []}, {"group_name": "daemon", "password": "x", "gid": 2, "members": []}, {"group_name": "sys", "password": "x", "gid": 3, "members": []}, {"group_name": "adm", "password": "x", "gid": 4, "members": []}, {"group_name": "tty", "password": "x", "gid": 5, "members": []}, {"group_name": "disk", "password": "x", "gid": 6, "members": []}, {"group_name": "lp", "password": "x", "gid": 7, "members": []}, {"group_name": "mem", "password": "x", "gid": 8, "members": []}, {"group_name": "kmem", "password": "x", "gid": 9, "members": []}, {"group_name": "wheel", "password": "x", "gid": 10, "members": ["joeuser"]}, {"group_name": "cdrom", "password": "x", "gid": 11, "members": []}, {"group_name": "mail", "password": "x", "gid": 12, "members": ["postfix"]}, {"group_name": "man", "password": "x", "gid": 15, "members": []}, {"group_name": "dialout", "password": "x", "gid": 18, "members": []}, {"group_name": "floppy", "password": "x", "gid": 19, "members": []}, {"group_name": "games", "password": "x", "gid": 20, "members": []}, {"group_name": "tape", "password": "x", "gid": 33, "members": []}, {"group_name": "video", "password": "x", "gid": 39, "members": []}, {"group_name": "ftp", "password": "x", "gid": 50, "members": []}, {"group_name": "lock", "password": "x", "gid": 54, "members": []}, {"group_name": "audio", "password": "x", "gid": 63, "members": []}, {"group_name": "nobody", "password": "x", "gid": 99, "members": []}, {"group_name": "users", "password": "x", "gid": 100, "members": []}, {"group_name": "utmp", "password": "x", "gid": 22, "members": []}, {"group_name": "utempter", "password": "x", "gid": 35, "members": []}, {"group_name": "input", "password": "x", "gid": 999, "members": []}, {"group_name": "systemd-journal", "password": "x", "gid": 190, "members": []}, {"group_name": "systemd-network", "password": "x", "gid": 192, "members": []}, {"group_name": "dbus", "password": "x", "gid": 81, "members": []}, {"group_name": "polkitd", "password": "x", "gid": 998, "members": []}, {"group_name": "ssh_keys", "password": "x", "gid": 997, "members": []}, {"group_name": "sshd", "password": "x", "gid": 74, "members": []}, {"group_name": "postdrop", "password": "x", "gid": 90, "members": []}, {"group_name": "postfix", "password": "x", "gid": 89, "members": []}, {"group_name": "chrony", "password": "x", "gid": 996, "members": []}, {"group_name": "joeuser", "password": "x", "gid": 1000, "members": ["joeuser"]}, {"group_name": "cgred", "password": "x", "gid": 995, "members": []}, {"group_name": "dockerroot", "password": "x", "gid": 994, "members": []}]
|
39
tests/fixtures/centos-7.7/group.out
vendored
Normal file
39
tests/fixtures/centos-7.7/group.out
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
root:x:0:
|
||||
bin:x:1:
|
||||
daemon:x:2:
|
||||
sys:x:3:
|
||||
adm:x:4:
|
||||
tty:x:5:
|
||||
disk:x:6:
|
||||
lp:x:7:
|
||||
mem:x:8:
|
||||
kmem:x:9:
|
||||
wheel:x:10:joeuser
|
||||
cdrom:x:11:
|
||||
mail:x:12:postfix
|
||||
man:x:15:
|
||||
dialout:x:18:
|
||||
floppy:x:19:
|
||||
games:x:20:
|
||||
tape:x:33:
|
||||
video:x:39:
|
||||
ftp:x:50:
|
||||
lock:x:54:
|
||||
audio:x:63:
|
||||
nobody:x:99:
|
||||
users:x:100:
|
||||
utmp:x:22:
|
||||
utempter:x:35:
|
||||
input:x:999:
|
||||
systemd-journal:x:190:
|
||||
systemd-network:x:192:
|
||||
dbus:x:81:
|
||||
polkitd:x:998:
|
||||
ssh_keys:x:997:
|
||||
sshd:x:74:
|
||||
postdrop:x:90:
|
||||
postfix:x:89:
|
||||
chrony:x:996:
|
||||
joeuser:x:1000:joeuser
|
||||
cgred:x:995:
|
||||
dockerroot:x:994:
|
1
tests/fixtures/centos-7.7/gshadow.json
vendored
Normal file
1
tests/fixtures/centos-7.7/gshadow.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"group_name": "root", "password": "", "administrators": [], "members": []}, {"group_name": "bin", "password": "", "administrators": [], "members": []}, {"group_name": "daemon", "password": "", "administrators": [], "members": []}, {"group_name": "sys", "password": "", "administrators": [], "members": []}, {"group_name": "adm", "password": "", "administrators": [], "members": []}, {"group_name": "tty", "password": "", "administrators": [], "members": []}, {"group_name": "disk", "password": "", "administrators": [], "members": []}, {"group_name": "lp", "password": "", "administrators": [], "members": []}, {"group_name": "mem", "password": "", "administrators": [], "members": []}, {"group_name": "kmem", "password": "", "administrators": [], "members": []}, {"group_name": "wheel", "password": "", "administrators": [], "members": ["joeuser"]}, {"group_name": "cdrom", "password": "", "administrators": [], "members": []}, {"group_name": "mail", "password": "", "administrators": [], "members": ["postfix"]}, {"group_name": "man", "password": "", "administrators": [], "members": []}, {"group_name": "dialout", "password": "", "administrators": [], "members": []}, {"group_name": "floppy", "password": "", "administrators": [], "members": []}, {"group_name": "games", "password": "", "administrators": [], "members": []}, {"group_name": "tape", "password": "", "administrators": [], "members": []}, {"group_name": "video", "password": "", "administrators": [], "members": []}, {"group_name": "ftp", "password": "", "administrators": [], "members": []}, {"group_name": "lock", "password": "", "administrators": [], "members": []}, {"group_name": "audio", "password": "", "administrators": [], "members": []}, {"group_name": "nobody", "password": "", "administrators": [], "members": []}, {"group_name": "users", "password": "", "administrators": [], "members": []}, {"group_name": "utmp", "password": "!", "administrators": [], "members": []}, {"group_name": "utempter", "password": "!", "administrators": [], "members": []}, {"group_name": "input", "password": "!", "administrators": [], "members": []}, {"group_name": "systemd-journal", "password": "!", "administrators": [], "members": []}, {"group_name": "systemd-network", "password": "!", "administrators": [], "members": []}, {"group_name": "dbus", "password": "!", "administrators": [], "members": []}, {"group_name": "polkitd", "password": "!", "administrators": [], "members": []}, {"group_name": "ssh_keys", "password": "!", "administrators": [], "members": []}, {"group_name": "sshd", "password": "!", "administrators": [], "members": []}, {"group_name": "postdrop", "password": "!", "administrators": [], "members": []}, {"group_name": "postfix", "password": "!", "administrators": [], "members": []}, {"group_name": "chrony", "password": "!", "administrators": [], "members": []}, {"group_name": "joeuser", "password": "!!", "administrators": [], "members": ["joeuser"]}, {"group_name": "cgred", "password": "!", "administrators": [], "members": []}, {"group_name": "dockerroot", "password": "!", "administrators": [], "members": []}]
|
39
tests/fixtures/centos-7.7/gshadow.out
vendored
Normal file
39
tests/fixtures/centos-7.7/gshadow.out
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
root:::
|
||||
bin:::
|
||||
daemon:::
|
||||
sys:::
|
||||
adm:::
|
||||
tty:::
|
||||
disk:::
|
||||
lp:::
|
||||
mem:::
|
||||
kmem:::
|
||||
wheel:::joeuser
|
||||
cdrom:::
|
||||
mail:::postfix
|
||||
man:::
|
||||
dialout:::
|
||||
floppy:::
|
||||
games:::
|
||||
tape:::
|
||||
video:::
|
||||
ftp:::
|
||||
lock:::
|
||||
audio:::
|
||||
nobody:::
|
||||
users:::
|
||||
utmp:!::
|
||||
utempter:!::
|
||||
input:!::
|
||||
systemd-journal:!::
|
||||
systemd-network:!::
|
||||
dbus:!::
|
||||
polkitd:!::
|
||||
ssh_keys:!::
|
||||
sshd:!::
|
||||
postdrop:!::
|
||||
postfix:!::
|
||||
chrony:!::
|
||||
joeuser:!!::joeuser
|
||||
cgred:!::
|
||||
dockerroot:!::
|
1
tests/fixtures/centos-7.7/last-w.json
vendored
Normal file
1
tests/fixtures/centos-7.7/last-w.json
vendored
Normal file
File diff suppressed because one or more lines are too long
69
tests/fixtures/centos-7.7/last-w.out
vendored
Normal file
69
tests/fixtures/centos-7.7/last-w.out
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
kbrazil ttyS0 Fri Feb 28 13:49 still logged in
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Fri Feb 28 12:56 - 14:54 (01:58)
|
||||
kbrazil ttyS0 Thu Feb 27 16:01 - crash (20:54)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Thu Feb 27 15:51 - 14:54 (23:02)
|
||||
kbrazil ttyS0 Thu Feb 27 10:50 - crash (05:01)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Wed Feb 26 20:05 - 14:54 (1+18:49)
|
||||
kbrazil ttyS0 Thu Feb 20 14:42 - crash (6+05:23)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Thu Feb 20 14:41 - 14:54 (8+00:12)
|
||||
kbrazil ttyS0 Mon Feb 17 17:48 - crash (2+20:52)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Mon Feb 17 17:48 - 14:54 (10+21:06)
|
||||
kbrazil ttyS0 Thu Feb 13 16:44 - crash (4+01:03)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Thu Feb 13 16:44 - 14:54 (14+22:10)
|
||||
kbrazil ttyS0 Wed Feb 5 14:23 - crash (8+02:20)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Wed Feb 5 11:43 - 14:54 (23+03:11)
|
||||
kbrazil ttyS0 Tue Feb 4 14:28 - crash (21:15)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Tue Feb 4 01:28 - 14:54 (24+13:26)
|
||||
kbrazil ttyS0 Mon Jan 13 17:28 - crash (21+07:59)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Mon Jan 13 16:16 - 14:54 (45+22:38)
|
||||
kbrazil ttyS0 Mon Dec 16 11:15 - crash (28+05:01)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Mon Dec 16 11:14 - 14:54 (74+03:40)
|
||||
kbrazil ttyS0 Wed Dec 4 21:41 - crash (11+13:33)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Wed Dec 4 21:40 - 14:54 (85+17:13)
|
||||
kbrazil pts/1 Sat Nov 16 14:40 - 14:40 (00:00)
|
||||
kbrazil pts/1 Sat Nov 16 14:39 - 14:39 (00:00)
|
||||
kbrazil pts/0 localhost Tue Nov 12 07:19 - crash (22+14:21)
|
||||
kbrazil ttyS0 Tue Nov 12 07:18 - crash (22+14:22)
|
||||
kbrazil pts/0 localhost Sun Nov 10 08:21 - 15:22 (1+07:01)
|
||||
kbrazil ttyS0 Sat Nov 9 10:34 - 07:16 (2+20:42)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Sat Nov 9 10:34 - 14:54 (111+04:20)
|
||||
kbrazil tty1 Fri Nov 8 07:49 - crash (1+02:45)
|
||||
kbrazil pts/0 192.168.71.1 Fri Nov 8 06:29 - crash (1+04:04)
|
||||
kbrazil ttyS0 Fri Nov 8 06:24 - crash (1+04:09)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Fri Nov 8 06:14 - 14:54 (112+08:40)
|
||||
kbrazil tty1 Sun Nov 3 12:20 - crash (4+17:54)
|
||||
kbrazil ttyS0 Sun Nov 3 11:04 - 11:05 (00:01)
|
||||
kbrazil pts/0 192.168.71.1 Sat Nov 2 19:26 - crash (5+11:47)
|
||||
kbrazil ttyS0 Fri Nov 1 15:14 - 11:03 (1+20:49)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Fri Nov 1 15:13 - 14:54 (119+00:41)
|
||||
kbrazil ttyS0 Fri Nov 1 11:16 - 11:36 (00:20)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Fri Nov 1 06:00 - 11:36 (05:36)
|
||||
kbrazil ttyS0 Tue Oct 29 18:17 - crash (2+11:43)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Tue Oct 29 18:16 - 11:36 (2+17:19)
|
||||
kbrazil pts/0 192.168.71.1 Sat Oct 26 09:53 - 15:13 (05:19)
|
||||
kbrazil ttyS0 Fri Oct 25 18:22 - crash (3+23:54)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Fri Oct 25 18:21 - 11:36 (6+17:14)
|
||||
kbrazil ttyS0 Fri Oct 25 17:14 - 18:21 (01:06)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Fri Oct 25 17:13 - 11:36 (6+18:22)
|
||||
kbrazil ttyS0 Fri Oct 25 15:43 - 17:13 (01:29)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Fri Oct 25 13:29 - 17:13 (03:44)
|
||||
kbrazil ttyS0 Mon Oct 21 13:19 - 19:22 (2+06:03)
|
||||
reboot system boot 3.10.0-1062.1.2.el7.x86_64 Mon Oct 21 13:17 - 19:22 (2+06:05)
|
||||
kbrazil ttyS0 Wed Oct 16 03:23 - crash (5+09:54)
|
||||
kbrazil ttyS0 Tue Oct 15 16:49 - 03:23 (10:34)
|
||||
kbrazil ttyS0 Tue Oct 15 10:39 - 16:48 (06:09)
|
||||
reboot system boot 3.10.0-957.27.2.el7.x86_64 Tue Oct 15 10:39 - 19:22 (8+08:43)
|
||||
kbrazil ttyS0 Thu Aug 15 16:05 - 16:05 (00:00)
|
||||
reboot system boot 3.10.0-957.27.2.el7.x86_64 Thu Aug 15 16:05 - 16:05 (00:00)
|
||||
reboot system boot 3.10.0-957.27.2.el7.x86_64 Thu Aug 15 16:00 - 16:05 (00:05)
|
||||
kbrazil ttyS0 Thu Aug 15 14:25 - crash (01:35)
|
||||
reboot system boot 3.10.0-957.27.2.el7.x86_64 Thu Aug 15 14:24 - 16:05 (01:41)
|
||||
kbrazil ttyS0 Thu Aug 15 11:58 - crash (02:25)
|
||||
reboot system boot 3.10.0-957.el7.x86_64 Thu Aug 15 11:58 - 16:05 (04:07)
|
||||
kbrazil ttyS0 Thu Aug 15 11:57 - 11:57 (00:00)
|
||||
reboot system boot 3.10.0-957.el7.x86_64 Thu Aug 15 11:57 - 16:05 (04:08)
|
||||
kbrazil pts/0 192.168.71.1 Thu Aug 15 10:58 - 11:56 (00:58)
|
||||
root tty1 Thu Aug 15 10:57 - 11:56 (00:59)
|
||||
reboot system boot 3.10.0-957.el7.x86_64 Thu Aug 15 10:57 - 11:56 (00:59)
|
||||
|
||||
wtmp begins Thu Aug 15 10:57:06 2019
|
1
tests/fixtures/centos-7.7/last.json
vendored
Normal file
1
tests/fixtures/centos-7.7/last.json
vendored
Normal file
File diff suppressed because one or more lines are too long
69
tests/fixtures/centos-7.7/last.out
vendored
Normal file
69
tests/fixtures/centos-7.7/last.out
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
kbrazil ttyS0 Fri Feb 28 13:49 still logged in
|
||||
reboot system boot 3.10.0-1062.1.2. Fri Feb 28 12:56 - 14:52 (01:56)
|
||||
kbrazil ttyS0 Thu Feb 27 16:01 - crash (20:54)
|
||||
reboot system boot 3.10.0-1062.1.2. Thu Feb 27 15:51 - 14:52 (23:01)
|
||||
kbrazil ttyS0 Thu Feb 27 10:50 - crash (05:01)
|
||||
reboot system boot 3.10.0-1062.1.2. Wed Feb 26 20:05 - 14:52 (1+18:47)
|
||||
kbrazil ttyS0 Thu Feb 20 14:42 - crash (6+05:23)
|
||||
reboot system boot 3.10.0-1062.1.2. Thu Feb 20 14:41 - 14:52 (8+00:11)
|
||||
kbrazil ttyS0 Mon Feb 17 17:48 - crash (2+20:52)
|
||||
reboot system boot 3.10.0-1062.1.2. Mon Feb 17 17:48 - 14:52 (10+21:04)
|
||||
kbrazil ttyS0 Thu Feb 13 16:44 - crash (4+01:03)
|
||||
reboot system boot 3.10.0-1062.1.2. Thu Feb 13 16:44 - 14:52 (14+22:08)
|
||||
kbrazil ttyS0 Wed Feb 5 14:23 - crash (8+02:20)
|
||||
reboot system boot 3.10.0-1062.1.2. Wed Feb 5 11:43 - 14:52 (23+03:09)
|
||||
kbrazil ttyS0 Tue Feb 4 14:28 - crash (21:15)
|
||||
reboot system boot 3.10.0-1062.1.2. Tue Feb 4 01:28 - 14:52 (24+13:24)
|
||||
kbrazil ttyS0 Mon Jan 13 17:28 - crash (21+07:59)
|
||||
reboot system boot 3.10.0-1062.1.2. Mon Jan 13 16:16 - 14:52 (45+22:36)
|
||||
kbrazil ttyS0 Mon Dec 16 11:15 - crash (28+05:01)
|
||||
reboot system boot 3.10.0-1062.1.2. Mon Dec 16 11:14 - 14:52 (74+03:38)
|
||||
kbrazil ttyS0 Wed Dec 4 21:41 - crash (11+13:33)
|
||||
reboot system boot 3.10.0-1062.1.2. Wed Dec 4 21:40 - 14:52 (85+17:12)
|
||||
kbrazil pts/1 Sat Nov 16 14:40 - 14:40 (00:00)
|
||||
kbrazil pts/1 Sat Nov 16 14:39 - 14:39 (00:00)
|
||||
kbrazil pts/0 localhost Tue Nov 12 07:19 - crash (22+14:21)
|
||||
kbrazil ttyS0 Tue Nov 12 07:18 - crash (22+14:22)
|
||||
kbrazil pts/0 localhost Sun Nov 10 08:21 - 15:22 (1+07:01)
|
||||
kbrazil ttyS0 Sat Nov 9 10:34 - 07:16 (2+20:42)
|
||||
reboot system boot 3.10.0-1062.1.2. Sat Nov 9 10:34 - 14:52 (111+04:18)
|
||||
kbrazil tty1 Fri Nov 8 07:49 - crash (1+02:45)
|
||||
kbrazil pts/0 192.168.71.1 Fri Nov 8 06:29 - crash (1+04:04)
|
||||
kbrazil ttyS0 Fri Nov 8 06:24 - crash (1+04:09)
|
||||
reboot system boot 3.10.0-1062.1.2. Fri Nov 8 06:14 - 14:52 (112+08:38)
|
||||
kbrazil tty1 Sun Nov 3 12:20 - crash (4+17:54)
|
||||
kbrazil ttyS0 Sun Nov 3 11:04 - 11:05 (00:01)
|
||||
kbrazil pts/0 192.168.71.1 Sat Nov 2 19:26 - crash (5+11:47)
|
||||
kbrazil ttyS0 Fri Nov 1 15:14 - 11:03 (1+20:49)
|
||||
reboot system boot 3.10.0-1062.1.2. Fri Nov 1 15:13 - 14:52 (119+00:39)
|
||||
kbrazil ttyS0 Fri Nov 1 11:16 - 11:36 (00:20)
|
||||
reboot system boot 3.10.0-1062.1.2. Fri Nov 1 06:00 - 11:36 (05:36)
|
||||
kbrazil ttyS0 Tue Oct 29 18:17 - crash (2+11:43)
|
||||
reboot system boot 3.10.0-1062.1.2. Tue Oct 29 18:16 - 11:36 (2+17:19)
|
||||
kbrazil pts/0 192.168.71.1 Sat Oct 26 09:53 - 15:13 (05:19)
|
||||
kbrazil ttyS0 Fri Oct 25 18:22 - crash (3+23:54)
|
||||
reboot system boot 3.10.0-1062.1.2. Fri Oct 25 18:21 - 11:36 (6+17:14)
|
||||
kbrazil ttyS0 Fri Oct 25 17:14 - 18:21 (01:06)
|
||||
reboot system boot 3.10.0-1062.1.2. Fri Oct 25 17:13 - 11:36 (6+18:22)
|
||||
kbrazil ttyS0 Fri Oct 25 15:43 - 17:13 (01:29)
|
||||
reboot system boot 3.10.0-1062.1.2. Fri Oct 25 13:29 - 17:13 (03:44)
|
||||
kbrazil ttyS0 Mon Oct 21 13:19 - 19:22 (2+06:03)
|
||||
reboot system boot 3.10.0-1062.1.2. Mon Oct 21 13:17 - 19:22 (2+06:05)
|
||||
kbrazil ttyS0 Wed Oct 16 03:23 - crash (5+09:54)
|
||||
kbrazil ttyS0 Tue Oct 15 16:49 - 03:23 (10:34)
|
||||
kbrazil ttyS0 Tue Oct 15 10:39 - 16:48 (06:09)
|
||||
reboot system boot 3.10.0-957.27.2. Tue Oct 15 10:39 - 19:22 (8+08:43)
|
||||
kbrazil ttyS0 Thu Aug 15 16:05 - 16:05 (00:00)
|
||||
reboot system boot 3.10.0-957.27.2. Thu Aug 15 16:05 - 16:05 (00:00)
|
||||
reboot system boot 3.10.0-957.27.2. Thu Aug 15 16:00 - 16:05 (00:05)
|
||||
kbrazil ttyS0 Thu Aug 15 14:25 - crash (01:35)
|
||||
reboot system boot 3.10.0-957.27.2. Thu Aug 15 14:24 - 16:05 (01:41)
|
||||
kbrazil ttyS0 Thu Aug 15 11:58 - crash (02:25)
|
||||
reboot system boot 3.10.0-957.el7.x Thu Aug 15 11:58 - 16:05 (04:07)
|
||||
kbrazil ttyS0 Thu Aug 15 11:57 - 11:57 (00:00)
|
||||
reboot system boot 3.10.0-957.el7.x Thu Aug 15 11:57 - 16:05 (04:08)
|
||||
kbrazil pts/0 192.168.71.1 Thu Aug 15 10:58 - 11:56 (00:58)
|
||||
root tty1 Thu Aug 15 10:57 - 11:56 (00:59)
|
||||
reboot system boot 3.10.0-957.el7.x Thu Aug 15 10:57 - 11:56 (00:59)
|
||||
|
||||
wtmp begins Thu Aug 15 10:57:06 2019
|
1
tests/fixtures/centos-7.7/lastb.json
vendored
Normal file
1
tests/fixtures/centos-7.7/lastb.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Fri Feb 28 13:49", "logout": "13:49", "duration": "00:00"}, {"user": "kbrazil", "tty": "ssh:notty", "hostname": "192.168.71.1", "login": "Thu Feb 27 10:13", "logout": "10:13", "duration": "00:00"}, {"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Thu Feb 20 14:41", "logout": "14:41", "duration": "00:00"}, {"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Mon Feb 17 17:48", "logout": "17:48", "duration": "00:00"}]
|
6
tests/fixtures/centos-7.7/lastb.out
vendored
Normal file
6
tests/fixtures/centos-7.7/lastb.out
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
kbrazil ttyS0 Fri Feb 28 13:49 - 13:49 (00:00)
|
||||
kbrazil ssh:notty 192.168.71.1 Thu Feb 27 10:13 - 10:13 (00:00)
|
||||
kbrazil ttyS0 Thu Feb 20 14:41 - 14:41 (00:00)
|
||||
kbrazil ttyS0 Mon Feb 17 17:48 - 17:48 (00:00)
|
||||
|
||||
btmp begins Mon Feb 17 17:48:53 2020
|
1
tests/fixtures/centos-7.7/passwd.json
vendored
Normal file
1
tests/fixtures/centos-7.7/passwd.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"username": "root", "password": "x", "uid": 0, "gid": 0, "comment": "root", "home": "/root", "shell": "/bin/bash"}, {"username": "bin", "password": "x", "uid": 1, "gid": 1, "comment": "bin", "home": "/bin", "shell": "/sbin/nologin"}, {"username": "daemon", "password": "x", "uid": 2, "gid": 2, "comment": "daemon", "home": "/sbin", "shell": "/sbin/nologin"}, {"username": "adm", "password": "x", "uid": 3, "gid": 4, "comment": "adm", "home": "/var/adm", "shell": "/sbin/nologin"}, {"username": "lp", "password": "x", "uid": 4, "gid": 7, "comment": "lp", "home": "/var/spool/lpd", "shell": "/sbin/nologin"}, {"username": "sync", "password": "x", "uid": 5, "gid": 0, "comment": "sync", "home": "/sbin", "shell": "/bin/sync"}, {"username": "shutdown", "password": "x", "uid": 6, "gid": 0, "comment": "shutdown", "home": "/sbin", "shell": "/sbin/shutdown"}, {"username": "halt", "password": "x", "uid": 7, "gid": 0, "comment": "halt", "home": "/sbin", "shell": "/sbin/halt"}, {"username": "mail", "password": "x", "uid": 8, "gid": 12, "comment": "mail", "home": "/var/spool/mail", "shell": "/sbin/nologin"}, {"username": "operator", "password": "x", "uid": 11, "gid": 0, "comment": "operator", "home": "/root", "shell": "/sbin/nologin"}, {"username": "games", "password": "x", "uid": 12, "gid": 100, "comment": "games", "home": "/usr/games", "shell": "/sbin/nologin"}, {"username": "ftp", "password": "x", "uid": 14, "gid": 50, "comment": "FTP User", "home": "/var/ftp", "shell": "/sbin/nologin"}, {"username": "nobody", "password": "x", "uid": 99, "gid": 99, "comment": "Nobody", "home": "/", "shell": "/sbin/nologin"}, {"username": "systemd-network", "password": "x", "uid": 192, "gid": 192, "comment": "systemd Network Management", "home": "/", "shell": "/sbin/nologin"}, {"username": "dbus", "password": "x", "uid": 81, "gid": 81, "comment": "System message bus", "home": "/", "shell": "/sbin/nologin"}, {"username": "polkitd", "password": "x", "uid": 999, "gid": 998, "comment": "User for polkitd", "home": "/", "shell": "/sbin/nologin"}, {"username": "sshd", "password": "x", "uid": 74, "gid": 74, "comment": "Privilege-separated SSH", "home": "/var/empty/sshd", "shell": "/sbin/nologin"}, {"username": "postfix", "password": "x", "uid": 89, "gid": 89, "comment": "", "home": "/var/spool/postfix", "shell": "/sbin/nologin"}, {"username": "chrony", "password": "x", "uid": 998, "gid": 996, "comment": "", "home": "/var/lib/chrony", "shell": "/sbin/nologin"}, {"username": "joeuser", "password": "x", "uid": 1000, "gid": 1000, "comment": "joeuser", "home": "/home/joeuser", "shell": "/bin/bash"}, {"username": "dockerroot", "password": "x", "uid": 997, "gid": 994, "comment": "Docker User", "home": "/var/lib/docker", "shell": "/sbin/nologin"}]
|
21
tests/fixtures/centos-7.7/passwd.out
vendored
Normal file
21
tests/fixtures/centos-7.7/passwd.out
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
root:x:0:0:root:/root:/bin/bash
|
||||
bin:x:1:1:bin:/bin:/sbin/nologin
|
||||
daemon:x:2:2:daemon:/sbin:/sbin/nologin
|
||||
adm:x:3:4:adm:/var/adm:/sbin/nologin
|
||||
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
|
||||
sync:x:5:0:sync:/sbin:/bin/sync
|
||||
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
|
||||
halt:x:7:0:halt:/sbin:/sbin/halt
|
||||
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
|
||||
operator:x:11:0:operator:/root:/sbin/nologin
|
||||
games:x:12:100:games:/usr/games:/sbin/nologin
|
||||
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
|
||||
nobody:x:99:99:Nobody:/:/sbin/nologin
|
||||
systemd-network:x:192:192:systemd Network Management:/:/sbin/nologin
|
||||
dbus:x:81:81:System message bus:/:/sbin/nologin
|
||||
polkitd:x:999:998:User for polkitd:/:/sbin/nologin
|
||||
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
|
||||
postfix:x:89:89::/var/spool/postfix:/sbin/nologin
|
||||
chrony:x:998:996::/var/lib/chrony:/sbin/nologin
|
||||
joeuser:x:1000:1000:joeuser:/home/joeuser:/bin/bash
|
||||
dockerroot:x:997:994:Docker User:/var/lib/docker:/sbin/nologin
|
1
tests/fixtures/centos-7.7/shadow.json
vendored
Normal file
1
tests/fixtures/centos-7.7/shadow.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"username": "root", "password": "$6$27lBiByDWdiM7lvJ$ulWkJyfKNbqDnrIKPLhUCGanKcS5TdY3ZasKMR/v2dl0mHn0s28LcxTXMqqOV0d6tww0U4gmgYZezgAf/F8Pz.", "last_changed": null, "minimum": 0, "maximum": 99999, "warn": 7, "inactive": null, "expire": null}, {"username": "bin", "password": "*", "last_changed": 17834, "minimum": 0, "maximum": 99999, "warn": 7, "inactive": null, "expire": null}, {"username": "daemon", "password": "*", "last_changed": 17834, "minimum": 0, "maximum": 99999, "warn": 7, "inactive": null, "expire": null}, {"username": "adm", "password": "*", "last_changed": 17834, "minimum": 0, "maximum": 99999, "warn": 7, "inactive": null, "expire": null}, {"username": "lp", "password": "*", "last_changed": 17834, "minimum": 0, "maximum": 99999, "warn": 7, "inactive": null, "expire": null}, {"username": "sync", "password": "*", "last_changed": 17834, "minimum": 0, "maximum": 99999, "warn": 7, "inactive": null, "expire": null}, {"username": "shutdown", "password": "*", "last_changed": 17834, "minimum": 0, "maximum": 99999, "warn": 7, "inactive": null, "expire": null}, {"username": "halt", "password": "*", "last_changed": 17834, "minimum": 0, "maximum": 99999, "warn": 7, "inactive": null, "expire": null}, {"username": "mail", "password": "*", "last_changed": 17834, "minimum": 0, "maximum": 99999, "warn": 7, "inactive": null, "expire": null}, {"username": "operator", "password": "*", "last_changed": 17834, "minimum": 0, "maximum": 99999, "warn": 7, "inactive": null, "expire": null}, {"username": "games", "password": "*", "last_changed": 17834, "minimum": 0, "maximum": 99999, "warn": 7, "inactive": null, "expire": null}, {"username": "ftp", "password": "*", "last_changed": 17834, "minimum": 0, "maximum": 99999, "warn": 7, "inactive": null, "expire": null}, {"username": "nobody", "password": "*", "last_changed": 17834, "minimum": 0, "maximum": 99999, "warn": 7, "inactive": null, "expire": null}, {"username": "systemd-network", "password": "!!", "last_changed": 18123, "minimum": null, "maximum": null, "warn": null, "inactive": null, "expire": null}, {"username": "dbus", "password": "!!", "last_changed": 18123, "minimum": null, "maximum": null, "warn": null, "inactive": null, "expire": null}, {"username": "polkitd", "password": "!!", "last_changed": 18123, "minimum": null, "maximum": null, "warn": null, "inactive": null, "expire": null}, {"username": "sshd", "password": "!!", "last_changed": 18123, "minimum": null, "maximum": null, "warn": null, "inactive": null, "expire": null}, {"username": "postfix", "password": "!!", "last_changed": 18123, "minimum": null, "maximum": null, "warn": null, "inactive": null, "expire": null}, {"username": "chrony", "password": "!!", "last_changed": 18123, "minimum": null, "maximum": null, "warn": null, "inactive": null, "expire": null}, {"username": "joeuser", "password": "$6$sR1OEFM1KVuMeBUt$NhanSmm91.BspCYlMtrjYhc71FElgaCP7uSUAwhtQVFGcYa7.8VPMmRce77yS8FLy6XSYBtcCeZCJhnLOicc/.", "last_changed": null, "minimum": 0, "maximum": 99999, "warn": 7, "inactive": null, "expire": null}, {"username": "dockerroot", "password": "!!", "last_changed": 18123, "minimum": null, "maximum": null, "warn": null, "inactive": null, "expire": null}]
|
21
tests/fixtures/centos-7.7/shadow.out
vendored
Normal file
21
tests/fixtures/centos-7.7/shadow.out
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
root:$6$27lBiByDWdiM7lvJ$ulWkJyfKNbqDnrIKPLhUCGanKcS5TdY3ZasKMR/v2dl0mHn0s28LcxTXMqqOV0d6tww0U4gmgYZezgAf/F8Pz.::0:99999:7:::
|
||||
bin:*:17834:0:99999:7:::
|
||||
daemon:*:17834:0:99999:7:::
|
||||
adm:*:17834:0:99999:7:::
|
||||
lp:*:17834:0:99999:7:::
|
||||
sync:*:17834:0:99999:7:::
|
||||
shutdown:*:17834:0:99999:7:::
|
||||
halt:*:17834:0:99999:7:::
|
||||
mail:*:17834:0:99999:7:::
|
||||
operator:*:17834:0:99999:7:::
|
||||
games:*:17834:0:99999:7:::
|
||||
ftp:*:17834:0:99999:7:::
|
||||
nobody:*:17834:0:99999:7:::
|
||||
systemd-network:!!:18123::::::
|
||||
dbus:!!:18123::::::
|
||||
polkitd:!!:18123::::::
|
||||
sshd:!!:18123::::::
|
||||
postfix:!!:18123::::::
|
||||
chrony:!!:18123::::::
|
||||
joeuser:$6$sR1OEFM1KVuMeBUt$NhanSmm91.BspCYlMtrjYhc71FElgaCP7uSUAwhtQVFGcYa7.8VPMmRce77yS8FLy6XSYBtcCeZCJhnLOicc/.::0:99999:7:::
|
||||
dockerroot:!!:18123::::::
|
1
tests/fixtures/centos-7.7/who-a.json
vendored
Normal file
1
tests/fixtures/centos-7.7/who-a.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"event": "reboot", "time": "2020-02-29 12:13"}, {"event": "login", "tty": "tty1", "time": "2020-02-29 12:13", "pid": 841, "comment": "id=tty1"}, {"user": "kbrazil", "writeable_tty": "+", "tty": "ttyS0", "time": "2020-02-29 12:14", "idle": ".", "pid": 840}, {"event": "run-level 3", "time": "2020-02-29 12:13"}, {"user": "kbrazil", "writeable_tty": "+", "tty": "pts/0", "time": "2020-02-29 18:43", "idle": "00:11", "pid": 3709, "from": "192.168.71.1"}, {"tty": "pts/1", "time": "2020-02-29 18:28", "pid": 3381, "comment": "id=ts/1 term=0 exit=0"}]
|
6
tests/fixtures/centos-7.7/who-a.out
vendored
Normal file
6
tests/fixtures/centos-7.7/who-a.out
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
system boot 2020-02-29 12:13
|
||||
LOGIN tty1 2020-02-29 12:13 841 id=tty1
|
||||
kbrazil + ttyS0 2020-02-29 12:14 . 840
|
||||
run-level 3 2020-02-29 12:13
|
||||
kbrazil + pts/0 2020-02-29 18:43 00:11 3709 (192.168.71.1)
|
||||
pts/1 2020-02-29 18:28 3381 id=ts/1 term=0 exit=0
|
1
tests/fixtures/centos-7.7/who.json
vendored
Normal file
1
tests/fixtures/centos-7.7/who.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"user": "kbrazil", "tty": "ttyS0", "time": "2020-02-29 12:14"}, {"user": "kbrazil", "tty": "pts/0", "time": "2020-02-29 18:43", "from": "192.168.71.1"}]
|
2
tests/fixtures/centos-7.7/who.out
vendored
Normal file
2
tests/fixtures/centos-7.7/who.out
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
kbrazil ttyS0 2020-02-29 12:14
|
||||
kbrazil pts/0 2020-02-29 18:43 (192.168.71.1)
|
13
tests/fixtures/create_fixtures.sh
vendored
13
tests/fixtures/create_fixtures.sh
vendored
@ -88,3 +88,16 @@ systemctl -a list-jobs > systemctl-jobs.out
|
||||
du /usr > du.out
|
||||
pip3 list > pip-list.out
|
||||
pip3 show wheel pip jc > pip-show.out
|
||||
|
||||
blkid > blkid.out
|
||||
blkid /dev/sda2 > blkid-sda2.out
|
||||
sudo blkid -ip /dev/sda2 /dev/sda1 > blkid-ip-multi.out
|
||||
sudo blkid -o udev -ip /dev/sr0 > blkid-ip-udev.out
|
||||
sudo blkid -o udev -ip /dev/sda2 /dev/sda1 > blkid-ip-udev-multi.out
|
||||
|
||||
last > last.out
|
||||
last -w | cat > last-w.out
|
||||
sudo lastb > lastb.out
|
||||
|
||||
cat /etc/group > group.out
|
||||
sudo cat /etc/gshadow > gshadow.out
|
||||
|
20
tests/fixtures/generic/csv-biostats.csv
vendored
Normal file
20
tests/fixtures/generic/csv-biostats.csv
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
"Name", "Sex", "Age", "Height (in)", "Weight (lbs)"
|
||||
"Alex", "M", 41, 74, 170
|
||||
"Bert", "M", 42, 68, 166
|
||||
"Carl", "M", 32, 70, 155
|
||||
"Dave", "M", 39, 72, 167
|
||||
"Elly", "F", 30, 66, 124
|
||||
"Fran", "F", 33, 66, 115
|
||||
"Gwen", "F", 26, 64, 121
|
||||
"Hank", "M", 30, 71, 158
|
||||
"Ivan", "M", 53, 72, 175
|
||||
"Jake", "M", 32, 69, 143
|
||||
"Kate", "F", 47, 69, 139
|
||||
"Luke", "M", 34, 72, 163
|
||||
"Myra", "F", 23, 62, 98
|
||||
"Neil", "M", 36, 75, 160
|
||||
"Omar", "M", 38, 70, 145
|
||||
"Page", "F", 31, 67, 135
|
||||
"Quin", "M", 29, 71, 176
|
||||
"Ruth", "F", 28, 65, 131
|
||||
|
|
1
tests/fixtures/generic/csv-biostats.json
vendored
Normal file
1
tests/fixtures/generic/csv-biostats.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"Name": "Alex", "Sex": "M", "Age": "41", "Height (in)": "74", "Weight (lbs)": "170"}, {"Name": "Bert", "Sex": "M", "Age": "42", "Height (in)": "68", "Weight (lbs)": "166"}, {"Name": "Carl", "Sex": "M", "Age": "32", "Height (in)": "70", "Weight (lbs)": "155"}, {"Name": "Dave", "Sex": "M", "Age": "39", "Height (in)": "72", "Weight (lbs)": "167"}, {"Name": "Elly", "Sex": "F", "Age": "30", "Height (in)": "66", "Weight (lbs)": "124"}, {"Name": "Fran", "Sex": "F", "Age": "33", "Height (in)": "66", "Weight (lbs)": "115"}, {"Name": "Gwen", "Sex": "F", "Age": "26", "Height (in)": "64", "Weight (lbs)": "121"}, {"Name": "Hank", "Sex": "M", "Age": "30", "Height (in)": "71", "Weight (lbs)": "158"}, {"Name": "Ivan", "Sex": "M", "Age": "53", "Height (in)": "72", "Weight (lbs)": "175"}, {"Name": "Jake", "Sex": "M", "Age": "32", "Height (in)": "69", "Weight (lbs)": "143"}, {"Name": "Kate", "Sex": "F", "Age": "47", "Height (in)": "69", "Weight (lbs)": "139"}, {"Name": "Luke", "Sex": "M", "Age": "34", "Height (in)": "72", "Weight (lbs)": "163"}, {"Name": "Myra", "Sex": "F", "Age": "23", "Height (in)": "62", "Weight (lbs)": "98"}, {"Name": "Neil", "Sex": "M", "Age": "36", "Height (in)": "75", "Weight (lbs)": "160"}, {"Name": "Omar", "Sex": "M", "Age": "38", "Height (in)": "70", "Weight (lbs)": "145"}, {"Name": "Page", "Sex": "F", "Age": "31", "Height (in)": "67", "Weight (lbs)": "135"}, {"Name": "Quin", "Sex": "M", "Age": "29", "Height (in)": "71", "Weight (lbs)": "176"}, {"Name": "Ruth", "Sex": "F", "Age": "28", "Height (in)": "65", "Weight (lbs)": "131"}]
|
130
tests/fixtures/generic/csv-cities.csv
vendored
Normal file
130
tests/fixtures/generic/csv-cities.csv
vendored
Normal file
@ -0,0 +1,130 @@
|
||||
"LatD", "LatM", "LatS", "NS", "LonD", "LonM", "LonS", "EW", "City", "State"
|
||||
41, 5, 59, "N", 80, 39, 0, "W", "Youngstown", OH
|
||||
42, 52, 48, "N", 97, 23, 23, "W", "Yankton", SD
|
||||
46, 35, 59, "N", 120, 30, 36, "W", "Yakima", WA
|
||||
42, 16, 12, "N", 71, 48, 0, "W", "Worcester", MA
|
||||
43, 37, 48, "N", 89, 46, 11, "W", "Wisconsin Dells", WI
|
||||
36, 5, 59, "N", 80, 15, 0, "W", "Winston-Salem", NC
|
||||
49, 52, 48, "N", 97, 9, 0, "W", "Winnipeg", MB
|
||||
39, 11, 23, "N", 78, 9, 36, "W", "Winchester", VA
|
||||
34, 14, 24, "N", 77, 55, 11, "W", "Wilmington", NC
|
||||
39, 45, 0, "N", 75, 33, 0, "W", "Wilmington", DE
|
||||
48, 9, 0, "N", 103, 37, 12, "W", "Williston", ND
|
||||
41, 15, 0, "N", 77, 0, 0, "W", "Williamsport", PA
|
||||
37, 40, 48, "N", 82, 16, 47, "W", "Williamson", WV
|
||||
33, 54, 0, "N", 98, 29, 23, "W", "Wichita Falls", TX
|
||||
37, 41, 23, "N", 97, 20, 23, "W", "Wichita", KS
|
||||
40, 4, 11, "N", 80, 43, 12, "W", "Wheeling", WV
|
||||
26, 43, 11, "N", 80, 3, 0, "W", "West Palm Beach", FL
|
||||
47, 25, 11, "N", 120, 19, 11, "W", "Wenatchee", WA
|
||||
41, 25, 11, "N", 122, 23, 23, "W", "Weed", CA
|
||||
31, 13, 11, "N", 82, 20, 59, "W", "Waycross", GA
|
||||
44, 57, 35, "N", 89, 38, 23, "W", "Wausau", WI
|
||||
42, 21, 36, "N", 87, 49, 48, "W", "Waukegan", IL
|
||||
44, 54, 0, "N", 97, 6, 36, "W", "Watertown", SD
|
||||
43, 58, 47, "N", 75, 55, 11, "W", "Watertown", NY
|
||||
42, 30, 0, "N", 92, 20, 23, "W", "Waterloo", IA
|
||||
41, 32, 59, "N", 73, 3, 0, "W", "Waterbury", CT
|
||||
38, 53, 23, "N", 77, 1, 47, "W", "Washington", DC
|
||||
41, 50, 59, "N", 79, 8, 23, "W", "Warren", PA
|
||||
46, 4, 11, "N", 118, 19, 48, "W", "Walla Walla", WA
|
||||
31, 32, 59, "N", 97, 8, 23, "W", "Waco", TX
|
||||
38, 40, 48, "N", 87, 31, 47, "W", "Vincennes", IN
|
||||
28, 48, 35, "N", 97, 0, 36, "W", "Victoria", TX
|
||||
32, 20, 59, "N", 90, 52, 47, "W", "Vicksburg", MS
|
||||
49, 16, 12, "N", 123, 7, 12, "W", "Vancouver", BC
|
||||
46, 55, 11, "N", 98, 0, 36, "W", "Valley City", ND
|
||||
30, 49, 47, "N", 83, 16, 47, "W", "Valdosta", GA
|
||||
43, 6, 36, "N", 75, 13, 48, "W", "Utica", NY
|
||||
39, 54, 0, "N", 79, 43, 48, "W", "Uniontown", PA
|
||||
32, 20, 59, "N", 95, 18, 0, "W", "Tyler", TX
|
||||
42, 33, 36, "N", 114, 28, 12, "W", "Twin Falls", ID
|
||||
33, 12, 35, "N", 87, 34, 11, "W", "Tuscaloosa", AL
|
||||
34, 15, 35, "N", 88, 42, 35, "W", "Tupelo", MS
|
||||
36, 9, 35, "N", 95, 54, 36, "W", "Tulsa", OK
|
||||
32, 13, 12, "N", 110, 58, 12, "W", "Tucson", AZ
|
||||
37, 10, 11, "N", 104, 30, 36, "W", "Trinidad", CO
|
||||
40, 13, 47, "N", 74, 46, 11, "W", "Trenton", NJ
|
||||
44, 45, 35, "N", 85, 37, 47, "W", "Traverse City", MI
|
||||
43, 39, 0, "N", 79, 22, 47, "W", "Toronto", ON
|
||||
39, 2, 59, "N", 95, 40, 11, "W", "Topeka", KS
|
||||
41, 39, 0, "N", 83, 32, 24, "W", "Toledo", OH
|
||||
33, 25, 48, "N", 94, 3, 0, "W", "Texarkana", TX
|
||||
39, 28, 12, "N", 87, 24, 36, "W", "Terre Haute", IN
|
||||
27, 57, 0, "N", 82, 26, 59, "W", "Tampa", FL
|
||||
30, 27, 0, "N", 84, 16, 47, "W", "Tallahassee", FL
|
||||
47, 14, 24, "N", 122, 25, 48, "W", "Tacoma", WA
|
||||
43, 2, 59, "N", 76, 9, 0, "W", "Syracuse", NY
|
||||
32, 35, 59, "N", 82, 20, 23, "W", "Swainsboro", GA
|
||||
33, 55, 11, "N", 80, 20, 59, "W", "Sumter", SC
|
||||
40, 59, 24, "N", 75, 11, 24, "W", "Stroudsburg", PA
|
||||
37, 57, 35, "N", 121, 17, 24, "W", "Stockton", CA
|
||||
44, 31, 12, "N", 89, 34, 11, "W", "Stevens Point", WI
|
||||
40, 21, 36, "N", 80, 37, 12, "W", "Steubenville", OH
|
||||
40, 37, 11, "N", 103, 13, 12, "W", "Sterling", CO
|
||||
38, 9, 0, "N", 79, 4, 11, "W", "Staunton", VA
|
||||
39, 55, 11, "N", 83, 48, 35, "W", "Springfield", OH
|
||||
37, 13, 12, "N", 93, 17, 24, "W", "Springfield", MO
|
||||
42, 5, 59, "N", 72, 35, 23, "W", "Springfield", MA
|
||||
39, 47, 59, "N", 89, 39, 0, "W", "Springfield", IL
|
||||
47, 40, 11, "N", 117, 24, 36, "W", "Spokane", WA
|
||||
41, 40, 48, "N", 86, 15, 0, "W", "South Bend", IN
|
||||
43, 32, 24, "N", 96, 43, 48, "W", "Sioux Falls", SD
|
||||
42, 29, 24, "N", 96, 23, 23, "W", "Sioux City", IA
|
||||
32, 30, 35, "N", 93, 45, 0, "W", "Shreveport", LA
|
||||
33, 38, 23, "N", 96, 36, 36, "W", "Sherman", TX
|
||||
44, 47, 59, "N", 106, 57, 35, "W", "Sheridan", WY
|
||||
35, 13, 47, "N", 96, 40, 48, "W", "Seminole", OK
|
||||
32, 25, 11, "N", 87, 1, 11, "W", "Selma", AL
|
||||
38, 42, 35, "N", 93, 13, 48, "W", "Sedalia", MO
|
||||
47, 35, 59, "N", 122, 19, 48, "W", "Seattle", WA
|
||||
41, 24, 35, "N", 75, 40, 11, "W", "Scranton", PA
|
||||
41, 52, 11, "N", 103, 39, 36, "W", "Scottsbluff", NB
|
||||
42, 49, 11, "N", 73, 56, 59, "W", "Schenectady", NY
|
||||
32, 4, 48, "N", 81, 5, 23, "W", "Savannah", GA
|
||||
46, 29, 24, "N", 84, 20, 59, "W", "Sault Sainte Marie", MI
|
||||
27, 20, 24, "N", 82, 31, 47, "W", "Sarasota", FL
|
||||
38, 26, 23, "N", 122, 43, 12, "W", "Santa Rosa", CA
|
||||
35, 40, 48, "N", 105, 56, 59, "W", "Santa Fe", NM
|
||||
34, 25, 11, "N", 119, 41, 59, "W", "Santa Barbara", CA
|
||||
33, 45, 35, "N", 117, 52, 12, "W", "Santa Ana", CA
|
||||
37, 20, 24, "N", 121, 52, 47, "W", "San Jose", CA
|
||||
37, 46, 47, "N", 122, 25, 11, "W", "San Francisco", CA
|
||||
41, 27, 0, "N", 82, 42, 35, "W", "Sandusky", OH
|
||||
32, 42, 35, "N", 117, 9, 0, "W", "San Diego", CA
|
||||
34, 6, 36, "N", 117, 18, 35, "W", "San Bernardino", CA
|
||||
29, 25, 12, "N", 98, 30, 0, "W", "San Antonio", TX
|
||||
31, 27, 35, "N", 100, 26, 24, "W", "San Angelo", TX
|
||||
40, 45, 35, "N", 111, 52, 47, "W", "Salt Lake City", UT
|
||||
38, 22, 11, "N", 75, 35, 59, "W", "Salisbury", MD
|
||||
36, 40, 11, "N", 121, 39, 0, "W", "Salinas", CA
|
||||
38, 50, 24, "N", 97, 36, 36, "W", "Salina", KS
|
||||
38, 31, 47, "N", 106, 0, 0, "W", "Salida", CO
|
||||
44, 56, 23, "N", 123, 1, 47, "W", "Salem", OR
|
||||
44, 57, 0, "N", 93, 5, 59, "W", "Saint Paul", MN
|
||||
38, 37, 11, "N", 90, 11, 24, "W", "Saint Louis", MO
|
||||
39, 46, 12, "N", 94, 50, 23, "W", "Saint Joseph", MO
|
||||
42, 5, 59, "N", 86, 28, 48, "W", "Saint Joseph", MI
|
||||
44, 25, 11, "N", 72, 1, 11, "W", "Saint Johnsbury", VT
|
||||
45, 34, 11, "N", 94, 10, 11, "W", "Saint Cloud", MN
|
||||
29, 53, 23, "N", 81, 19, 11, "W", "Saint Augustine", FL
|
||||
43, 25, 48, "N", 83, 56, 24, "W", "Saginaw", MI
|
||||
38, 35, 24, "N", 121, 29, 23, "W", "Sacramento", CA
|
||||
43, 36, 36, "N", 72, 58, 12, "W", "Rutland", VT
|
||||
33, 24, 0, "N", 104, 31, 47, "W", "Roswell", NM
|
||||
35, 56, 23, "N", 77, 48, 0, "W", "Rocky Mount", NC
|
||||
41, 35, 24, "N", 109, 13, 48, "W", "Rock Springs", WY
|
||||
42, 16, 12, "N", 89, 5, 59, "W", "Rockford", IL
|
||||
43, 9, 35, "N", 77, 36, 36, "W", "Rochester", NY
|
||||
44, 1, 12, "N", 92, 27, 35, "W", "Rochester", MN
|
||||
37, 16, 12, "N", 79, 56, 24, "W", "Roanoke", VA
|
||||
37, 32, 24, "N", 77, 26, 59, "W", "Richmond", VA
|
||||
39, 49, 48, "N", 84, 53, 23, "W", "Richmond", IN
|
||||
38, 46, 12, "N", 112, 5, 23, "W", "Richfield", UT
|
||||
45, 38, 23, "N", 89, 25, 11, "W", "Rhinelander", WI
|
||||
39, 31, 12, "N", 119, 48, 35, "W", "Reno", NV
|
||||
50, 25, 11, "N", 104, 39, 0, "W", "Regina", SA
|
||||
40, 10, 48, "N", 122, 14, 23, "W", "Red Bluff", CA
|
||||
40, 19, 48, "N", 75, 55, 48, "W", "Reading", PA
|
||||
41, 9, 35, "N", 81, 14, 23, "W", "Ravenna", OH
|
||||
|
|
1
tests/fixtures/generic/csv-cities.json
vendored
Normal file
1
tests/fixtures/generic/csv-cities.json
vendored
Normal file
File diff suppressed because one or more lines are too long
89
tests/fixtures/generic/csv-deniro.csv
vendored
Normal file
89
tests/fixtures/generic/csv-deniro.csv
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
"Year", "Score", "Title"
|
||||
1968, 86, "Greetings"
|
||||
1970, 17, "Bloody Mama"
|
||||
1970, 73, "Hi, Mom!"
|
||||
1971, 40, "Born to Win"
|
||||
1973, 98, "Mean Streets"
|
||||
1973, 88, "Bang the Drum Slowly"
|
||||
1974, 97, "The Godfather, Part II"
|
||||
1976, 41, "The Last Tycoon"
|
||||
1976, 99, "Taxi Driver"
|
||||
1977, 47, "1900"
|
||||
1977, 67, "New York, New York"
|
||||
1978, 93, "The Deer Hunter"
|
||||
1980, 97, "Raging Bull"
|
||||
1981, 75, "True Confessions"
|
||||
1983, 90, "The King of Comedy"
|
||||
1984, 89, "Once Upon a Time in America"
|
||||
1984, 60, "Falling in Love"
|
||||
1985, 98, "Brazil"
|
||||
1986, 65, "The Mission"
|
||||
1987, 100, "Dear America: Letters Home From Vietnam"
|
||||
1987, 80, "The Untouchables"
|
||||
1987, 78, "Angel Heart"
|
||||
1988, 96, "Midnight Run"
|
||||
1989, 64, "Jacknife"
|
||||
1989, 47, "We're No Angels"
|
||||
1990, 88, "Awakenings"
|
||||
1990, 29, "Stanley & Iris"
|
||||
1990, 96, "Goodfellas"
|
||||
1991, 76, "Cape Fear"
|
||||
1991, 69, "Mistress"
|
||||
1991, 65, "Guilty by Suspicion"
|
||||
1991, 71, "Backdraft"
|
||||
1992, 87, "Thunderheart"
|
||||
1992, 67, "Night and the City"
|
||||
1993, 75, "This Boy's Life"
|
||||
1993, 78, "Mad Dog and Glory"
|
||||
1993, 96, "A Bronx Tale"
|
||||
1994, 39, "Mary Shelley's Frankenstein"
|
||||
1995, 80, "Casino"
|
||||
1995, 86, "Heat"
|
||||
1996, 74, "Sleepers"
|
||||
1996, 38, "The Fan"
|
||||
1996, 80, "Marvin's Room"
|
||||
1997, 85, "Wag the Dog"
|
||||
1997, 87, "Jackie Brown"
|
||||
1997, 72, "Cop Land"
|
||||
1998, 68, "Ronin"
|
||||
1998, 38, "Great Expectations"
|
||||
1999, 69, "Analyze This"
|
||||
1999, 43, "Flawless"
|
||||
2000, 43, "The Adventures of Rocky & Bullwinkle"
|
||||
2000, 84, "Meet the Parents"
|
||||
2000, 41, "Men of Honor"
|
||||
2001, 73, "The Score"
|
||||
2001, 33, "15 Minutes"
|
||||
2002, 48, "City by the Sea"
|
||||
2002, 27, "Analyze That"
|
||||
2003, 4, "Godsend"
|
||||
2004, 35, "Shark Tale"
|
||||
2004, 38, "Meet the Fockers"
|
||||
2005, 4, "The Bridge of San Luis Rey"
|
||||
2005, 46, "Rent"
|
||||
2005, 13, "Hide and Seek"
|
||||
2006, 54, "The Good Shepherd"
|
||||
2007, 21, "Arthur and the Invisibles"
|
||||
2007, 76, "Captain Shakespeare"
|
||||
2008, 19, "Righteous Kill"
|
||||
2008, 51, "What Just Happened?"
|
||||
2009, 46, "Everybody's Fine"
|
||||
2010, 72, "Machete"
|
||||
2010, 10, "Little Fockers"
|
||||
2010, 50, "Stone"
|
||||
2011, 25, "Killer Elite"
|
||||
2011, 7, "New Year's Eve"
|
||||
2011, 70, "Limitless"
|
||||
2012, 92, "Silver Linings Playbook"
|
||||
2012, 51, "Being Flynn"
|
||||
2012, 29, "Red Lights"
|
||||
2013, 46, "Last Vegas"
|
||||
2013, 7, "The Big Wedding"
|
||||
2013, 29, "Grudge Match"
|
||||
2013, 11, "Killing Season"
|
||||
2014, 9, "The Bag Man"
|
||||
2015, 60, "Joy"
|
||||
2015, 26, "Heist"
|
||||
2015, 61, "The Intern"
|
||||
2016, 11, "Dirty Grandpa"
|
||||
|
|
1
tests/fixtures/generic/csv-deniro.json
vendored
Normal file
1
tests/fixtures/generic/csv-deniro.json
vendored
Normal file
File diff suppressed because one or more lines are too long
2
tests/fixtures/generic/csv-example.csv
vendored
Normal file
2
tests/fixtures/generic/csv-example.csv
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
TOK,UPDATE,DATE,SHOT,TIME,AUXHEAT,PHASE,STATE,PGASA,PGASZ,BGASA,BGASZ,BGASA2,BGASZ2,PIMPA,PIMPZ,PELLET,RGEO,RMAG,AMIN,SEPLIM,XPLIM,KAPPA,DELTA,INDENT,AREA,VOL,CONFIG,IGRADB,WALMAT,DIVMAT,LIMMAT,EVAP,BT,IP,VSURF,Q95,BEPMHD,BETMHD,BEPDIA,NEL,DNELDT,ZEFF,PRAD,POHM,ENBI,PINJ,BSOURCE,PINJ2,BSOURCE2,COCTR,PNBI,ECHFREQ,ECHMODE,ECHLOC,PECH,ICFREQ,ICSCHEME,ICANTEN,PICRH,LHFREQ,LHNPAR,PLH,IBWFREQ,PIBW,TE0,TI0,WFANI,WFICRH,MEFF,ISEQ,WTH,WTOT,DWTOT,PL,PLTH,TAUTOT,TAUTH
|
||||
JET,20031201,20001006,53521,1.000E+01,NBIC,HSELM,TRANS,2.000E+00,1.000E+00,2,1,0,0,1.658E+01,8.152E+00,NONE,2.888E+00,3.047E+00,9.807E-01,2.924E-02,7.304E-02,1.572E+00,1.781E-01,0.000E+00,4.572E+00,8.161E+01,LSN,1,IN/C,BE,C/BE,BE,3.598E+00,2.000E+06,1.013E-01,6.001E+00,1.053E+00,9.252E-01,1.128E+00,3.106E+19,3.106E+19,6.612E+00,4.515E+06,5.122E+04,1.000E+05,1.466E+07,771706,0.000E+00,652114,1.000E+00,1.420E+07,-9.999E-09,NONE,NONE,0.000E+00,5.100E+07,HMIN,MONOPOLE,4.027E+06,3.700E+09,1.840E+00,2.000E+06,-9.999E-09,0.000E+00,9.295E+03,1.373E+04,6.913E-01,7.319E+05,2.000E+00,NONE,3.715E+06,5.381E+06,1.282E+06,1.297E+07,1.210E+07,4.445E-01,2.194E-01
|
|
1
tests/fixtures/generic/csv-example.json
vendored
Normal file
1
tests/fixtures/generic/csv-example.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"TOK": "JET", "UPDATE": "20031201", "DATE": "20001006", "SHOT": "53521", "TIME": "1.000E+01", "AUXHEAT": "NBIC", "PHASE": "HSELM", "STATE": "TRANS", "PGASA": "2.000E+00", "PGASZ": "1.000E+00", "BGASA": "2", "BGASZ": "1", "BGASA2": "0", "BGASZ2": "0", "PIMPA": "1.658E+01", "PIMPZ": "8.152E+00", "PELLET": "NONE", "RGEO": "2.888E+00", "RMAG": "3.047E+00", "AMIN": "9.807E-01", "SEPLIM": "2.924E-02", "XPLIM": "7.304E-02", "KAPPA": "1.572E+00", "DELTA": "1.781E-01", "INDENT": "0.000E+00", "AREA": "4.572E+00", "VOL": "8.161E+01", "CONFIG": "LSN", "IGRADB": "1", "WALMAT": "IN/C", "DIVMAT": "BE", "LIMMAT": "C/BE", "EVAP": "BE", "BT": "3.598E+00", "IP": "2.000E+06", "VSURF": "1.013E-01", "Q95": "6.001E+00", "BEPMHD": "1.053E+00", "BETMHD": "9.252E-01", "BEPDIA": "1.128E+00", "NEL": "3.106E+19", "DNELDT": "3.106E+19", "ZEFF": "6.612E+00", "PRAD": "4.515E+06", "POHM": "5.122E+04", "ENBI": "1.000E+05", "PINJ": "1.466E+07", "BSOURCE": "771706", "PINJ2": "0.000E+00", "BSOURCE2": "652114", "COCTR": "1.000E+00", "PNBI": "1.420E+07", "ECHFREQ": "-9.999E-09", "ECHMODE": "NONE", "ECHLOC": "NONE", "PECH": "0.000E+00", "ICFREQ": "5.100E+07", "ICSCHEME": "HMIN", "ICANTEN": "MONOPOLE", "PICRH": "4.027E+06", "LHFREQ": "3.700E+09", "LHNPAR": "1.840E+00", "PLH": "2.000E+06", "IBWFREQ": "-9.999E-09", "PIBW": "0.000E+00", "TE0": "9.295E+03", "TI0": "1.373E+04", "WFANI": "6.913E-01", "WFICRH": "7.319E+05", "MEFF": "2.000E+00", "ISEQ": "NONE", "WTH": "3.715E+06", "WTOT": "5.381E+06", "DWTOT": "1.282E+06", "PL": "1.297E+07", "PLTH": "1.210E+07", "TAUTOT": "4.445E-01", "TAUTH": "2.194E-01"}]
|
1
tests/fixtures/generic/csv-flyrna.json
vendored
Normal file
1
tests/fixtures/generic/csv-flyrna.json
vendored
Normal file
File diff suppressed because one or more lines are too long
11767
tests/fixtures/generic/csv-flyrna.tsv
vendored
Normal file
11767
tests/fixtures/generic/csv-flyrna.tsv
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
tests/fixtures/generic/csv-flyrna2.json
vendored
Normal file
1
tests/fixtures/generic/csv-flyrna2.json
vendored
Normal file
File diff suppressed because one or more lines are too long
11767
tests/fixtures/generic/csv-flyrna2.tsv
vendored
Normal file
11767
tests/fixtures/generic/csv-flyrna2.tsv
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3
tests/fixtures/generic/csv-homes-pipe.csv
vendored
Normal file
3
tests/fixtures/generic/csv-homes-pipe.csv
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
"Sell"| "List"| "Living"| "Rooms"| "Beds"| "Baths"| "Age"| "Acres"| "Taxes"
|
||||
142| 160| 28| 10| 5| 3| 60| 0.28| 3167
|
||||
175| 180| 18| 8| 4| 1| 12| 0.43| 4033
|
|
1
tests/fixtures/generic/csv-homes-pipe.json
vendored
Normal file
1
tests/fixtures/generic/csv-homes-pipe.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"Sell": "142", "List": "160", "Living": "28", "Rooms": "10", "Beds": "5", "Baths": "3", "Age": "60", "Acres": "0.28", "Taxes": "3167"}, {"Sell": "175", "List": "180", "Living": "18", "Rooms": "8", "Beds": "4", "Baths": "1", "Age": "12", "Acres": "0.43", "Taxes": "4033"}]
|
51
tests/fixtures/generic/csv-homes.csv
vendored
Normal file
51
tests/fixtures/generic/csv-homes.csv
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
"Sell", "List", "Living", "Rooms", "Beds", "Baths", "Age", "Acres", "Taxes"
|
||||
142, 160, 28, 10, 5, 3, 60, 0.28, 3167
|
||||
175, 180, 18, 8, 4, 1, 12, 0.43, 4033
|
||||
129, 132, 13, 6, 3, 1, 41, 0.33, 1471
|
||||
138, 140, 17, 7, 3, 1, 22, 0.46, 3204
|
||||
232, 240, 25, 8, 4, 3, 5, 2.05, 3613
|
||||
135, 140, 18, 7, 4, 3, 9, 0.57, 3028
|
||||
150, 160, 20, 8, 4, 3, 18, 4.00, 3131
|
||||
207, 225, 22, 8, 4, 2, 16, 2.22, 5158
|
||||
271, 285, 30, 10, 5, 2, 30, 0.53, 5702
|
||||
89, 90, 10, 5, 3, 1, 43, 0.30, 2054
|
||||
153, 157, 22, 8, 3, 3, 18, 0.38, 4127
|
||||
87, 90, 16, 7, 3, 1, 50, 0.65, 1445
|
||||
234, 238, 25, 8, 4, 2, 2, 1.61, 2087
|
||||
106, 116, 20, 8, 4, 1, 13, 0.22, 2818
|
||||
175, 180, 22, 8, 4, 2, 15, 2.06, 3917
|
||||
165, 170, 17, 8, 4, 2, 33, 0.46, 2220
|
||||
166, 170, 23, 9, 4, 2, 37, 0.27, 3498
|
||||
136, 140, 19, 7, 3, 1, 22, 0.63, 3607
|
||||
148, 160, 17, 7, 3, 2, 13, 0.36, 3648
|
||||
151, 153, 19, 8, 4, 2, 24, 0.34, 3561
|
||||
180, 190, 24, 9, 4, 2, 10, 1.55, 4681
|
||||
293, 305, 26, 8, 4, 3, 6, 0.46, 7088
|
||||
167, 170, 20, 9, 4, 2, 46, 0.46, 3482
|
||||
190, 193, 22, 9, 5, 2, 37, 0.48, 3920
|
||||
184, 190, 21, 9, 5, 2, 27, 1.30, 4162
|
||||
157, 165, 20, 8, 4, 2, 7, 0.30, 3785
|
||||
110, 115, 16, 8, 4, 1, 26, 0.29, 3103
|
||||
135, 145, 18, 7, 4, 1, 35, 0.43, 3363
|
||||
567, 625, 64, 11, 4, 4, 4, 0.85, 12192
|
||||
180, 185, 20, 8, 4, 2, 11, 1.00, 3831
|
||||
183, 188, 17, 7, 3, 2, 16, 3.00, 3564
|
||||
185, 193, 20, 9, 3, 2, 56, 6.49, 3765
|
||||
152, 155, 17, 8, 4, 1, 33, 0.70, 3361
|
||||
148, 153, 13, 6, 3, 2, 22, 0.39, 3950
|
||||
152, 159, 15, 7, 3, 1, 25, 0.59, 3055
|
||||
146, 150, 16, 7, 3, 1, 31, 0.36, 2950
|
||||
170, 190, 24, 10, 3, 2, 33, 0.57, 3346
|
||||
127, 130, 20, 8, 4, 1, 65, 0.40, 3334
|
||||
265, 270, 36, 10, 6, 3, 33, 1.20, 5853
|
||||
157, 163, 18, 8, 4, 2, 12, 1.13, 3982
|
||||
128, 135, 17, 9, 4, 1, 25, 0.52, 3374
|
||||
110, 120, 15, 8, 4, 2, 11, 0.59, 3119
|
||||
123, 130, 18, 8, 4, 2, 43, 0.39, 3268
|
||||
212, 230, 39, 12, 5, 3, 202, 4.29, 3648
|
||||
145, 145, 18, 8, 4, 2, 44, 0.22, 2783
|
||||
129, 135, 10, 6, 3, 1, 15, 1.00, 2438
|
||||
143, 145, 21, 7, 4, 2, 10, 1.20, 3529
|
||||
247, 252, 29, 9, 4, 2, 4, 1.25, 4626
|
||||
111, 120, 15, 8, 3, 1, 97, 1.11, 3205
|
||||
133, 145, 26, 7, 3, 1, 42, 0.36, 3059
|
|
1
tests/fixtures/generic/csv-homes.json
vendored
Normal file
1
tests/fixtures/generic/csv-homes.json
vendored
Normal file
File diff suppressed because one or more lines are too long
1
tests/fixtures/generic/csv-insurance.csv
vendored
Normal file
1
tests/fixtures/generic/csv-insurance.csv
vendored
Normal file
File diff suppressed because one or more lines are too long
1
tests/fixtures/generic/csv-insurance.json
vendored
Normal file
1
tests/fixtures/generic/csv-insurance.json
vendored
Normal file
File diff suppressed because one or more lines are too long
91
tests/fixtures/generic/oscar_age_male.csv
vendored
Normal file
91
tests/fixtures/generic/oscar_age_male.csv
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
"Index", "Year", "Age", "Name", "Movie"
|
||||
1, 1928, 44, "Emil Jannings", "The Last Command, The Way of All Flesh"
|
||||
2, 1929, 41, "Warner Baxter", "In Old Arizona"
|
||||
3, 1930, 62, "George Arliss", "Disraeli"
|
||||
4, 1931, 53, "Lionel Barrymore", "A Free Soul"
|
||||
5, 1932, 47, "Wallace Beery", "The Champ"
|
||||
6, 1933, 35, "Fredric March", "Dr. Jekyll and Mr. Hyde"
|
||||
7, 1934, 34, "Charles Laughton", "The Private Life of Henry VIII"
|
||||
8, 1935, 34, "Clark Gable", "It Happened One Night"
|
||||
9, 1936, 49, "Victor McLaglen", "The Informer"
|
||||
10, 1937, 41, "Paul Muni", "The Story of Louis Pasteur"
|
||||
11, 1938, 37, "Spencer Tracy", "Captains Courageous"
|
||||
12, 1939, 38, "Spencer Tracy", "Boys Town"
|
||||
13, 1940, 34, "Robert Donat", "Goodbye, Mr. Chips"
|
||||
14, 1941, 32, "James Stewart", "The Philadelphia Story"
|
||||
15, 1942, 40, "Gary Cooper", "Sergeant York"
|
||||
16, 1943, 43, "James Cagney", "Yankee Doodle Dandy"
|
||||
17, 1944, 48, "Paul Lukas", "Watch on the Rhine"
|
||||
18, 1945, 41, "Bing Crosby", "Going My Way"
|
||||
19, 1946, 39, "Ray Milland", "The Lost Weekend"
|
||||
20, 1947, 49, "Fredric March", "The Best Years of Our Lives"
|
||||
21, 1948, 57, "Ronald Colman", "A Double Life"
|
||||
22, 1949, 41, "Laurence Olivier", "Hamlet"
|
||||
23, 1950, 38, "Broderick Crawford", "All the King's Men"
|
||||
24, 1951, 39, "José Ferrer", "Cyrano de Bergerac"
|
||||
25, 1952, 52, "Humphrey Bogart", "The African Queen"
|
||||
26, 1953, 51, "Gary Cooper", "High Noon"
|
||||
27, 1954, 35, "William Holden", "Stalag 17"
|
||||
28, 1955, 30, "Marlon Brando", "On the Waterfront"
|
||||
29, 1956, 39, "Ernest Borgnine", "Marty"
|
||||
30, 1957, 36, "Yul Brynner", "The King and I"
|
||||
31, 1958, 43, "Alec Guinness", "The Bridge on the River Kwai"
|
||||
32, 1959, 49, "David Niven", "Separate Tables"
|
||||
33, 1960, 36, "Charlton Heston", "Ben-Hur"
|
||||
34, 1961, 47, "Burt Lancaster", "Elmer Gantry"
|
||||
35, 1962, 31, "Maximilian Schell", "Judgment at Nuremberg"
|
||||
36, 1963, 47, "Gregory Peck", "To Kill a Mockingbird"
|
||||
37, 1964, 37, "Sidney Poitier", "Lilies of the Field"
|
||||
38, 1965, 57, "Rex Harrison", "My Fair Lady"
|
||||
39, 1966, 42, "Lee Marvin", "Cat Ballou"
|
||||
40, 1967, 45, "Paul Scofield", "A Man for All Seasons"
|
||||
41, 1968, 42, "Rod Steiger", "In the Heat of the Night"
|
||||
42, 1969, 45, "Cliff Robertson", "Charly"
|
||||
43, 1970, 62, "John Wayne", "True Grit"
|
||||
44, 1971, 43, "George C. Scott", "Patton"
|
||||
45, 1972, 42, "Gene Hackman", "The French Connection"
|
||||
46, 1973, 48, "Marlon Brando", "The Godfather"
|
||||
47, 1974, 49, "Jack Lemmon", "Save the Tiger"
|
||||
48, 1975, 56, "Art Carney", "Harry and Tonto"
|
||||
49, 1976, 38, "Jack Nicholson", "One Flew Over the Cuckoo's Nest"
|
||||
50, 1977, 60, "Peter Finch", "Network"
|
||||
51, 1978, 30, "Richard Dreyfuss", "The Goodbye Girl"
|
||||
52, 1979, 40, "Jon Voight", "Coming Home"
|
||||
53, 1980, 42, "Dustin Hoffman", "Kramer vs. Kramer"
|
||||
54, 1981, 37, "Robert De Niro", "Raging Bull"
|
||||
55, 1982, 76, "Henry Fonda", "On Golden Pond"
|
||||
56, 1983, 39, "Ben Kingsley", "Gandhi"
|
||||
57, 1984, 53, "Robert Duvall", "Tender Mercies"
|
||||
58, 1985, 45, "F. Murray Abraham", "Amadeus"
|
||||
59, 1986, 36, "William Hurt", "Kiss of the Spider Woman"
|
||||
60, 1987, 62, "Paul Newman", "The Color of Money"
|
||||
61, 1988, 43, "Michael Douglas", "Wall Street"
|
||||
62, 1989, 51, "Dustin Hoffman", "Rain Man"
|
||||
63, 1990, 32, "Daniel Day-Lewis", "My Left Foot"
|
||||
64, 1991, 42, "Jeremy Irons", "Reversal of Fortune"
|
||||
65, 1992, 54, "Anthony Hopkins", "The Silence of the Lambs"
|
||||
66, 1993, 52, "Al Pacino", "Scent of a Woman"
|
||||
67, 1994, 37, "Tom Hanks", "Philadelphia"
|
||||
68, 1995, 38, "Tom Hanks", "Forrest Gump"
|
||||
69, 1996, 32, "Nicolas Cage", "Leaving Las Vegas"
|
||||
70, 1997, 45, "Geoffrey Rush", "Shine"
|
||||
71, 1998, 60, "Jack Nicholson", "As Good as It Gets"
|
||||
72, 1999, 46, "Roberto Benigni", "Life Is Beautiful"
|
||||
73, 2000, 40, "Kevin Spacey", "American Beauty"
|
||||
74, 2001, 36, "Russell Crowe", "Gladiator"
|
||||
75, 2002, 47, "Denzel Washington", "Training Day"
|
||||
76, 2003, 29, "Adrien Brody", "The Pianist"
|
||||
77, 2004, 43, "Sean Penn", "Mystic River"
|
||||
78, 2005, 37, "Jamie Foxx", "Ray"
|
||||
79, 2006, 38, "Philip Seymour Hoffman", "Capote"
|
||||
80, 2007, 45, "Forest Whitaker", "The Last King of Scotland"
|
||||
81, 2008, 50, "Daniel Day-Lewis", "There Will Be Blood"
|
||||
82, 2009, 48, "Sean Penn", "Milk"
|
||||
83, 2010, 60, "Jeff Bridges", "Crazy Heart"
|
||||
84, 2011, 50, "Colin Firth", "The King's Speech"
|
||||
85, 2012, 39, "Jean Dujardin", "The Artist"
|
||||
86, 2013, 55, "Daniel Day-Lewis", "Lincoln"
|
||||
87, 2014, 44, "Matthew McConaughey", "Dallas Buyers Club"
|
||||
88, 2015, 33, "Eddie Redmayne", "The Theory of Everything"
|
||||
89, 2016, 41, "Leonardo DiCaprio", "The Revenant"
|
||||
|
Can't render this file because it contains an unexpected character in line 10 and column 47.
|
1
tests/fixtures/osx-10.14.6/group.json
vendored
Normal file
1
tests/fixtures/osx-10.14.6/group.json
vendored
Normal file
File diff suppressed because one or more lines are too long
135
tests/fixtures/osx-10.14.6/group.out
vendored
Normal file
135
tests/fixtures/osx-10.14.6/group.out
vendored
Normal file
@ -0,0 +1,135 @@
|
||||
##
|
||||
# Group Database
|
||||
#
|
||||
# Note that this file is consulted directly only when the system is running
|
||||
# in single-user mode. At other times this information is provided by
|
||||
# Open Directory.
|
||||
#
|
||||
# See the opendirectoryd(8) man page for additional information about
|
||||
# Open Directory.
|
||||
##
|
||||
nobody:*:-2:
|
||||
nogroup:*:-1:
|
||||
wheel:*:0:root
|
||||
daemon:*:1:root
|
||||
kmem:*:2:root
|
||||
sys:*:3:root
|
||||
tty:*:4:root
|
||||
operator:*:5:root
|
||||
mail:*:6:_teamsserver
|
||||
bin:*:7:
|
||||
procview:*:8:root
|
||||
procmod:*:9:root
|
||||
owner:*:10:
|
||||
everyone:*:12:
|
||||
_taskgated:*:13:_taskgated
|
||||
group:*:16:
|
||||
staff:*:20:root
|
||||
_networkd:*:24:
|
||||
_installassistant:*:25:
|
||||
_lp:*:26:
|
||||
_postfix:*:27:
|
||||
_postdrop:*:28:
|
||||
certusers:*:29:root,_jabber,_postfix,_cyrus,_calendar,_dovecot
|
||||
_keytabusers:*:30:_calendar,_jabber,_postfix
|
||||
_scsd:*:31:
|
||||
_ces:*:32:
|
||||
_appstore:*:33:_appstore
|
||||
utmp:*:45:
|
||||
authedusers:*:50:
|
||||
interactusers:*:51:
|
||||
netusers:*:52:
|
||||
consoleusers:*:53:
|
||||
_mcxalr:*:54:
|
||||
_appleevents:*:55:
|
||||
_geod:*:56:
|
||||
_devdocs:*:59:
|
||||
_sandbox:*:60:
|
||||
localaccounts:*:61:
|
||||
netaccounts:*:62:
|
||||
_mdnsresponder:*:65:
|
||||
_uucp:*:66:
|
||||
_ard:*:67:
|
||||
dialer:*:68:
|
||||
network:*:69:
|
||||
_www:*:70:_devicemgr,_teamsserver
|
||||
_eppc:*:71:_eppc
|
||||
_cvs:*:72:
|
||||
_svn:*:73:
|
||||
_mysql:*:74:
|
||||
_sshd:*:75:
|
||||
_qtss:*:76:
|
||||
_mailman:*:78:
|
||||
_appserverusr:*:79:
|
||||
admin:*:80:root
|
||||
_appserveradm:*:81:
|
||||
_clamav:*:82:
|
||||
_amavisd:*:83:
|
||||
_jabber:*:84:
|
||||
_appowner:*:87:
|
||||
_windowserver:*:88:
|
||||
_spotlight:*:89:
|
||||
accessibility:*:90:
|
||||
_tokend:*:91:
|
||||
_securityagent:*:92:
|
||||
_calendar:*:93:_teamsserver
|
||||
_teamsserver:*:94:_devicemgr
|
||||
_update_sharing:*:95:
|
||||
_installer:*:96:
|
||||
_atsserver:*:97:
|
||||
_lpadmin:*:98:
|
||||
_unknown:*:99:
|
||||
_lpoperator:*:100:
|
||||
_softwareupdate:*:200:_softwareupdate
|
||||
_guest:*:201:
|
||||
_coreaudiod:*:202:
|
||||
_screensaver:*:203:
|
||||
_developer:*:204:
|
||||
_locationd:*:205:
|
||||
_detachedsig:*:207:_locationd
|
||||
_trustevaluationagent:*:208:
|
||||
_odchpass:*:209:_teamsserver
|
||||
_timezone:*:210:
|
||||
_lda:*:211:
|
||||
_cvms:*:212:
|
||||
_usbmuxd:*:213:
|
||||
_postgres:*:216:_devicemgr,_calendar,_teamsserver,_xserverdocs
|
||||
_devicemgr:*:220:
|
||||
_webauthserver:*:221:_teamsserver,_devicemgr
|
||||
_netbios:*:222:
|
||||
_warmd:*:224:_warmd
|
||||
_dovenull:*:227:
|
||||
_netstatistics:*:228:
|
||||
_assetcache:*:235:
|
||||
_coremediaiod:*:236:
|
||||
_launchservicesd:*:239:
|
||||
_iconservices:*:240:
|
||||
_distnote:*:241:
|
||||
_nsurlsessiond:*:242:
|
||||
_nsurlstoraged:*:243:
|
||||
_displaypolicyd:*:244:
|
||||
_astris:*:245:
|
||||
_gamecontrollerd:*:247:
|
||||
_mbsetupuser:*:248:
|
||||
_ondemand:*:249:
|
||||
_analyticsusers:*:250:_analyticsd,_networkd,_timed,_reportmemoryexception
|
||||
_xserverdocs:*:251:
|
||||
_wwwproxy:*:252:
|
||||
_mobileasset:*:253:
|
||||
_findmydevice:*:254:
|
||||
_datadetectors:*:257:
|
||||
_captiveagent:*:258:
|
||||
_ctkd:*:259:
|
||||
_applepay:*:260:
|
||||
_hidd:*:261:
|
||||
_cmiodalassistants:*:262:
|
||||
_analyticsd:*:263:_analyticsd
|
||||
_webdeveloper:*:264:
|
||||
_fpsd:*:265:_fpsd
|
||||
_timed:*:266:
|
||||
_reportmemoryexception:*:269:_reportmemoryexception
|
||||
com.apple.access_ftp:*:395:
|
||||
com.apple.access_disabled:*:396:
|
||||
com.apple.access_sessionkey:*:397:
|
||||
com.apple.access_screensharing:*:398:
|
||||
com.apple.access_ssh:*:399:
|
1
tests/fixtures/osx-10.14.6/last.json
vendored
Normal file
1
tests/fixtures/osx-10.14.6/last.json
vendored
Normal file
File diff suppressed because one or more lines are too long
383
tests/fixtures/osx-10.14.6/last.out
vendored
Normal file
383
tests/fixtures/osx-10.14.6/last.out
vendored
Normal file
@ -0,0 +1,383 @@
|
||||
kbrazil ttys002 Fri Feb 28 14:45 still logged in
|
||||
kbrazil ttys003 Fri Feb 28 08:59 still logged in
|
||||
kbrazil ttys002 Thu Feb 27 14:31 - 14:31 (00:00)
|
||||
kbrazil ttys003 Thu Feb 27 10:38 - 10:38 (00:00)
|
||||
kbrazil ttys003 Thu Feb 27 10:18 - 10:18 (00:00)
|
||||
kbrazil ttys002 Fri Feb 21 08:47 - 08:47 (00:00)
|
||||
kbrazil ttys002 Thu Feb 20 14:53 - 14:53 (00:00)
|
||||
kbrazil ttys000 Thu Feb 13 16:44 - 16:44 (00:00)
|
||||
kbrazil ttys001 Tue Feb 11 21:25 still logged in
|
||||
kbrazil ttys000 Mon Feb 10 15:54 - 15:54 (00:00)
|
||||
kbrazil ttys000 Mon Feb 10 08:52 - 08:52 (00:00)
|
||||
kbrazil ttys001 Fri Feb 7 23:32 - 23:32 (00:00)
|
||||
kbrazil ttys000 Fri Feb 7 23:32 - 23:32 (00:00)
|
||||
kbrazil console Fri Feb 7 23:32 still logged in
|
||||
reboot ~ Fri Feb 7 23:31
|
||||
shutdown ~ Fri Feb 7 23:26
|
||||
root console Fri Feb 7 23:25 - shutdown (00:00)
|
||||
kbrazil ttys002 Fri Feb 7 11:19 - 11:19 (00:00)
|
||||
kbrazil ttys001 Fri Feb 7 11:19 - 11:19 (00:00)
|
||||
kbrazil console Fri Feb 7 07:51 - 23:25 (15:34)
|
||||
reboot ~ Fri Feb 7 07:51
|
||||
shutdown ~ Fri Feb 7 07:50
|
||||
kbrazil ttys000 Wed Feb 5 11:42 - 11:42 (00:00)
|
||||
kbrazil ttys001 Tue Feb 4 14:23 - 14:23 (00:00)
|
||||
kbrazil ttys000 Mon Feb 3 15:22 - 15:22 (00:00)
|
||||
kbrazil ttys000 Mon Feb 3 08:58 - 08:58 (00:00)
|
||||
kbrazil ttys001 Wed Jan 29 11:10 - 11:10 (00:00)
|
||||
kbrazil ttys000 Tue Jan 28 09:00 - 09:00 (00:00)
|
||||
kbrazil ttys000 Mon Jan 27 17:15 - 17:15 (00:00)
|
||||
kbrazil ttys000 Sun Jan 26 19:13 - 19:13 (00:00)
|
||||
kbrazil ttys000 Fri Jan 24 14:03 - 14:03 (00:00)
|
||||
kbrazil ttys000 Wed Jan 22 09:17 - 09:17 (00:00)
|
||||
kbrazil ttys000 Tue Jan 21 11:56 - 11:56 (00:00)
|
||||
kbrazil ttys000 Fri Jan 17 12:49 - 12:49 (00:00)
|
||||
kbrazil ttys000 Fri Jan 17 11:32 - 11:32 (00:00)
|
||||
kbrazil ttys000 Thu Jan 16 14:51 - 14:51 (00:00)
|
||||
kbrazil ttys000 Wed Jan 15 17:45 - 17:45 (00:00)
|
||||
kbrazil ttys000 Tue Jan 14 13:30 - 13:30 (00:00)
|
||||
kbrazil ttys000 Tue Jan 14 13:17 - 13:17 (00:00)
|
||||
kbrazil ttys004 Tue Jan 14 11:55 - 11:55 (00:00)
|
||||
kbrazil ttys002 Mon Jan 13 17:27 - 17:27 (00:00)
|
||||
kbrazil ttys000 Mon Jan 13 16:11 - 16:11 (00:00)
|
||||
kbrazil ttys000 Mon Jan 13 13:51 - 13:51 (00:00)
|
||||
kbrazil ttys000 Fri Jan 10 13:21 - 13:21 (00:00)
|
||||
kbrazil ttys000 Thu Jan 9 12:38 - 12:38 (00:00)
|
||||
kbrazil ttys000 Wed Jan 8 06:08 - 06:08 (00:00)
|
||||
kbrazil ttys000 Tue Jan 7 14:22 - 14:22 (00:00)
|
||||
kbrazil ttys000 Tue Jan 7 08:57 - 08:57 (00:00)
|
||||
kbrazil ttys002 Fri Jan 3 13:24 - 13:24 (00:00)
|
||||
kbrazil ttys000 Thu Jan 2 14:05 - 14:05 (00:00)
|
||||
kbrazil ttys000 Thu Jan 2 10:07 - 10:07 (00:00)
|
||||
kbrazil ttys004 Mon Dec 16 14:17 - 14:17 (00:00)
|
||||
kbrazil ttys002 Mon Dec 16 11:14 - 11:14 (00:00)
|
||||
kbrazil ttys000 Thu Dec 12 12:10 - 12:10 (00:00)
|
||||
kbrazil console Thu Dec 12 12:10 - 07:50 (56+19:39)
|
||||
reboot ~ Thu Dec 12 12:09
|
||||
shutdown ~ Thu Dec 12 12:09
|
||||
kbrazil ttys000 Thu Dec 12 00:15 - 00:15 (00:00)
|
||||
kbrazil console Thu Dec 12 00:15 - 12:09 (11:54)
|
||||
reboot ~ Thu Dec 12 00:14
|
||||
shutdown ~ Thu Dec 12 00:08
|
||||
root console Thu Dec 12 00:08 - shutdown (00:00)
|
||||
kbrazil ttys000 Wed Dec 11 16:17 - 16:17 (00:00)
|
||||
kbrazil ttys000 Wed Dec 11 16:16 - 16:16 (00:00)
|
||||
kbrazil ttys000 Fri Dec 6 10:41 - 10:41 (00:00)
|
||||
kbrazil ttys003 Fri Dec 6 07:32 - 07:32 (00:00)
|
||||
kbrazil ttys003 Mon Dec 2 23:44 - 23:44 (00:00)
|
||||
kbrazil ttys002 Mon Dec 2 23:39 - 23:39 (00:00)
|
||||
kbrazil ttys000 Mon Dec 2 23:07 - 23:07 (00:00)
|
||||
kbrazil ttys002 Mon Dec 2 16:23 - 16:23 (00:00)
|
||||
kbrazil ttys001 Mon Dec 2 16:22 - 16:22 (00:00)
|
||||
kbrazil ttys000 Mon Dec 2 15:50 - 15:50 (00:00)
|
||||
kbrazil ttys000 Mon Dec 2 13:50 - 13:50 (00:00)
|
||||
kbrazil ttys000 Mon Dec 2 12:47 - 12:47 (00:00)
|
||||
kbrazil ttys000 Mon Dec 2 12:06 - 12:06 (00:00)
|
||||
kbrazil ttys004 Wed Nov 27 09:19 - 09:19 (00:00)
|
||||
kbrazil ttys005 Mon Nov 25 08:08 - 08:08 (00:00)
|
||||
kbrazil ttys004 Thu Nov 21 17:23 - 17:23 (00:00)
|
||||
kbrazil ttys002 Thu Nov 21 10:28 - 10:28 (00:00)
|
||||
kbrazil ttys002 Wed Nov 20 09:35 - 09:35 (00:00)
|
||||
kbrazil ttys003 Mon Nov 11 12:49 - 12:49 (00:00)
|
||||
kbrazil ttys002 Sun Nov 10 13:52 - 13:52 (00:00)
|
||||
kbrazil ttys000 Sat Nov 9 10:34 - 10:34 (00:00)
|
||||
kbrazil ttys001 Fri Nov 8 15:37 - 15:37 (00:00)
|
||||
kbrazil ttys000 Fri Nov 8 14:01 - 14:01 (00:00)
|
||||
kbrazil ttys002 Fri Nov 8 10:57 - 10:57 (00:00)
|
||||
kbrazil ttys002 Fri Nov 8 06:29 - 06:29 (00:00)
|
||||
kbrazil ttys000 Fri Nov 8 06:22 - 06:22 (00:00)
|
||||
kbrazil ttys001 Thu Nov 7 19:00 - 19:00 (00:00)
|
||||
kbrazil ttys000 Wed Nov 6 15:19 - 15:19 (00:00)
|
||||
kbrazil ttys005 Mon Nov 4 07:54 - 07:54 (00:00)
|
||||
kbrazil ttys003 Fri Nov 1 15:13 - 15:13 (00:00)
|
||||
kbrazil ttys001 Fri Nov 1 15:13 - 15:13 (00:00)
|
||||
kbrazil ttys001 Fri Nov 1 11:55 - 11:55 (00:00)
|
||||
kbrazil ttys001 Fri Nov 1 11:16 - 11:16 (00:00)
|
||||
kbrazil ttys001 Fri Nov 1 06:31 - 06:31 (00:00)
|
||||
kbrazil ttys001 Thu Oct 31 14:13 - 14:13 (00:00)
|
||||
kbrazil ttys001 Thu Oct 31 11:57 - 11:57 (00:00)
|
||||
kbrazil console Thu Oct 31 09:37 - 00:08 (41+15:30)
|
||||
reboot ~ Thu Oct 31 09:37
|
||||
shutdown ~ Thu Oct 31 09:30
|
||||
root console Thu Oct 31 09:30 - shutdown (00:00)
|
||||
kbrazil ttys006 Thu Oct 31 07:35 - 07:35 (00:00)
|
||||
kbrazil ttys004 Wed Oct 30 13:25 - 13:25 (00:00)
|
||||
kbrazil ttys000 Tue Oct 29 18:16 - 18:16 (00:00)
|
||||
kbrazil ttys004 Tue Oct 29 08:04 - 08:04 (00:00)
|
||||
kbrazil ttys002 Mon Oct 28 21:58 - 21:58 (00:00)
|
||||
kbrazil ttys001 Mon Oct 28 21:58 - 21:58 (00:00)
|
||||
kbrazil ttys000 Mon Oct 28 21:58 - 21:58 (00:00)
|
||||
kbrazil console Mon Oct 28 21:58 - 09:30 (2+11:31)
|
||||
reboot ~ Mon Oct 28 21:57
|
||||
shutdown ~ Mon Oct 28 21:57
|
||||
kbrazil ttys007 Mon Oct 28 12:13 - 12:13 (00:00)
|
||||
kbrazil ttys006 Thu Oct 24 15:57 - 15:57 (00:00)
|
||||
kbrazil ttys006 Tue Oct 22 17:06 - 17:06 (00:00)
|
||||
kbrazil ttys002 Mon Oct 21 12:08 - 12:08 (00:00)
|
||||
kbrazil ttys001 Mon Oct 21 12:08 - 12:08 (00:00)
|
||||
kbrazil ttys000 Mon Oct 21 12:08 - 12:08 (00:00)
|
||||
kbrazil console Mon Oct 21 12:04 - 21:57 (7+09:52)
|
||||
reboot ~ Mon Oct 21 12:03
|
||||
shutdown ~ Mon Oct 21 12:00
|
||||
root console Mon Oct 21 11:59 - shutdown (00:00)
|
||||
kbrazil ttys000 Thu Oct 17 17:08 - 17:08 (00:00)
|
||||
kbrazil ttys004 Tue Oct 15 11:36 - 11:36 (00:00)
|
||||
kbrazil ttys003 Tue Oct 15 11:10 - 11:10 (00:00)
|
||||
kbrazil ttys002 Fri Oct 4 15:07 - 15:07 (00:00)
|
||||
kbrazil ttys001 Thu Oct 3 11:45 - 11:45 (00:00)
|
||||
kbrazil ttys001 Thu Oct 3 07:33 - 07:33 (00:00)
|
||||
kbrazil ttys001 Wed Oct 2 17:03 - 17:03 (00:00)
|
||||
kbrazil ttys001 Wed Oct 2 15:39 - 15:39 (00:00)
|
||||
kbrazil ttys001 Wed Oct 2 14:18 - 14:18 (00:00)
|
||||
kbrazil console Wed Oct 2 12:47 - 11:59 (18+23:12)
|
||||
reboot ~ Wed Oct 2 12:47
|
||||
shutdown ~ Wed Oct 2 12:46
|
||||
kbrazil ttys002 Wed Oct 2 12:15 - 12:15 (00:00)
|
||||
kbrazil ttys001 Wed Oct 2 12:06 - 12:06 (00:00)
|
||||
kbrazil ttys001 Wed Oct 2 11:54 - 11:54 (00:00)
|
||||
kbrazil ttys003 Mon Sep 30 16:29 - 16:29 (00:00)
|
||||
kbrazil ttys002 Fri Sep 27 15:55 - 15:55 (00:00)
|
||||
kbrazil ttys001 Fri Sep 27 15:51 - 15:51 (00:00)
|
||||
kbrazil console Fri Sep 27 15:18 - 12:46 (4+21:28)
|
||||
reboot ~ Fri Sep 27 15:17
|
||||
shutdown ~ Fri Sep 27 15:15
|
||||
kbrazil ttys001 Fri Sep 27 06:44 - 06:44 (00:00)
|
||||
kbrazil ttys001 Thu Sep 26 15:22 - 15:22 (00:00)
|
||||
kbrazil ttys001 Wed Sep 25 15:09 - 15:09 (00:00)
|
||||
kbrazil ttys001 Wed Sep 25 08:16 - 08:16 (00:00)
|
||||
kbrazil ttys001 Tue Sep 24 16:42 - 16:42 (00:00)
|
||||
kbrazil ttys001 Tue Sep 24 14:20 - 14:20 (00:00)
|
||||
kbrazil ttys001 Tue Sep 24 10:03 - 10:03 (00:00)
|
||||
kbrazil ttys003 Wed Sep 18 12:17 - 12:17 (00:00)
|
||||
kbrazil ttys002 Wed Sep 18 12:14 - 12:14 (00:00)
|
||||
kbrazil ttys001 Wed Sep 18 12:09 - 12:09 (00:00)
|
||||
kbrazil ttys001 Wed Sep 18 12:09 - 12:09 (00:00)
|
||||
kbrazil ttys004 Wed Sep 18 11:25 - 11:25 (00:00)
|
||||
kbrazil ttys002 Wed Sep 18 11:13 - 11:13 (00:00)
|
||||
kbrazil ttys001 Tue Sep 17 16:31 - 16:31 (00:00)
|
||||
kbrazil ttys002 Tue Sep 17 15:53 - 15:53 (00:00)
|
||||
kbrazil ttys001 Tue Sep 17 14:41 - 14:41 (00:00)
|
||||
kbrazil ttys001 Tue Sep 17 14:34 - 14:34 (00:00)
|
||||
kbrazil console Tue Sep 17 13:54 - 15:15 (10+01:20)
|
||||
reboot ~ Tue Sep 17 13:54
|
||||
shutdown ~ Tue Sep 17 13:53
|
||||
kbrazil ttys001 Tue Sep 17 07:03 - 07:03 (00:00)
|
||||
kbrazil ttys001 Mon Sep 16 08:50 - 08:50 (00:00)
|
||||
kbrazil ttys001 Fri Sep 13 02:36 - 02:36 (00:00)
|
||||
kbrazil ttys001 Fri Sep 13 02:10 - 02:10 (00:00)
|
||||
kbrazil ttys001 Thu Sep 12 05:15 - 05:15 (00:00)
|
||||
kbrazil ttys001 Tue Sep 10 04:42 - 04:42 (00:00)
|
||||
kbrazil ttys002 Fri Sep 6 10:15 - 10:15 (00:00)
|
||||
kbrazil ttys001 Fri Sep 6 09:20 - 09:20 (00:00)
|
||||
kbrazil ttys002 Wed Sep 4 14:19 - 14:19 (00:00)
|
||||
kbrazil ttys001 Wed Sep 4 13:54 - 13:54 (00:00)
|
||||
kbrazil ttys001 Wed Sep 4 09:10 - 09:10 (00:00)
|
||||
kbrazil ttys001 Tue Sep 3 14:59 - 14:59 (00:00)
|
||||
kbrazil ttys001 Tue Sep 3 10:56 - 10:56 (00:00)
|
||||
kbrazil ttys001 Tue Sep 3 08:32 - 08:32 (00:00)
|
||||
kbrazil ttys002 Thu Aug 29 17:21 - 17:21 (00:00)
|
||||
kbrazil ttys001 Thu Aug 29 17:13 - 17:13 (00:00)
|
||||
kbrazil ttys001 Thu Aug 29 14:48 - 14:48 (00:00)
|
||||
kbrazil ttys003 Thu Aug 29 14:36 - 14:36 (00:00)
|
||||
kbrazil ttys002 Thu Aug 29 14:35 - 14:35 (00:00)
|
||||
kbrazil ttys001 Thu Aug 29 14:28 - 14:28 (00:00)
|
||||
kbrazil ttys003 Thu Aug 29 12:47 - 12:47 (00:00)
|
||||
kbrazil ttys003 Thu Aug 29 09:47 - 09:47 (00:00)
|
||||
kbrazil ttys002 Thu Aug 29 09:41 - 09:41 (00:00)
|
||||
kbrazil ttys001 Thu Aug 29 09:32 - 09:32 (00:00)
|
||||
kbrazil ttys001 Thu Aug 29 09:30 - 09:30 (00:00)
|
||||
kbrazil ttys001 Wed Aug 28 14:29 - 14:29 (00:00)
|
||||
kbrazil console Tue Aug 27 21:22 - 13:53 (20+16:31)
|
||||
reboot ~ Tue Aug 27 21:21
|
||||
shutdown ~ Tue Aug 27 21:17
|
||||
root console Tue Aug 27 21:17 - shutdown (00:00)
|
||||
kbrazil ttys002 Mon Aug 26 15:09 - 15:09 (00:00)
|
||||
kbrazil ttys002 Mon Aug 26 07:54 - 07:54 (00:00)
|
||||
kbrazil ttys002 Fri Aug 23 16:22 - 16:22 (00:00)
|
||||
kbrazil ttys001 Fri Aug 23 15:21 - 15:21 (00:00)
|
||||
kbrazil ttys000 Fri Aug 23 15:19 - 15:19 (00:00)
|
||||
kbrazil ttys000 Fri Aug 23 06:46 - 06:46 (00:00)
|
||||
kbrazil ttys000 Thu Aug 22 17:48 - 17:48 (00:00)
|
||||
kbrazil ttys003 Thu Aug 22 14:21 - 14:21 (00:00)
|
||||
kbrazil ttys002 Thu Aug 22 14:21 - 14:21 (00:00)
|
||||
kbrazil ttys001 Thu Aug 22 14:21 - 14:21 (00:00)
|
||||
kbrazil ttys000 Thu Aug 22 14:21 - 14:21 (00:00)
|
||||
kbrazil console Thu Aug 22 14:20 - 21:17 (5+06:56)
|
||||
reboot ~ Thu Aug 22 14:20
|
||||
shutdown ~ Thu Aug 22 14:17
|
||||
kbrazil ttys004 Wed Aug 21 15:24 - 15:24 (00:00)
|
||||
kbrazil ttys000 Tue Aug 20 19:52 - 19:52 (00:00)
|
||||
kbrazil ttys003 Tue Aug 20 16:32 - 16:32 (00:00)
|
||||
kbrazil ttys003 Mon Aug 19 17:51 - 17:51 (00:00)
|
||||
kbrazil ttys002 Mon Aug 19 14:42 - 14:42 (00:00)
|
||||
kbrazil ttys000 Mon Aug 19 14:02 - 14:02 (00:00)
|
||||
kbrazil ttys002 Sat Aug 17 10:02 - 10:02 (00:00)
|
||||
kbrazil ttys000 Fri Aug 16 18:20 - 18:20 (00:00)
|
||||
kbrazil ttys000 Fri Aug 16 06:46 - 06:46 (00:00)
|
||||
kbrazil ttys003 Thu Aug 15 17:07 - 17:07 (00:00)
|
||||
kbrazil ttys000 Thu Aug 15 17:00 - 17:00 (00:00)
|
||||
kbrazil ttys003 Thu Aug 15 16:01 - 16:01 (00:00)
|
||||
kbrazil ttys000 Thu Aug 15 15:55 - 15:55 (00:00)
|
||||
kbrazil ttys005 Thu Aug 15 14:48 - 14:48 (00:00)
|
||||
kbrazil ttys005 Thu Aug 15 14:45 - 14:45 (00:00)
|
||||
kbrazil ttys003 Thu Aug 15 14:35 - 14:35 (00:00)
|
||||
kbrazil ttys000 Thu Aug 15 14:24 - 14:24 (00:00)
|
||||
kbrazil ttys005 Thu Aug 15 10:57 - 10:57 (00:00)
|
||||
kbrazil ttys003 Thu Aug 15 10:48 - 10:48 (00:00)
|
||||
kbrazil ttys002 Thu Aug 15 10:43 - 10:43 (00:00)
|
||||
kbrazil ttys000 Thu Aug 15 10:39 - 10:39 (00:00)
|
||||
kbrazil console Thu Aug 15 10:39 - 14:17 (7+03:37)
|
||||
reboot ~ Thu Aug 15 10:39
|
||||
shutdown ~ Thu Aug 15 10:38
|
||||
kbrazil ttys000 Thu Aug 15 08:56 - 08:56 (00:00)
|
||||
kbrazil ttys004 Thu Aug 15 08:09 - 08:09 (00:00)
|
||||
kbrazil ttys002 Thu Aug 15 08:08 - 08:08 (00:00)
|
||||
kbrazil ttys000 Wed Aug 14 18:12 - 18:12 (00:00)
|
||||
kbrazil ttys000 Wed Aug 14 15:08 - 15:08 (00:00)
|
||||
kbrazil ttys004 Wed Aug 14 09:11 - 09:11 (00:00)
|
||||
kbrazil ttys002 Wed Aug 14 09:03 - 09:03 (00:00)
|
||||
kbrazil ttys000 Tue Aug 13 14:47 - 14:47 (00:00)
|
||||
kbrazil ttys001 Tue Aug 13 11:14 - 11:14 (00:00)
|
||||
kbrazil ttys000 Tue Aug 13 11:14 - 11:14 (00:00)
|
||||
kbrazil ttys001 Tue Aug 13 10:54 - 10:54 (00:00)
|
||||
kbrazil ttys000 Tue Aug 13 10:43 - 10:43 (00:00)
|
||||
kbrazil ttys000 Tue Aug 13 10:29 - 10:29 (00:00)
|
||||
kbrazil ttys000 Tue Aug 13 09:27 - 09:27 (00:00)
|
||||
kbrazil ttys000 Tue Aug 13 05:40 - 05:40 (00:00)
|
||||
kbrazil ttys000 Mon Aug 12 14:11 - 14:11 (00:00)
|
||||
kbrazil ttys002 Mon Aug 12 13:54 - 13:54 (00:00)
|
||||
kbrazil ttys001 Mon Aug 12 13:54 - 13:54 (00:00)
|
||||
kbrazil ttys000 Mon Aug 12 13:54 - 13:54 (00:00)
|
||||
kbrazil console Mon Aug 12 13:54 - 10:38 (2+20:44)
|
||||
reboot ~ Mon Aug 12 13:53
|
||||
shutdown ~ Mon Aug 12 13:52
|
||||
kbrazil ttys002 Mon Aug 12 13:37 - 13:37 (00:00)
|
||||
kbrazil ttys004 Thu Aug 8 09:15 - 09:15 (00:00)
|
||||
kbrazil ttys003 Thu Aug 8 09:14 - 09:14 (00:00)
|
||||
kbrazil ttys002 Thu Aug 8 09:03 - 09:03 (00:00)
|
||||
kbrazil ttys002 Thu Aug 8 07:17 - 07:17 (00:00)
|
||||
kbrazil ttys000 Mon Aug 5 10:57 - 10:57 (00:00)
|
||||
kbrazil ttys000 Mon Aug 5 08:34 - 08:34 (00:00)
|
||||
kbrazil console Mon Aug 5 08:29 - 13:52 (7+05:23)
|
||||
reboot ~ Mon Aug 5 08:28
|
||||
shutdown ~ Mon Aug 5 08:25
|
||||
root console Mon Aug 5 08:24 - shutdown (00:01)
|
||||
kbrazil ttys002 Sat Aug 3 07:20 - 07:20 (00:00)
|
||||
kbrazil ttys001 Sat Aug 3 06:54 - 06:54 (00:00)
|
||||
kbrazil ttys005 Fri Aug 2 10:21 - 10:21 (00:00)
|
||||
kbrazil ttys004 Fri Aug 2 10:21 - 10:21 (00:00)
|
||||
kbrazil ttys003 Fri Aug 2 10:21 - 10:21 (00:00)
|
||||
kbrazil ttys002 Fri Aug 2 10:21 - 10:21 (00:00)
|
||||
kbrazil ttys001 Fri Aug 2 10:21 - 10:21 (00:00)
|
||||
kbrazil console Fri Aug 2 07:00 - 08:24 (3+01:23)
|
||||
reboot ~ Fri Aug 2 07:00
|
||||
shutdown ~ Fri Aug 2 06:59
|
||||
kbrazil console Fri Aug 2 06:06 - 06:59 (00:53)
|
||||
reboot ~ Fri Aug 2 06:06
|
||||
shutdown ~ Fri Aug 2 06:05
|
||||
kbrazil ttys010 Wed Jul 31 08:44 - 08:44 (00:00)
|
||||
kbrazil ttys010 Tue Jul 30 14:48 - 14:48 (00:00)
|
||||
kbrazil ttys008 Tue Jul 30 08:23 - 08:23 (00:00)
|
||||
kbrazil ttys006 Tue Jul 30 07:24 - 07:24 (00:00)
|
||||
kbrazil ttys006 Mon Jul 29 13:32 - 13:32 (00:00)
|
||||
kbrazil ttys003 Mon Jul 29 12:50 - 12:50 (00:00)
|
||||
kbrazil ttys003 Mon Jul 29 12:46 - 12:46 (00:00)
|
||||
kbrazil ttys001 Sun Jul 28 14:12 - 14:12 (00:00)
|
||||
kbrazil console Sun Jul 28 14:07 - 06:04 (4+15:57)
|
||||
reboot ~ Sun Jul 28 14:07
|
||||
shutdown ~ Sun Jul 28 14:06
|
||||
kbrazil ttys002 Sun Jul 28 13:17 - 13:17 (00:00)
|
||||
kbrazil ttys000 Sun Jul 28 13:17 - 13:17 (00:00)
|
||||
kbrazil ttys002 Sun Jul 28 13:16 - 13:16 (00:00)
|
||||
kbrazil ttys001 Sun Jul 28 13:16 - 13:16 (00:00)
|
||||
kbrazil ttys000 Sun Jul 28 13:16 - 13:16 (00:00)
|
||||
kbrazil console Sun Jul 28 13:16 - 14:06 (00:50)
|
||||
reboot ~ Sun Jul 28 13:16
|
||||
shutdown ~ Sun Jul 28 13:15
|
||||
kbrazil ttys003 Sun Jul 28 13:12 - 13:12 (00:00)
|
||||
kbrazil ttys001 Sun Jul 28 13:10 - 13:10 (00:00)
|
||||
kbrazil ttys005 Sun Jul 28 12:38 - 12:38 (00:00)
|
||||
kbrazil ttys005 Sun Jul 28 12:01 - 12:01 (00:00)
|
||||
kbrazil ttys005 Sun Jul 28 08:17 - 08:17 (00:00)
|
||||
kbrazil ttys005 Sat Jul 27 18:36 - 18:36 (00:00)
|
||||
kbrazil ttys003 Sat Jul 27 18:25 - 18:25 (00:00)
|
||||
kbrazil ttys001 Sat Jul 27 18:19 - 18:19 (00:00)
|
||||
kbrazil ttys002 Fri Jul 26 10:58 - 10:58 (00:00)
|
||||
kbrazil ttys002 Fri Jul 26 08:16 - 08:16 (00:00)
|
||||
kbrazil console Thu Jul 25 18:38 - 13:15 (2+18:36)
|
||||
reboot ~ Thu Jul 25 18:38
|
||||
shutdown ~ Thu Jul 25 18:37
|
||||
kbrazil ttys004 Thu Jul 25 10:57 - 10:57 (00:00)
|
||||
kbrazil ttys004 Thu Jul 25 08:33 - 08:33 (00:00)
|
||||
kbrazil ttys002 Wed Jul 24 14:39 - 14:39 (00:00)
|
||||
kbrazil ttys005 Wed Jul 24 12:13 - 12:13 (00:00)
|
||||
kbrazil ttys004 Wed Jul 24 10:51 - 10:51 (00:00)
|
||||
kbrazil ttys002 Wed Jul 24 10:17 - 10:17 (00:00)
|
||||
kbrazil ttys000 Wed Jul 24 02:54 - 02:54 (00:00)
|
||||
kbrazil console Tue Jul 23 20:16 - 18:37 (1+22:21)
|
||||
reboot ~ Tue Jul 23 20:15
|
||||
shutdown ~ Tue Jul 23 20:09
|
||||
root console Tue Jul 23 20:07 - shutdown (00:01)
|
||||
kbrazil ttys001 Tue Jul 23 07:03 - 07:03 (00:00)
|
||||
kbrazil ttys007 Tue Jul 16 14:57 - 14:57 (00:00)
|
||||
kbrazil ttys007 Mon Jul 15 14:45 - 14:45 (00:00)
|
||||
kbrazil ttys005 Mon Jul 15 14:38 - 14:38 (00:00)
|
||||
kbrazil ttys004 Mon Jul 15 12:12 - 12:12 (00:00)
|
||||
kbrazil ttys002 Fri Jul 12 15:42 - 15:42 (00:00)
|
||||
kbrazil ttys000 Fri Jul 12 14:40 - 14:40 (00:00)
|
||||
kbrazil ttys000 Fri Jul 12 08:45 - 08:45 (00:00)
|
||||
kbrazil ttys000 Thu Jul 11 14:42 - 14:42 (00:00)
|
||||
kbrazil ttys000 Thu Jul 11 12:03 - 12:03 (00:00)
|
||||
kbrazil ttys000 Thu Jul 11 11:41 - 11:41 (00:00)
|
||||
kbrazil console Thu Jul 11 11:41 - 20:07 (12+08:25)
|
||||
reboot ~ Thu Jul 11 11:41
|
||||
shutdown ~ Thu Jul 11 11:41
|
||||
kbrazil ttys001 Thu Jul 11 11:38 - 11:38 (00:00)
|
||||
kbrazil ttys002 Thu Jul 11 10:32 - 10:32 (00:00)
|
||||
kbrazil ttys001 Thu Jul 11 08:24 - 08:24 (00:00)
|
||||
kbrazil ttys001 Thu Jul 11 08:17 - 08:17 (00:00)
|
||||
kbrazil ttys001 Thu Jul 11 08:09 - 08:09 (00:00)
|
||||
kbrazil ttys001 Thu Jul 11 08:07 - 08:07 (00:00)
|
||||
kbrazil ttys001 Thu Jul 11 08:03 - 08:03 (00:00)
|
||||
kbrazil ttys001 Thu Jul 11 07:57 - 07:57 (00:00)
|
||||
kbrazil ttys001 Thu Jul 11 07:52 - 07:52 (00:00)
|
||||
kbrazil ttys001 Wed Jul 10 17:35 - 17:35 (00:00)
|
||||
kbrazil ttys003 Wed Jul 10 16:58 - 16:58 (00:00)
|
||||
kbrazil ttys002 Wed Jul 10 16:39 - 16:39 (00:00)
|
||||
kbrazil ttys001 Wed Jul 10 07:51 - 07:51 (00:00)
|
||||
kbrazil ttys000 Tue Jul 9 22:30 - 22:30 (00:00)
|
||||
kbrazil ttys000 Tue Jul 9 22:14 - 22:14 (00:00)
|
||||
kbrazil ttys001 Tue Jul 9 22:14 - 22:14 (00:00)
|
||||
kbrazil ttys000 Tue Jul 9 22:14 - 22:14 (00:00)
|
||||
kbrazil ttys000 Tue Jul 9 22:12 - 22:12 (00:00)
|
||||
kbrazil ttys003 Tue Jul 9 22:11 - 22:11 (00:00)
|
||||
kbrazil ttys002 Tue Jul 9 22:11 - 22:11 (00:00)
|
||||
kbrazil ttys001 Tue Jul 9 22:11 - 22:11 (00:00)
|
||||
kbrazil ttys000 Tue Jul 9 22:11 - 22:11 (00:00)
|
||||
kbrazil ttys001 Tue Jul 9 22:10 - 22:10 (00:00)
|
||||
kbrazil ttys000 Tue Jul 9 22:04 - 22:04 (00:00)
|
||||
kbrazil console Tue Jul 9 08:29 - 11:41 (2+03:11)
|
||||
reboot ~ Tue Jul 9 08:29
|
||||
shutdown ~ Tue Jul 9 08:27
|
||||
kbrazil console Mon Jul 8 18:07 - 08:27 (14:20)
|
||||
reboot ~ Mon Jul 8 18:07
|
||||
shutdown ~ Mon Jul 8 18:06
|
||||
kbrazil console Mon Jul 8 17:47 - 18:06 (00:18)
|
||||
reboot ~ Mon Jul 8 17:47
|
||||
shutdown ~ Mon Jul 8 17:47
|
||||
kbrazil console Tue Jul 2 11:49 - 17:47 (6+05:58)
|
||||
reboot ~ Tue Jul 2 11:48
|
||||
shutdown ~ Tue Jul 2 11:44
|
||||
kbrazil console Tue Jul 2 10:44 - 11:44 (00:59)
|
||||
reboot ~ Tue Jul 2 10:43
|
||||
shutdown ~ Tue Jul 2 10:00
|
||||
kbrazil console Tue Jul 2 09:52 - 10:00 (00:08)
|
||||
reboot ~ Tue Jul 2 09:50
|
||||
shutdown ~ Tue Jul 2 09:37
|
||||
kbrazil console Tue Jul 2 08:56 - 09:37 (00:40)
|
||||
_mbsetupuser console Tue Jul 2 08:52 - 08:57 (00:05)
|
||||
root console Tue Jul 2 08:52 - 08:52 (00:00)
|
||||
reboot ~ Tue Jul 2 08:51
|
||||
reboot ~ Fri Jun 21 15:54
|
||||
|
||||
wtmp begins Fri Jun 21 15:54
|
1
tests/fixtures/osx-10.14.6/passwd.json
vendored
Normal file
1
tests/fixtures/osx-10.14.6/passwd.json
vendored
Normal file
File diff suppressed because one or more lines are too long
108
tests/fixtures/osx-10.14.6/passwd.out
vendored
Normal file
108
tests/fixtures/osx-10.14.6/passwd.out
vendored
Normal file
@ -0,0 +1,108 @@
|
||||
##
|
||||
# User Database
|
||||
#
|
||||
# Note that this file is consulted directly only when the system is running
|
||||
# in single-user mode. At other times this information is provided by
|
||||
# Open Directory.
|
||||
#
|
||||
# See the opendirectoryd(8) man page for additional information about
|
||||
# Open Directory.
|
||||
##
|
||||
nobody:*:-2:-2:Unprivileged User:/var/empty:/usr/bin/false
|
||||
root:*:0:0:System Administrator:/var/root:/bin/sh
|
||||
daemon:*:1:1:System Services:/var/root:/usr/bin/false
|
||||
_uucp:*:4:4:Unix to Unix Copy Protocol:/var/spool/uucp:/usr/sbin/uucico
|
||||
_taskgated:*:13:13:Task Gate Daemon:/var/empty:/usr/bin/false
|
||||
_networkd:*:24:24:Network Services:/var/networkd:/usr/bin/false
|
||||
_installassistant:*:25:25:Install Assistant:/var/empty:/usr/bin/false
|
||||
_lp:*:26:26:Printing Services:/var/spool/cups:/usr/bin/false
|
||||
_postfix:*:27:27:Postfix Mail Server:/var/spool/postfix:/usr/bin/false
|
||||
_scsd:*:31:31:Service Configuration Service:/var/empty:/usr/bin/false
|
||||
_ces:*:32:32:Certificate Enrollment Service:/var/empty:/usr/bin/false
|
||||
_appstore:*:33:33:Mac App Store Service:/var/empty:/usr/bin/false
|
||||
_mcxalr:*:54:54:MCX AppLaunch:/var/empty:/usr/bin/false
|
||||
_appleevents:*:55:55:AppleEvents Daemon:/var/empty:/usr/bin/false
|
||||
_geod:*:56:56:Geo Services Daemon:/var/db/geod:/usr/bin/false
|
||||
_devdocs:*:59:59:Developer Documentation:/var/empty:/usr/bin/false
|
||||
_sandbox:*:60:60:Seatbelt:/var/empty:/usr/bin/false
|
||||
_mdnsresponder:*:65:65:mDNSResponder:/var/empty:/usr/bin/false
|
||||
_ard:*:67:67:Apple Remote Desktop:/var/empty:/usr/bin/false
|
||||
_www:*:70:70:World Wide Web Server:/Library/WebServer:/usr/bin/false
|
||||
_eppc:*:71:71:Apple Events User:/var/empty:/usr/bin/false
|
||||
_cvs:*:72:72:CVS Server:/var/empty:/usr/bin/false
|
||||
_svn:*:73:73:SVN Server:/var/empty:/usr/bin/false
|
||||
_mysql:*:74:74:MySQL Server:/var/empty:/usr/bin/false
|
||||
_sshd:*:75:75:sshd Privilege separation:/var/empty:/usr/bin/false
|
||||
_qtss:*:76:76:QuickTime Streaming Server:/var/empty:/usr/bin/false
|
||||
_cyrus:*:77:6:Cyrus Administrator:/var/imap:/usr/bin/false
|
||||
_mailman:*:78:78:Mailman List Server:/var/empty:/usr/bin/false
|
||||
_appserver:*:79:79:Application Server:/var/empty:/usr/bin/false
|
||||
_clamav:*:82:82:ClamAV Daemon:/var/virusmails:/usr/bin/false
|
||||
_amavisd:*:83:83:AMaViS Daemon:/var/virusmails:/usr/bin/false
|
||||
_jabber:*:84:84:Jabber XMPP Server:/var/empty:/usr/bin/false
|
||||
_appowner:*:87:87:Application Owner:/var/empty:/usr/bin/false
|
||||
_windowserver:*:88:88:WindowServer:/var/empty:/usr/bin/false
|
||||
_spotlight:*:89:89:Spotlight:/var/empty:/usr/bin/false
|
||||
_tokend:*:91:91:Token Daemon:/var/empty:/usr/bin/false
|
||||
_securityagent:*:92:92:SecurityAgent:/var/db/securityagent:/usr/bin/false
|
||||
_calendar:*:93:93:Calendar:/var/empty:/usr/bin/false
|
||||
_teamsserver:*:94:94:TeamsServer:/var/teamsserver:/usr/bin/false
|
||||
_update_sharing:*:95:-2:Update Sharing:/var/empty:/usr/bin/false
|
||||
_installer:*:96:-2:Installer:/var/empty:/usr/bin/false
|
||||
_atsserver:*:97:97:ATS Server:/var/empty:/usr/bin/false
|
||||
_ftp:*:98:-2:FTP Daemon:/var/empty:/usr/bin/false
|
||||
_unknown:*:99:99:Unknown User:/var/empty:/usr/bin/false
|
||||
_softwareupdate:*:200:200:Software Update Service:/var/db/softwareupdate:/usr/bin/false
|
||||
_coreaudiod:*:202:202:Core Audio Daemon:/var/empty:/usr/bin/false
|
||||
_screensaver:*:203:203:Screensaver:/var/empty:/usr/bin/false
|
||||
_locationd:*:205:205:Location Daemon:/var/db/locationd:/usr/bin/false
|
||||
_trustevaluationagent:*:208:208:Trust Evaluation Agent:/var/empty:/usr/bin/false
|
||||
_timezone:*:210:210:AutoTimeZoneDaemon:/var/empty:/usr/bin/false
|
||||
_lda:*:211:211:Local Delivery Agent:/var/empty:/usr/bin/false
|
||||
_cvmsroot:*:212:212:CVMS Root:/var/empty:/usr/bin/false
|
||||
_usbmuxd:*:213:213:iPhone OS Device Helper:/var/db/lockdown:/usr/bin/false
|
||||
_dovecot:*:214:6:Dovecot Administrator:/var/empty:/usr/bin/false
|
||||
_dpaudio:*:215:215:DP Audio:/var/empty:/usr/bin/false
|
||||
_postgres:*:216:216:PostgreSQL Server:/var/empty:/usr/bin/false
|
||||
_krbtgt:*:217:-2:Kerberos Ticket Granting Ticket:/var/empty:/usr/bin/false
|
||||
_kadmin_admin:*:218:-2:Kerberos Admin Service:/var/empty:/usr/bin/false
|
||||
_kadmin_changepw:*:219:-2:Kerberos Change Password Service:/var/empty:/usr/bin/false
|
||||
_devicemgr:*:220:220:Device Management Server:/var/empty:/usr/bin/false
|
||||
_webauthserver:*:221:221:Web Auth Server:/var/empty:/usr/bin/false
|
||||
_netbios:*:222:222:NetBIOS:/var/empty:/usr/bin/false
|
||||
_warmd:*:224:224:Warm Daemon:/var/empty:/usr/bin/false
|
||||
_dovenull:*:227:227:Dovecot Authentication:/var/empty:/usr/bin/false
|
||||
_netstatistics:*:228:228:Network Statistics Daemon:/var/empty:/usr/bin/false
|
||||
_avbdeviced:*:229:-2:Ethernet AVB Device Daemon:/var/empty:/usr/bin/false
|
||||
_krb_krbtgt:*:230:-2:Open Directory Kerberos Ticket Granting Ticket:/var/empty:/usr/bin/false
|
||||
_krb_kadmin:*:231:-2:Open Directory Kerberos Admin Service:/var/empty:/usr/bin/false
|
||||
_krb_changepw:*:232:-2:Open Directory Kerberos Change Password Service:/var/empty:/usr/bin/false
|
||||
_krb_kerberos:*:233:-2:Open Directory Kerberos:/var/empty:/usr/bin/false
|
||||
_krb_anonymous:*:234:-2:Open Directory Kerberos Anonymous:/var/empty:/usr/bin/false
|
||||
_assetcache:*:235:235:Asset Cache Service:/var/empty:/usr/bin/false
|
||||
_coremediaiod:*:236:236:Core Media IO Daemon:/var/empty:/usr/bin/false
|
||||
_launchservicesd:*:239:239:_launchservicesd:/var/empty:/usr/bin/false
|
||||
_iconservices:*:240:240:IconServices:/var/empty:/usr/bin/false
|
||||
_distnote:*:241:241:DistNote:/var/empty:/usr/bin/false
|
||||
_nsurlsessiond:*:242:242:NSURLSession Daemon:/var/db/nsurlsessiond:/usr/bin/false
|
||||
_nsurlstoraged:*:243:243:NSURLStorage Daemon:/var/db/nsurlstoraged:/usr/bin/false
|
||||
_displaypolicyd:*:244:244:Display Policy Daemon:/var/empty:/usr/bin/false
|
||||
_astris:*:245:245:Astris Services:/var/db/astris:/usr/bin/false
|
||||
_krbfast:*:246:-2:Kerberos FAST Account:/var/empty:/usr/bin/false
|
||||
_gamecontrollerd:*:247:247:Game Controller Daemon:/var/empty:/usr/bin/false
|
||||
_mbsetupuser:*:248:248:Setup User:/var/setup:/bin/bash
|
||||
_ondemand:*:249:249:On Demand Resource Daemon:/var/db/ondemand:/usr/bin/false
|
||||
_xserverdocs:*:251:251:macOS Server Documents Service:/var/empty:/usr/bin/false
|
||||
_wwwproxy:*:252:252:WWW Proxy:/var/empty:/usr/bin/false
|
||||
_mobileasset:*:253:253:MobileAsset User:/var/ma:/usr/bin/false
|
||||
_findmydevice:*:254:254:Find My Device Daemon:/var/db/findmydevice:/usr/bin/false
|
||||
_datadetectors:*:257:257:DataDetectors:/var/db/datadetectors:/usr/bin/false
|
||||
_captiveagent:*:258:258:captiveagent:/var/empty:/usr/bin/false
|
||||
_ctkd:*:259:259:ctkd Account:/var/empty:/usr/bin/false
|
||||
_applepay:*:260:260:applepay Account:/var/db/applepay:/usr/bin/false
|
||||
_hidd:*:261:261:HID Service User:/var/db/hidd:/usr/bin/false
|
||||
_cmiodalassistants:*:262:262:CoreMedia IO Assistants User:/var/db/cmiodalassistants:/usr/bin/false
|
||||
_analyticsd:*:263:263:Analytics Daemon:/var/db/analyticsd:/usr/bin/false
|
||||
_fpsd:*:265:265:FPS Daemon:/var/db/fpsd:/usr/bin/false
|
||||
_timed:*:266:266:Time Sync Daemon:/var/db/timed:/usr/bin/false
|
||||
_reportmemoryexception:*:269:269:ReportMemoryException:/var/db/reportmemoryexception:/usr/bin/false
|
1
tests/fixtures/osx-10.14.6/who-a.json
vendored
Normal file
1
tests/fixtures/osx-10.14.6/who-a.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"event": "reboot", "time": "Feb 7 23:31", "pid": 1}, {"user": "kbrazil", "tty": "console", "time": "Feb 7 23:32", "idle": "old", "pid": 105}, {"user": "kbrazil", "tty": "ttys000", "time": "Feb 13 16:44", "idle": "00:02", "pid": 51217, "comment": "term=0 exit=0"}, {"user": "kbrazil", "tty": "ttys001", "time": "Feb 11 21:25", "idle": "00:02", "pid": 81390}, {"user": "kbrazil", "tty": "ttys002", "time": "Mar 1 15:18", "idle": ".", "pid": 9574}, {"user": "kbrazil", "tty": "ttys003", "time": "Feb 28 08:59", "idle": "01:06", "pid": 41402}, {"user": "kbrazil", "tty": "ttys004", "time": "Mar 1 17:11", "idle": ".", "pid": 15679, "comment": "term=0 exit=0"}]
|
9
tests/fixtures/osx-10.14.6/who-a.out
vendored
Normal file
9
tests/fixtures/osx-10.14.6/who-a.out
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
USER LINE WHEN IDLE PID COMMENT
|
||||
reboot ~ Feb 7 23:31 . 1
|
||||
kbrazil console Feb 7 23:32 old 105
|
||||
kbrazil ttys000 Feb 13 16:44 00:02 51217 term=0 exit=0
|
||||
kbrazil ttys001 Feb 11 21:25 00:02 81390
|
||||
kbrazil ttys002 Mar 1 15:18 . 9574
|
||||
kbrazil ttys003 Feb 28 08:59 01:06 41402
|
||||
kbrazil ttys004 Mar 1 17:11 . 15679 term=0 exit=0
|
||||
. run-level 3
|
1
tests/fixtures/osx-10.14.6/who.json
vendored
Normal file
1
tests/fixtures/osx-10.14.6/who.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"user": "kbrazil", "tty": "console", "time": "Feb 7 23:32"}, {"user": "kbrazil", "tty": "ttys001", "time": "Feb 11 21:25"}, {"user": "kbrazil", "tty": "ttys002", "time": "Mar 1 15:18"}, {"user": "kbrazil", "tty": "ttys003", "time": "Feb 28 08:59"}]
|
4
tests/fixtures/osx-10.14.6/who.out
vendored
Normal file
4
tests/fixtures/osx-10.14.6/who.out
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
kbrazil console Feb 7 23:32
|
||||
kbrazil ttys001 Feb 11 21:25
|
||||
kbrazil ttys002 Mar 1 15:18
|
||||
kbrazil ttys003 Feb 28 08:59
|
1
tests/fixtures/ubuntu-18.04/blkid-ip-multi.json
vendored
Normal file
1
tests/fixtures/ubuntu-18.04/blkid-ip-multi.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"device": "/dev/sda2", "uuid": "011527a0-c72a-4c00-a50e-ee90da26b6e2", "version": "1.0", "type": "ext4", "usage": "filesystem", "minimum_io_size": 512, "physical_sector_size": 512, "logical_sector_size": 512, "part_entry_scheme": "gpt", "part_entry_uuid": "744589e8-5711-4750-9984-c34d66f93879", "part_entry_type": "0fc63daf-8483-4772-8e79-3d69d8477de4", "part_entry_number": 2, "part_entry_offset": 4096, "part_entry_size": 41936896, "part_entry_disk": "8:0"}, {"device": "/dev/sda1", "minimum_io_size": 512, "physical_sector_size": 512, "logical_sector_size": 512, "part_entry_scheme": "gpt", "part_entry_uuid": "e0614271-c211-4324-a5bc-8e6bcb66da43", "part_entry_type": "21686148-6449-6e6f-744e-656564454649", "part_entry_number": 1, "part_entry_offset": 2048, "part_entry_size": 2048, "part_entry_disk": "8:0"}]
|
2
tests/fixtures/ubuntu-18.04/blkid-ip-multi.out
vendored
Normal file
2
tests/fixtures/ubuntu-18.04/blkid-ip-multi.out
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/dev/sda2: UUID="011527a0-c72a-4c00-a50e-ee90da26b6e2" VERSION="1.0" TYPE="ext4" USAGE="filesystem" MINIMUM_IO_SIZE="512" PHYSICAL_SECTOR_SIZE="512" LOGICAL_SECTOR_SIZE="512" PART_ENTRY_SCHEME="gpt" PART_ENTRY_UUID="744589e8-5711-4750-9984-c34d66f93879" PART_ENTRY_TYPE="0fc63daf-8483-4772-8e79-3d69d8477de4" PART_ENTRY_NUMBER="2" PART_ENTRY_OFFSET="4096" PART_ENTRY_SIZE="41936896" PART_ENTRY_DISK="8:0"
|
||||
/dev/sda1: MINIMUM_IO_SIZE="512" PHYSICAL_SECTOR_SIZE="512" LOGICAL_SECTOR_SIZE="512" PART_ENTRY_SCHEME="gpt" PART_ENTRY_UUID="e0614271-c211-4324-a5bc-8e6bcb66da43" PART_ENTRY_TYPE="21686148-6449-6e6f-744e-656564454649" PART_ENTRY_NUMBER="1" PART_ENTRY_OFFSET="2048" PART_ENTRY_SIZE="2048" PART_ENTRY_DISK="8:0"
|
1
tests/fixtures/ubuntu-18.04/blkid-ip-udev-multi.json
vendored
Normal file
1
tests/fixtures/ubuntu-18.04/blkid-ip-udev-multi.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"id_fs_uuid": "011527a0-c72a-4c00-a50e-ee90da26b6e2", "id_fs_uuid_enc": "011527a0-c72a-4c00-a50e-ee90da26b6e2", "id_fs_version": "1.0", "id_fs_type": "ext4", "id_fs_usage": "filesystem", "id_iolimit_minimum_io_size": 512, "id_iolimit_physical_sector_size": 512, "id_iolimit_logical_sector_size": 512, "id_part_entry_scheme": "gpt", "id_part_entry_uuid": "744589e8-5711-4750-9984-c34d66f93879", "id_part_entry_type": "0fc63daf-8483-4772-8e79-3d69d8477de4", "id_part_entry_number": 2, "id_part_entry_offset": 4096, "id_part_entry_size": 41936896, "id_part_entry_disk": "8:0"}, {"id_iolimit_minimum_io_size": 512, "id_iolimit_physical_sector_size": 512, "id_iolimit_logical_sector_size": 512, "id_part_entry_scheme": "gpt", "id_part_entry_uuid": "e0614271-c211-4324-a5bc-8e6bcb66da43", "id_part_entry_type": "21686148-6449-6e6f-744e-656564454649", "id_part_entry_number": 1, "id_part_entry_offset": 2048, "id_part_entry_size": 2048, "id_part_entry_disk": "8:0"}]
|
26
tests/fixtures/ubuntu-18.04/blkid-ip-udev-multi.out
vendored
Normal file
26
tests/fixtures/ubuntu-18.04/blkid-ip-udev-multi.out
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
ID_FS_UUID=011527a0-c72a-4c00-a50e-ee90da26b6e2
|
||||
ID_FS_UUID_ENC=011527a0-c72a-4c00-a50e-ee90da26b6e2
|
||||
ID_FS_VERSION=1.0
|
||||
ID_FS_TYPE=ext4
|
||||
ID_FS_USAGE=filesystem
|
||||
ID_IOLIMIT_MINIMUM_IO_SIZE=512
|
||||
ID_IOLIMIT_PHYSICAL_SECTOR_SIZE=512
|
||||
ID_IOLIMIT_LOGICAL_SECTOR_SIZE=512
|
||||
ID_PART_ENTRY_SCHEME=gpt
|
||||
ID_PART_ENTRY_UUID=744589e8-5711-4750-9984-c34d66f93879
|
||||
ID_PART_ENTRY_TYPE=0fc63daf-8483-4772-8e79-3d69d8477de4
|
||||
ID_PART_ENTRY_NUMBER=2
|
||||
ID_PART_ENTRY_OFFSET=4096
|
||||
ID_PART_ENTRY_SIZE=41936896
|
||||
ID_PART_ENTRY_DISK=8:0
|
||||
|
||||
ID_IOLIMIT_MINIMUM_IO_SIZE=512
|
||||
ID_IOLIMIT_PHYSICAL_SECTOR_SIZE=512
|
||||
ID_IOLIMIT_LOGICAL_SECTOR_SIZE=512
|
||||
ID_PART_ENTRY_SCHEME=gpt
|
||||
ID_PART_ENTRY_UUID=e0614271-c211-4324-a5bc-8e6bcb66da43
|
||||
ID_PART_ENTRY_TYPE=21686148-6449-6e6f-744e-656564454649
|
||||
ID_PART_ENTRY_NUMBER=1
|
||||
ID_PART_ENTRY_OFFSET=2048
|
||||
ID_PART_ENTRY_SIZE=2048
|
||||
ID_PART_ENTRY_DISK=8:0
|
1
tests/fixtures/ubuntu-18.04/blkid-ip-udev.json
vendored
Normal file
1
tests/fixtures/ubuntu-18.04/blkid-ip-udev.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"id_fs_system_id": "Mac OS X", "id_fs_application_id": "MKISOFS ISO9660/HFS/UDF FILESYSTEM BUILDER & CDRECORD CD/DVD/BluRay CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING", "id_fs_uuid": "2019-08-12-10-17-03-63", "id_fs_uuid_enc": "2019-08-12-10-17-03-63", "id_fs_boot_system_id": "EL TORITO SPECIFICATION", "id_fs_label": "CDROM", "id_fs_label_enc": "CDROM", "id_fs_type": "iso9660", "id_fs_usage": "filesystem", "id_iolimit_minimum_io_size": 2048, "id_iolimit_physical_sector_size": 2048, "id_iolimit_logical_sector_size": 2048}]
|
12
tests/fixtures/ubuntu-18.04/blkid-ip-udev.out
vendored
Normal file
12
tests/fixtures/ubuntu-18.04/blkid-ip-udev.out
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
ID_FS_SYSTEM_ID=Mac OS X
|
||||
ID_FS_APPLICATION_ID=MKISOFS ISO9660/HFS/UDF FILESYSTEM BUILDER & CDRECORD CD/DVD/BluRay CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING
|
||||
ID_FS_UUID=2019-08-12-10-17-03-63
|
||||
ID_FS_UUID_ENC=2019-08-12-10-17-03-63
|
||||
ID_FS_BOOT_SYSTEM_ID=EL TORITO SPECIFICATION
|
||||
ID_FS_LABEL=CDROM
|
||||
ID_FS_LABEL_ENC=CDROM
|
||||
ID_FS_TYPE=iso9660
|
||||
ID_FS_USAGE=filesystem
|
||||
ID_IOLIMIT_MINIMUM_IO_SIZE=2048
|
||||
ID_IOLIMIT_PHYSICAL_SECTOR_SIZE=2048
|
||||
ID_IOLIMIT_LOGICAL_SECTOR_SIZE=2048
|
1
tests/fixtures/ubuntu-18.04/blkid-sda2.json
vendored
Normal file
1
tests/fixtures/ubuntu-18.04/blkid-sda2.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"device": "/dev/sda2", "uuid": "011527a0-c72a-4c00-a50e-ee90da26b6e2", "type": "ext4", "partuuid": "744589e8-5711-4750-9984-c34d66f93879"}]
|
1
tests/fixtures/ubuntu-18.04/blkid-sda2.out
vendored
Normal file
1
tests/fixtures/ubuntu-18.04/blkid-sda2.out
vendored
Normal file
@ -0,0 +1 @@
|
||||
/dev/sda2: UUID="011527a0-c72a-4c00-a50e-ee90da26b6e2" TYPE="ext4" PARTUUID="744589e8-5711-4750-9984-c34d66f93879"
|
1
tests/fixtures/ubuntu-18.04/blkid.json
vendored
Normal file
1
tests/fixtures/ubuntu-18.04/blkid.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"device": "/dev/fd0", "sec_type": "msdos", "uuid": "4F0C-5223", "type": "vfat"}, {"device": "/dev/sda2", "uuid": "011527a0-c72a-4c00-a50e-ee90da26b6e2", "type": "ext4", "partuuid": "744589e8-5711-4750-9984-c34d66f93879"}, {"device": "/dev/sr0", "uuid": "2019-08-12-10-17-03-63", "label": "CDROM", "type": "iso9660"}, {"device": "/dev/sr1", "uuid": "2019-08-05-20-00-00-00", "label": "Ubuntu-Server 18.04.3 LTS amd64", "type": "iso9660", "ptuuid": "2f10bd40", "pttype": "dos"}, {"device": "/dev/loop0", "type": "squashfs"}, {"device": "/dev/loop1", "type": "squashfs"}, {"device": "/dev/loop2", "type": "squashfs"}, {"device": "/dev/loop3", "type": "squashfs"}, {"device": "/dev/loop4", "type": "squashfs"}, {"device": "/dev/loop5", "type": "squashfs"}, {"device": "/dev/loop6", "type": "squashfs"}, {"device": "/dev/loop7", "type": "squashfs"}, {"device": "/dev/loop8", "type": "squashfs"}, {"device": "/dev/loop9", "type": "squashfs"}, {"device": "/dev/loop10", "type": "squashfs"}]
|
15
tests/fixtures/ubuntu-18.04/blkid.out
vendored
Normal file
15
tests/fixtures/ubuntu-18.04/blkid.out
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/dev/fd0: SEC_TYPE="msdos" UUID="4F0C-5223" TYPE="vfat"
|
||||
/dev/sda2: UUID="011527a0-c72a-4c00-a50e-ee90da26b6e2" TYPE="ext4" PARTUUID="744589e8-5711-4750-9984-c34d66f93879"
|
||||
/dev/sr0: UUID="2019-08-12-10-17-03-63" LABEL="CDROM" TYPE="iso9660"
|
||||
/dev/sr1: UUID="2019-08-05-20-00-00-00" LABEL="Ubuntu-Server 18.04.3 LTS amd64" TYPE="iso9660" PTUUID="2f10bd40" PTTYPE="dos"
|
||||
/dev/loop0: TYPE="squashfs"
|
||||
/dev/loop1: TYPE="squashfs"
|
||||
/dev/loop2: TYPE="squashfs"
|
||||
/dev/loop3: TYPE="squashfs"
|
||||
/dev/loop4: TYPE="squashfs"
|
||||
/dev/loop5: TYPE="squashfs"
|
||||
/dev/loop6: TYPE="squashfs"
|
||||
/dev/loop7: TYPE="squashfs"
|
||||
/dev/loop8: TYPE="squashfs"
|
||||
/dev/loop9: TYPE="squashfs"
|
||||
/dev/loop10: TYPE="squashfs"
|
1
tests/fixtures/ubuntu-18.04/group.json
vendored
Normal file
1
tests/fixtures/ubuntu-18.04/group.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"group_name": "root", "password": "x", "gid": 0, "members": []}, {"group_name": "daemon", "password": "x", "gid": 1, "members": []}, {"group_name": "bin", "password": "x", "gid": 2, "members": []}, {"group_name": "sys", "password": "x", "gid": 3, "members": []}, {"group_name": "adm", "password": "x", "gid": 4, "members": ["syslog", "joeuser"]}, {"group_name": "tty", "password": "x", "gid": 5, "members": []}, {"group_name": "disk", "password": "x", "gid": 6, "members": []}, {"group_name": "lp", "password": "x", "gid": 7, "members": []}, {"group_name": "mail", "password": "x", "gid": 8, "members": []}, {"group_name": "news", "password": "x", "gid": 9, "members": []}, {"group_name": "uucp", "password": "x", "gid": 10, "members": []}, {"group_name": "man", "password": "x", "gid": 12, "members": []}, {"group_name": "proxy", "password": "x", "gid": 13, "members": []}, {"group_name": "kmem", "password": "x", "gid": 15, "members": []}, {"group_name": "dialout", "password": "x", "gid": 20, "members": []}, {"group_name": "fax", "password": "x", "gid": 21, "members": []}, {"group_name": "voice", "password": "x", "gid": 22, "members": []}, {"group_name": "cdrom", "password": "x", "gid": 24, "members": ["joeuser"]}, {"group_name": "floppy", "password": "x", "gid": 25, "members": []}, {"group_name": "tape", "password": "x", "gid": 26, "members": []}, {"group_name": "sudo", "password": "x", "gid": 27, "members": ["joeuser"]}, {"group_name": "audio", "password": "x", "gid": 29, "members": []}, {"group_name": "dip", "password": "x", "gid": 30, "members": ["joeuser"]}, {"group_name": "www-data", "password": "x", "gid": 33, "members": []}, {"group_name": "backup", "password": "x", "gid": 34, "members": []}, {"group_name": "operator", "password": "x", "gid": 37, "members": []}, {"group_name": "list", "password": "x", "gid": 38, "members": []}, {"group_name": "irc", "password": "x", "gid": 39, "members": []}, {"group_name": "src", "password": "x", "gid": 40, "members": []}, {"group_name": "gnats", "password": "x", "gid": 41, "members": []}, {"group_name": "shadow", "password": "x", "gid": 42, "members": []}, {"group_name": "utmp", "password": "x", "gid": 43, "members": []}, {"group_name": "video", "password": "x", "gid": 44, "members": []}, {"group_name": "sasl", "password": "x", "gid": 45, "members": []}, {"group_name": "plugdev", "password": "x", "gid": 46, "members": ["joeuser"]}, {"group_name": "staff", "password": "x", "gid": 50, "members": []}, {"group_name": "games", "password": "x", "gid": 60, "members": []}, {"group_name": "users", "password": "x", "gid": 100, "members": []}, {"group_name": "nogroup", "password": "x", "gid": 65534, "members": []}, {"group_name": "systemd-journal", "password": "x", "gid": 101, "members": []}, {"group_name": "systemd-network", "password": "x", "gid": 102, "members": []}, {"group_name": "systemd-resolve", "password": "x", "gid": 103, "members": []}, {"group_name": "input", "password": "x", "gid": 104, "members": []}, {"group_name": "crontab", "password": "x", "gid": 105, "members": []}, {"group_name": "syslog", "password": "x", "gid": 106, "members": []}, {"group_name": "messagebus", "password": "x", "gid": 107, "members": []}, {"group_name": "lxd", "password": "x", "gid": 108, "members": ["joeuser"]}, {"group_name": "mlocate", "password": "x", "gid": 109, "members": []}, {"group_name": "uuidd", "password": "x", "gid": 110, "members": []}, {"group_name": "ssh", "password": "x", "gid": 111, "members": []}, {"group_name": "landscape", "password": "x", "gid": 112, "members": []}, {"group_name": "joeuser", "password": "x", "gid": 1000, "members": []}, {"group_name": "docker", "password": "x", "gid": 113, "members": []}]
|
53
tests/fixtures/ubuntu-18.04/group.out
vendored
Normal file
53
tests/fixtures/ubuntu-18.04/group.out
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
root:x:0:
|
||||
daemon:x:1:
|
||||
bin:x:2:
|
||||
sys:x:3:
|
||||
adm:x:4:syslog,joeuser
|
||||
tty:x:5:
|
||||
disk:x:6:
|
||||
lp:x:7:
|
||||
mail:x:8:
|
||||
news:x:9:
|
||||
uucp:x:10:
|
||||
man:x:12:
|
||||
proxy:x:13:
|
||||
kmem:x:15:
|
||||
dialout:x:20:
|
||||
fax:x:21:
|
||||
voice:x:22:
|
||||
cdrom:x:24:joeuser
|
||||
floppy:x:25:
|
||||
tape:x:26:
|
||||
sudo:x:27:joeuser
|
||||
audio:x:29:
|
||||
dip:x:30:joeuser
|
||||
www-data:x:33:
|
||||
backup:x:34:
|
||||
operator:x:37:
|
||||
list:x:38:
|
||||
irc:x:39:
|
||||
src:x:40:
|
||||
gnats:x:41:
|
||||
shadow:x:42:
|
||||
utmp:x:43:
|
||||
video:x:44:
|
||||
sasl:x:45:
|
||||
plugdev:x:46:joeuser
|
||||
staff:x:50:
|
||||
games:x:60:
|
||||
users:x:100:
|
||||
nogroup:x:65534:
|
||||
systemd-journal:x:101:
|
||||
systemd-network:x:102:
|
||||
systemd-resolve:x:103:
|
||||
input:x:104:
|
||||
crontab:x:105:
|
||||
syslog:x:106:
|
||||
messagebus:x:107:
|
||||
lxd:x:108:joeuser
|
||||
mlocate:x:109:
|
||||
uuidd:x:110:
|
||||
ssh:x:111:
|
||||
landscape:x:112:
|
||||
joeuser:x:1000:
|
||||
docker:x:113:
|
1
tests/fixtures/ubuntu-18.04/gshadow.json
vendored
Normal file
1
tests/fixtures/ubuntu-18.04/gshadow.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"group_name": "root", "password": "*", "administrators": [], "members": []}, {"group_name": "daemon", "password": "*", "administrators": [], "members": []}, {"group_name": "bin", "password": "*", "administrators": [], "members": []}, {"group_name": "sys", "password": "*", "administrators": [], "members": []}, {"group_name": "adm", "password": "*", "administrators": [], "members": ["syslog", "joeuser"]}, {"group_name": "tty", "password": "*", "administrators": [], "members": []}, {"group_name": "disk", "password": "*", "administrators": [], "members": []}, {"group_name": "lp", "password": "*", "administrators": [], "members": []}, {"group_name": "mail", "password": "*", "administrators": [], "members": []}, {"group_name": "news", "password": "*", "administrators": [], "members": []}, {"group_name": "uucp", "password": "*", "administrators": [], "members": []}, {"group_name": "man", "password": "*", "administrators": [], "members": []}, {"group_name": "proxy", "password": "*", "administrators": [], "members": []}, {"group_name": "kmem", "password": "*", "administrators": [], "members": []}, {"group_name": "dialout", "password": "*", "administrators": [], "members": []}, {"group_name": "fax", "password": "*", "administrators": [], "members": []}, {"group_name": "voice", "password": "*", "administrators": [], "members": []}, {"group_name": "cdrom", "password": "*", "administrators": [], "members": ["joeuser"]}, {"group_name": "floppy", "password": "*", "administrators": [], "members": []}, {"group_name": "tape", "password": "*", "administrators": [], "members": []}, {"group_name": "sudo", "password": "*", "administrators": [], "members": ["joeuser"]}, {"group_name": "audio", "password": "*", "administrators": [], "members": []}, {"group_name": "dip", "password": "*", "administrators": [], "members": ["joeuser"]}, {"group_name": "www-data", "password": "*", "administrators": [], "members": []}, {"group_name": "backup", "password": "*", "administrators": [], "members": []}, {"group_name": "operator", "password": "*", "administrators": [], "members": []}, {"group_name": "list", "password": "*", "administrators": [], "members": []}, {"group_name": "irc", "password": "*", "administrators": [], "members": []}, {"group_name": "src", "password": "*", "administrators": [], "members": []}, {"group_name": "gnats", "password": "*", "administrators": [], "members": []}, {"group_name": "shadow", "password": "*", "administrators": [], "members": []}, {"group_name": "utmp", "password": "*", "administrators": [], "members": []}, {"group_name": "video", "password": "*", "administrators": [], "members": []}, {"group_name": "sasl", "password": "*", "administrators": [], "members": []}, {"group_name": "plugdev", "password": "*", "administrators": [], "members": ["joeuser"]}, {"group_name": "staff", "password": "*", "administrators": [], "members": []}, {"group_name": "games", "password": "*", "administrators": [], "members": []}, {"group_name": "users", "password": "*", "administrators": [], "members": []}, {"group_name": "nogroup", "password": "*", "administrators": [], "members": []}, {"group_name": "systemd-journal", "password": "!", "administrators": [], "members": []}, {"group_name": "systemd-network", "password": "!", "administrators": [], "members": []}, {"group_name": "systemd-resolve", "password": "!", "administrators": [], "members": []}, {"group_name": "input", "password": "!", "administrators": [], "members": []}, {"group_name": "crontab", "password": "!", "administrators": [], "members": []}, {"group_name": "syslog", "password": "!", "administrators": [], "members": []}, {"group_name": "messagebus", "password": "!", "administrators": [], "members": []}, {"group_name": "lxd", "password": "!", "administrators": [], "members": ["joeuser"]}, {"group_name": "mlocate", "password": "!", "administrators": [], "members": []}, {"group_name": "uuidd", "password": "!", "administrators": [], "members": []}, {"group_name": "ssh", "password": "!", "administrators": [], "members": []}, {"group_name": "landscape", "password": "!", "administrators": [], "members": []}, {"group_name": "joeuser", "password": "!", "administrators": [], "members": []}, {"group_name": "docker", "password": "!", "administrators": [], "members": []}]
|
53
tests/fixtures/ubuntu-18.04/gshadow.out
vendored
Normal file
53
tests/fixtures/ubuntu-18.04/gshadow.out
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
root:*::
|
||||
daemon:*::
|
||||
bin:*::
|
||||
sys:*::
|
||||
adm:*::syslog,joeuser
|
||||
tty:*::
|
||||
disk:*::
|
||||
lp:*::
|
||||
mail:*::
|
||||
news:*::
|
||||
uucp:*::
|
||||
man:*::
|
||||
proxy:*::
|
||||
kmem:*::
|
||||
dialout:*::
|
||||
fax:*::
|
||||
voice:*::
|
||||
cdrom:*::joeuser
|
||||
floppy:*::
|
||||
tape:*::
|
||||
sudo:*::joeuser
|
||||
audio:*::
|
||||
dip:*::joeuser
|
||||
www-data:*::
|
||||
backup:*::
|
||||
operator:*::
|
||||
list:*::
|
||||
irc:*::
|
||||
src:*::
|
||||
gnats:*::
|
||||
shadow:*::
|
||||
utmp:*::
|
||||
video:*::
|
||||
sasl:*::
|
||||
plugdev:*::joeuser
|
||||
staff:*::
|
||||
games:*::
|
||||
users:*::
|
||||
nogroup:*::
|
||||
systemd-journal:!::
|
||||
systemd-network:!::
|
||||
systemd-resolve:!::
|
||||
input:!::
|
||||
crontab:!::
|
||||
syslog:!::
|
||||
messagebus:!::
|
||||
lxd:!::joeuser
|
||||
mlocate:!::
|
||||
uuidd:!::
|
||||
ssh:!::
|
||||
landscape:!::
|
||||
joeuser:!::
|
||||
docker:!::
|
1
tests/fixtures/ubuntu-18.04/last-w.json
vendored
Normal file
1
tests/fixtures/ubuntu-18.04/last-w.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Fri Feb 28 23:03", "logout": "still logged in"}, {"user": "reboot", "tty": "system boot", "hostname": "4.15.0-88-generic", "login": "Fri Feb 28 23:03", "logout": "running"}, {"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Fri Feb 28 14:56", "logout": "down", "duration": "06:51"}, {"user": "reboot", "tty": "system boot", "hostname": "4.15.0-88-generic", "login": "Fri Feb 28 14:55", "logout": "21:47", "duration": "06:52"}, {"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Thu Feb 27 23:50", "logout": "down", "duration": "00:10"}, {"user": "reboot", "tty": "system boot", "hostname": "4.15.0-88-generic", "login": "Thu Feb 27 23:49", "logout": "00:00", "duration": "00:11"}, {"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Thu Feb 27 18:07", "logout": "down", "duration": "00:04"}, {"user": "reboot", "tty": "system boot", "hostname": "4.15.0-76-generic", "login": "Thu Feb 27 18:07", "logout": "18:12", "duration": "00:04"}, {"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Tue Feb 18 02:50", "logout": "down", "duration": "1+13:58"}, {"user": "reboot", "tty": "system boot", "hostname": "4.15.0-76-generic", "login": "Tue Feb 18 02:50", "logout": "16:48", "duration": "1+13:58"}, {"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Fri Feb 14 02:06", "logout": "01:48", "duration": "3+23:41"}, {"user": "reboot", "tty": "system boot", "hostname": "4.15.0-76-generic", "login": "Fri Feb 14 02:06", "logout": "01:48", "duration": "3+23:41"}, {"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Thu Feb 6 01:05", "logout": "down", "duration": "1+14:43"}, {"user": "reboot", "tty": "system boot", "hostname": "4.15.0-76-generic", "login": "Thu Feb 6 01:04", "logout": "15:48", "duration": "1+14:43"}]
|
16
tests/fixtures/ubuntu-18.04/last-w.out
vendored
Normal file
16
tests/fixtures/ubuntu-18.04/last-w.out
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
kbrazil ttyS0 Fri Feb 28 23:03 still logged in
|
||||
reboot system boot 4.15.0-88-generic Fri Feb 28 23:03 still running
|
||||
kbrazil ttyS0 Fri Feb 28 14:56 - down (06:51)
|
||||
reboot system boot 4.15.0-88-generic Fri Feb 28 14:55 - 21:47 (06:52)
|
||||
kbrazil ttyS0 Thu Feb 27 23:50 - down (00:10)
|
||||
reboot system boot 4.15.0-88-generic Thu Feb 27 23:49 - 00:00 (00:11)
|
||||
kbrazil ttyS0 Thu Feb 27 18:07 - down (00:04)
|
||||
reboot system boot 4.15.0-76-generic Thu Feb 27 18:07 - 18:12 (00:04)
|
||||
kbrazil ttyS0 Tue Feb 18 02:50 - down (1+13:58)
|
||||
reboot system boot 4.15.0-76-generic Tue Feb 18 02:50 - 16:48 (1+13:58)
|
||||
kbrazil ttyS0 Fri Feb 14 02:06 - 01:48 (3+23:41)
|
||||
reboot system boot 4.15.0-76-generic Fri Feb 14 02:06 - 01:48 (3+23:41)
|
||||
kbrazil ttyS0 Thu Feb 6 01:05 - down (1+14:43)
|
||||
reboot system boot 4.15.0-76-generic Thu Feb 6 01:04 - 15:48 (1+14:43)
|
||||
|
||||
wtmp begins Wed Feb 5 22:22:55 2020
|
1
tests/fixtures/ubuntu-18.04/last.json
vendored
Normal file
1
tests/fixtures/ubuntu-18.04/last.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Fri Feb 28 23:03", "logout": "still logged in"}, {"user": "reboot", "tty": "system boot", "hostname": "4.15.0-88-generi", "login": "Fri Feb 28 23:03", "logout": "running"}, {"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Fri Feb 28 14:56", "logout": "down", "duration": "06:51"}, {"user": "reboot", "tty": "system boot", "hostname": "4.15.0-88-generi", "login": "Fri Feb 28 14:55", "logout": "21:47", "duration": "06:52"}, {"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Thu Feb 27 23:50", "logout": "down", "duration": "00:10"}, {"user": "reboot", "tty": "system boot", "hostname": "4.15.0-88-generi", "login": "Thu Feb 27 23:49", "logout": "00:00", "duration": "00:11"}, {"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Thu Feb 27 18:07", "logout": "down", "duration": "00:04"}, {"user": "reboot", "tty": "system boot", "hostname": "4.15.0-76-generi", "login": "Thu Feb 27 18:07", "logout": "18:12", "duration": "00:04"}, {"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Tue Feb 18 02:50", "logout": "down", "duration": "1+13:58"}, {"user": "reboot", "tty": "system boot", "hostname": "4.15.0-76-generi", "login": "Tue Feb 18 02:50", "logout": "16:48", "duration": "1+13:58"}, {"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Fri Feb 14 02:06", "logout": "01:48", "duration": "3+23:41"}, {"user": "reboot", "tty": "system boot", "hostname": "4.15.0-76-generi", "login": "Fri Feb 14 02:06", "logout": "01:48", "duration": "3+23:41"}, {"user": "kbrazil", "tty": "ttyS0", "hostname": null, "login": "Thu Feb 6 01:05", "logout": "down", "duration": "1+14:43"}, {"user": "reboot", "tty": "system boot", "hostname": "4.15.0-76-generi", "login": "Thu Feb 6 01:04", "logout": "15:48", "duration": "1+14:43"}]
|
16
tests/fixtures/ubuntu-18.04/last.out
vendored
Normal file
16
tests/fixtures/ubuntu-18.04/last.out
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
kbrazil ttyS0 Fri Feb 28 23:03 still logged in
|
||||
reboot system boot 4.15.0-88-generi Fri Feb 28 23:03 still running
|
||||
kbrazil ttyS0 Fri Feb 28 14:56 - down (06:51)
|
||||
reboot system boot 4.15.0-88-generi Fri Feb 28 14:55 - 21:47 (06:52)
|
||||
kbrazil ttyS0 Thu Feb 27 23:50 - down (00:10)
|
||||
reboot system boot 4.15.0-88-generi Thu Feb 27 23:49 - 00:00 (00:11)
|
||||
kbrazil ttyS0 Thu Feb 27 18:07 - down (00:04)
|
||||
reboot system boot 4.15.0-76-generi Thu Feb 27 18:07 - 18:12 (00:04)
|
||||
kbrazil ttyS0 Tue Feb 18 02:50 - down (1+13:58)
|
||||
reboot system boot 4.15.0-76-generi Tue Feb 18 02:50 - 16:48 (1+13:58)
|
||||
kbrazil ttyS0 Fri Feb 14 02:06 - 01:48 (3+23:41)
|
||||
reboot system boot 4.15.0-76-generi Fri Feb 14 02:06 - 01:48 (3+23:41)
|
||||
kbrazil ttyS0 Thu Feb 6 01:05 - down (1+14:43)
|
||||
reboot system boot 4.15.0-76-generi Thu Feb 6 01:04 - 15:48 (1+14:43)
|
||||
|
||||
wtmp begins Wed Feb 5 22:22:55 2020
|
1
tests/fixtures/ubuntu-18.04/lastb.json
vendored
Normal file
1
tests/fixtures/ubuntu-18.04/lastb.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"user": "UNKNOWN", "tty": "ttyS0", "hostname": null, "login": "Fri Feb 14 02:06", "logout": "02:06", "duration": "00:00"}]
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user