[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Looking for structured data viewer/editor




Hello all, 
??
Ancillary to an attempt at recovering a truncated 
mailstore on an NTFS volume, I find myself really wanting a tool to examine and 
modify arbitrary structured data.?? 
??
I've run into this sort of thing with databases as 
well, so I'm hoping someone might have written a tool that can 
display/manipulate data based on some sort of schema file(s). 
??
I'm thinking something like a database/filesystem 
version of pbm(5). Any pointers??? 

??
TIA, -Greg
??
My coding is (very) rusty, but a completely 
arbitrary example of the CLI level of this concept might be forcing a password 
reset, as prototyped below.?? (Though grep/sed would do a much more 
conventional job)
??
Schema:
=========================
TEXT=iso-blah-blah
??
structure password
?????? assume??meta
?????? ?????? 
location=file://localhost/etc
?????? ?????? 
name="passwd"
?????? ?????? assume 
delimiter
<FONT face=Arial 
size=2>?????????????????????? 
field=":"
<FONT face=Arial 
size=2>?????????????????????? 
record="^J","^M"????????????????????????# 
Should this be "\n"?
?????? ?????? assume previous.previous
?????????????? login=$TEXT??link 
password.shadow.user.name match exact
?????????????? password {
?????????????????????? encoding 
$TEXT
?????????????????????? magic 
"*" is replaced by??password.shadow.user.password
?????????????????????? }
????????????????id=$TEXT unsigned int

????????????????group=$TEXT unsigned 
int
?????????????? name=$TEXT
?????? ?????? home=$TEXT path
?????????????? shell=$TEXT executable
end password
??
structure password.shadow
?????? assume??meta {
?????? ?????? 
location=password.meta.location
?????? ?????? 
name="shadow"
?????????????? assume delimiter
<FONT face=Arial 
size=2>?????????????????????? 
field=":"
<FONT face=Arial 
size=2>?????????????????????? 
record="^J","^M"????????????????????????# 
Should this be "\n"?

?????? ?????? }
?????????????? user.name=$TEXT link 
password.user.name match exact
?????? ?????? user.password=$TEXT encrypted 
crypt(3)
?????? ?????? assume user.password.date.change 
encoding $TEXT type date_t
?????? ?????? ?????? last
?????? ?????? ?????? allowed
?????? ?????? ?????? required
?????? ?????? ?????? warning
?????? ?????? ?????? disable
?????? ?????? assume nothing?????? 
?????? ?????? 
?????? ?????? user.password.date.frozen=$text type 
date_t
?????? ?????? reserved=unknown

end??password.shadow
=========================
??
sh> bash --noprofile
sh> trans --shell read password
sh> set

password.meta.record=0
password.meta.location=<FONT 
face=Arial size=2>file://localhost/etc

password.meta.name=passwd
password.meta.delimiter.
password.meta.delimiter.field=:<FONT 
face=Arial size=2>
password.meta.delimiter.record=^J,^M
password.login=root
password.password=*
password.id=0
password.group=0
password.name=root

password.home=/root
password.shell=/bin/bash
password.shadow.meta.<FONT face=Arial 
size=2>location=file://localhost/etc
<FONT face=Arial 
size=2>password.shadow.meta.name=shadow
<FONT face=Arial 
size=2>password.shadow.meta.delimiter.field=:<FONT face=Arial 
size=2>
<FONT face=Arial 
size=2>password.shadow.meta.delimiter.record=^J,^M

password.shadow.user.name=root
password.shadow.user.password=*
password.shadow.user.password.date.change.last=12345
password.shadow.user.password.date.change.allowed=0
password.shadow.user.password.date.change.required=30
password.shadow.user.password.date.change.warning=7
password.shadow.user.password.date.change.disable=0
password.shadow.user.password.date.frozen=0
password.shadow.reserved=
sh> 
password.shadow.user.password.date.change.required=0

sh> trans --shell??write password
??