PNG  IHDR* pHYs+ IDATx]n#; cdLb Ǚ[at¤_:uP}>!Usă cag޿ ֵNu`ݼTâabO7uL&y^wFٝA"l[|ŲHLN밪4*sG3|Dv}?+y߉{OuOAt4Jj.u]Gz*҉sP'VQKbA1u\`& Af;HWj hsO;ogTu uj7S3/QzUr&wS`M$X_L7r2;aE+ώ%vikDA:dR+%KzƉo>eOth$z%: :{WwaQ:wz%4foɹE[9<]#ERINƻv溂E%P1i01 |Jvҗ&{b?9g=^wζXn/lK::90KwrюO\!ջ3uzuGv^;騢wq<Iatv09:tt~hEG`v;3@MNZD.1]L:{ծI3`L(÷ba")Y.iljCɄae#I"1 `3*Bdz>j<fU40⨬%O$3cGt]j%Fߠ_twJ;ABU8vP3uEԑwQ V:h%))LfraqX-ۿX]v-\9I gl8tzX ]ecm)-cgʒ#Uw=Wlێn(0hPP/ӨtQ“&J35 $=]r1{tLuǮ*i0_;NƝ8;-vݏr8+U-kruȕYr0RnC]*ެ(M:]gE;{]tg(#ZJ9y>utRDRMdr9㪩̞zֹb<ģ&wzJM"iI( .ꮅX)Qw:9,i좜\Ԛi7&N0:asϓc];=ΗOӣ APqz93 y $)A*kVHZwBƺnWNaby>XMN*45~ղM6Nvm;A=jֲ.~1}(9`KJ/V F9[=`~[;sRuk]rєT!)iQO)Y$V ی ۤmzWz5IM Zb )ˆC`6 rRa}qNmUfDsWuˤV{ Pݝ'=Kֳbg,UҘVz2ﴻnjNgBb{? ߮tcsͻQuxVCIY۠:(V뺕 ٥2;t`@Fo{Z9`;]wMzU~%UA蛚dI vGq\r82iu +St`cR.6U/M9IENDB` REDROOM
PHP 5.6.40
Preview: dbinfo Size: 3.15 KB
//usr/share/doc/perl-DB_File/dbinfo

#!/usr/bin/perl

# Name:		dbinfo -- identify berkeley DB version used to create 
#			  a database file
#
# Author:	Paul Marquess  <Paul.Marquess@btinternet.com>
# Version: 	1.06 
# Date		27th March 2008
#
#     Copyright (c) 1998-2012 Paul Marquess. All rights reserved.
#     This program is free software; you can redistribute it and/or
#     modify it under the same terms as Perl itself.

# Todo: Print more stats on a db file, e.g. no of records
#       add log/txn/lock files

use strict ;

my %Data =
	(
	0x053162 =>	# DB_BTREEMAGIC
            {
			  Type 	   => "Btree",
			  Versions => # DB_BTREEVERSION
				{
				  1	=> [0, "Unknown (older than 1.71)"],
				  2	=> [0, "Unknown (older than 1.71)"],
				  3	=> [0, "1.71 -> 1.85, 1.86"],
				  4	=> [0, "Unknown"],
				  5	=> [0, "2.0.0 -> 2.3.0"],
				  6	=> [0, "2.3.1 -> 2.7.7"],
				  7	=> [0, "3.0.x"],
				  8	=> [0, "3.1.x -> 4.0.x"],
				  9	=> [1, "4.1.x or greater"],
				}
			},
	0x061561 => 	# DB_HASHMAGIC
            {
			  Type     => "Hash",
			  Versions => # DB_HASHVERSION
				{
				  1	=> [0, "Unknown (older than 1.71)"],
        			  2     => [0, "1.71 -> 1.85"],
        			  3     => [0, "1.86"],
        			  4     => [0, "2.0.0 -> 2.1.0"],
        			  5     => [0, "2.2.6 -> 2.7.7"],
        			  6     => [0, "3.0.x"],
				  7	=> [0, "3.1.x -> 4.0.x"],
				  8	=> [1, "4.1.x or greater"],
				  9	=> [1, "4.6.x or greater"],
				}
			},
	0x042253 => 	# DB_QAMMAGIC
            {
			  Type     => "Queue",
			  Versions => # DB_QAMVERSION
				{
				  1	=> [0, "3.0.x"],
				  2	=> [0, "3.1.x"],
				  3	=> [0, "3.2.x -> 4.0.x"],
				  4	=> [1, "4.1.x or greater"],
				}
			},
	) ;

die "Usage: dbinfo file\n" unless @ARGV == 1 ;

print "testing file $ARGV[0]...\n\n" ;
open (F, "<$ARGV[0]") or die "Cannot open file $ARGV[0]: $!\n" ;

my $buff ;
read F, $buff, 30 ;


my (@info) = unpack("NNNNNNC", $buff) ;
my (@info1) = unpack("VVVVVVC", $buff) ;
my ($magic, $version, $endian, $encrypt) ;

if ($Data{$info[0]}) # first try DB 1.x format, big endian
{
    $magic = $info[0] ;
    $version = $info[1] ;
    $endian  = "Big Endian" ;
    $encrypt = "Not Supported";
}
elsif ($Data{$info1[0]}) # first try DB 1.x format, little endian
{
    $magic = $info1[0] ;
    $version = $info1[1] ;
    $endian  = "Little Endian" ;
    $encrypt = "Not Supported";
}
elsif ($Data{$info[3]}) # next DB 2.x big endian
{
    $magic = $info[3] ;
    $version = $info[4] ;
    $endian  = "Big Endian" ;
}
elsif ($Data{$info1[3]}) # next DB 2.x little endian
{
    $magic = $info1[3] ;
    $version = $info1[4] ;
    $endian  = "Little Endian" ;
}
else
  { die "not a Berkeley DB database file.\n" }

my $type = $Data{$magic} ;
$magic = sprintf "%06X", $magic ;

my $ver_string = "Unknown" ;

if ( defined $type->{Versions}{$version} )
{
     $ver_string = $type->{Versions}{$version}[1];
     if ($type->{Versions}{$version}[0] )
       { $encrypt = $info[6] ? "Enabled" : "Disabled" }
     else
       { $encrypt = "Not Supported" }
}

print <<EOM ;
File Type:		Berkeley DB $type->{Type} file.
File Version ID:	$version
Built with Berkeley DB:	$ver_string
Byte Order:		$endian
Magic:			$magic
Encryption:             $encrypt
EOM

close F ;

exit ;

Directory Contents

Dirs: 0 × Files: 3

Name Size Perms Modified Actions
16.48 KB lrw-r--r-- 2018-07-14 16:31:02
Edit Download
3.15 KB lrw-r--r-- 2019-10-13 07:57:17
Edit Download
26.78 KB lrw-r--r-- 2018-07-14 17:19:43
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
© 2026 REDROOM — Secure File Manager. All rights reserved. Built with ❤️ & Red Dark UI