Go Back   FlashFXP Forums > > > >

ioFTPD General New releases, comments, questions regarding the latest version of ioFTPD.

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-09-2011, 10:54 PM   #1
Yil
Too much time...
FlashFXP Beta Tester
ioFTPD Administrator
 
Join Date: May 2005
Posts: 1,194
Default Site UGrep Script

UGrep.itcl v1.0
---------------
Extract matching fields out of userfiles

Usage:
site UGrep [ "-nozeros" ] { <fieldName> | "*" } [<regexp>]
"-nozeros" - Hide fields whose value is "0".
<fieldName> - Search particular user field only
"*" - Search against all searchable fields
<regexp> - regular expression to match against field contents, if not supplied match anything.

Output for specific field searches is sorted by the field value, and by uid for "*" searches.

Examples:
site ugrep -- usage info along with valid field list
site ugrep logonlast -- sorted list of when everybody last logged on
site ugrep tagline -- display taglines of all users
site ugrep tagline silver -- display taglines that contain the word silver
site ugrep ips silver -- display users with a hostmask that contains the word silver somewhere in at least one of them.
site ugrep -nozeros expiresat -- displays the time accounts expired or will expire at but don't show normal accounts which never expire.
Attached Files
File Type: zip UGrep-v1.0.zip (3.3 KB, 21 views)
Yil is offline   Reply With Quote
Old 08-09-2011, 11:05 PM   #2
Yil
Too much time...
FlashFXP Beta Tester
ioFTPD Administrator
 
Join Date: May 2005
Posts: 1,194
Default

Please note that the list of searchable fields includes some things that aren't shown in 'site uinfo' such as logoncount and theme.

Times are in human readable form instead of the seconds since epoch they are stored in the userfile and include difference from current time is also displayed. This is really useful when viewing such things as logonlast and deletedon...

UID/GID's show number and resolved name.

This looks like it will a really handy, yet simple, tool. The next step up would be to take the userinfo export it into a SQL memory only DB and allow full SQL searches on it. That might not be a good idea because of the dependence of nxTools on a really old custom build of SQLite and I don't want dll conflicts.

Regexp is a true regular expression, you can use ^ to make it match the start of fields, \w, \s, etc. Validity of the expression is tested.

Feel free to request additional features, report bugs, or supply useful examples.

Make sure to check out 'site createdby' script here as well in case you missed it.
Yil is offline   Reply With Quote
Reply

Tags
display, field, silver, site, ugrep

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:36 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)