I have a script with dynamic hash of hashes , and I want to print the entire hash (with all other hashes).
Itried to do it recursively by checking if the current key is a hash and if yes call the current function again with refference to the sub hash.
Most of the printing seems to be OK but in... (1 Reply)
hi there, I have some database output that looks like this
SELECT nic_name,nic_duplex,nic_speed,nic_ip FROM network_table WHERE hostname = "server1"
result is this (ive delimited with a pipe for ease of reading)
bge0|full|1000|10.32.100.1
bge1|full|1000|11.12.101.7 ... (1 Reply)
Hi there
I have a hash of hashes made up of the following data
bge0|100|half|10.36.100.21
bge1|1000|full|10.36.100.22
bge2|1000|full|10.36.100.23
which when i turn into a hash, would look like this inside the system
bge0 ->
nic_speed -> 100
nic_duplex -> half
... (6 Replies)
Hi, sorry, two hash related questions in one day .. but this has got me a bit stuck.
I have a mysql database table that kind of looks like this, the table is called "view1" and a snippet of that table (SELECT'ing just rows with serial number 0629AN1200) is below
serial nic_name ... (2 Replies)
Can Someone explain me why even using Tie::IxHash I can not get the output data in the same order that it was inserted? See code below.
#!/usr/bin/perl
use warnings;
use Tie::IxHash;
use strict;
tie (my %programs, "Tie::IxHash");
while (my $line = <DATA>) {
chomp $line;
my(... (1 Reply)
hi all,
i have a small problem regarding sorting the keys in a hash.
my %hash;
for($i=0;$i<19;$i++)
{
$hash{$i}=$i;
}
foreach $c (sort keys %hash)
{
print "\n $hash{$c}";
} (1 Reply)
Hi there, I am trying to dereference my hash of hashes but post dereferencing, it seems to lose its structure I am using Data::dumper to help me anaylise.
This is the code im using to build the HoH, (data comes from a file). I have also performed a Dumper on the data structure before and after... (1 Reply)
Hi Folks
I am very much a newbie at perl but picking it up and I'm hoping you can help.
I have a file input that details all the /etc/group files in our enterprise in the following format: "<host>:<group>:<gid>:<users>"
I want to parse this data display it as the following:... (9 Replies)
I want to sort values of a hash in ascending order.
my %records;
for my $value (sort values %records){print $value,"\n";}
When I use the above code I get values in this order: 1,10,11,2,3,4,5,6,7,8,9. But, I need values in my output in this order: 1,2,3,4,5,6,7,8,9,10,11.
Can Someone... (1 Reply)
Hello experts. I'm having problems with a snippet of code.
I was hoping to get help/advice to correct.
A file that this script parses has changed to the point where
I can no longer use a scalar, it looks as though I need to
create an array for a hash of hashes below.
The first output of... (1 Reply)
Discussion started by: timj123
1 Replies
LEARN ABOUT MOJAVE
eficheck
EFICHECK(8) BSD System Manager's Manual EFICHECK(8)NAME
eficheck -- check the integrity of the x86 flash chip firmware.
SYNOPSIS
eficheck --integrity-check [-h EFI-hash-input-file] [-b EFI-binary-input-file]
eficheck --show-hashes [-h EFI-hash-input-file] [-b EFI-binary-input-file]
eficheck --generate-hashes [-h EFI-hash-output-file] [-p output-path]
eficheck --save [-b EFI-binary-output-file]
eficheck --cleanup [-b EFI-binary-input-and-output-file>]
eficheck --version
eficheck --help
DESCRIPTION
eficheck is a tool to check the x86 flash chip firmware.
The following commands can be used with eficheck:
--integrity-check hashes portion of the firmware and compares against known-good hashes
--generate-hashes outputs hashes for a given firmware to be used as known-good hashes
--show-hashes shows the hashes for the sub-sections of the firmware which are measured
--save saves the full flash chip contents to a binary file. Requires root privileges.
--cleanup zeros any privacy-sensitive data (such as nvram), enabling the file to be shared for analysis.
--version print out eficheck version number.
--help display a short help.
EXAMPLES
'eficheck --save -b firmware.bin'
Save this system's EFI firmware as firmware.bin
'eficheck --cleanup -b firmware.bin'
Overwrite the EFI variables portion of the firmware.bin, in place
'eficheck --generate-hashes'
Analyze the current system's installed EFI firmware, and store the hashes into hash file(s) in current folder
File name(s) will be selected according to image's EFI version(s)
'eficheck --generate-hashes -b firmware.bin'
Analyze the firmware.bin, and store the hashes into hash file(s) in current folder. Filename will be based on the detected
firmware version.
'eficheck --generate-hashes -p /usr/local/allowlists'
Analyze the current system's installed EFI firmware, and store the hashes into hash file(s) in /usr/local/allowlists folder
'eficheck --integrity-check'
Attempt to automatically determine which firmware you are running, and integrity check against the appropriate file, and report
any differences
'eficheck --integrity-check -h /usr/libexec/firmwarecheckers/eficheck/EFIAllowListShipping.bun-
dle/allowlists/IM171.88Z.0105.B08.1604111319.0.ealf'
Compare the current system's EFI firmware against the Apple-provided expected measurements for an "iMac17,1" at firmware revision
B08, and report any differences
'eficheck --integrity-check -h hash.ealf -b firmware.bin'
Compare the given hash file against against the given firmware image and report any differences
'eficheck --show-hashes'
Print the hashes for the current system's installed EFI firmware to stdout
'eficheck --show-hashes -b firmware.bin'
Print the hashes for the given firmware.bin to stdout
'eficheck --show-hashes -h IM171.88Z.0105.B08.1604111319.0.ealf'
Print the hashes for the given allowlist to stdout
May 25, 2017