[ale] Looking for structured data viewer/editor

Christopher Fowler cfowler at outpostsentinel.com
Sun Aug 24 16:48:53 EDT 2003


Looks alot like SNMP to me.  Look at using TLV types.

On Sun, Aug 24, 2003 at 03:07:41PM -0400, Gregory C. Johnson wrote:
> 
>    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
> 
>                field=":"
> 
>                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
> 
>                field=":"
> 
>                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=file://localhost/etc
> 
>    password.meta.name=passwd
>    password.meta.delimiter.
>    password.meta.delimiter.field=:
>    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.location=file://localhost/etc
>    password.shadow.meta.name=shadow
>    password.shadow.meta.delimiter.field=:
>    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
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list