04-02-2019
Quote:
Originally Posted by
Priya Amaresh
Always it gets into else part..
A little more detail (like, i.e. which programming language you use) would be helpful, don't you think?
bakunin
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, how do I match a particular element in a list and replace it with blank?
awk 'sub///' $FILE
list="AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA,
HI, ID, IL, IN, IA, KS, KY, LA, ME, MD,
MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ,
NM, NY, NC, ND, OH, OK, OR, PA, RI, SC,
SD, TN, TX, UT, VT, VA, WA,... (2 Replies)
Discussion started by: grossgermany
2 Replies
2. UNIX for Dummies Questions & Answers
>testfile
while read x
do
if then
echo $x >> testfile
else
fi
if then
echo $x >> testfile
else
fi
done < list_of_files
is there any efficient way to search abc.dml and xyz.dml ? (2 Replies)
Discussion started by: dr46014
2 Replies
3. Shell Programming and Scripting
Given this XML:
<?xml version="1.0"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
... (2 Replies)
Discussion started by: ricksj
2 Replies
4. Shell Programming and Scripting
I want to check if every <Part> element has corresponding <Description> in this sample XML.
....<Lot Of XML>
<Inv lineNumber="2">
<Item>
... (4 Replies)
Discussion started by: kchinnam
4 Replies
5. Shell Programming and Scripting
Can you search AWK array elements and return each index value for that element.
For example an array named car would have index make and element engine. I want to return all makes with engine size 1.6.
Array woulld look like this:
BMW 1.6
BMW 2.0
BMW 2.5
AUDI 1.8
AUDI 1.6
... (11 Replies)
Discussion started by: u20sr
11 Replies
6. Shell Programming and Scripting
Hi All
I have a problem that I am not able to resolve.
Briefly, I have a file like this:
ID_1 10
ID_2 15
ID_3 32
ID_4 45
ID_5 66
ID_6 79
ID_7 88This file is numerically ordered for the 2th column.
And another file containing a list of IDs(just one in this example)
ID_4What I... (7 Replies)
Discussion started by: giuliangiuseppe
7 Replies
7. Shell Programming and Scripting
Hi
I am trying to execute a sed command inside paramiko which finds and deletes the particular string from a file
But sed command doesnt work inside paramiko python
machine=qwe
dssh = paramiko.SSHClient()
dssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
try:
... (4 Replies)
Discussion started by: Priya Amaresh
4 Replies
8. Shell Programming and Scripting
Hello All,
There are various codes available to find the intersection between two sets in python. But my case is the following:
I want to find the continual common pattern in different lists compared to list1.
(i have underlined the longest common patterns in set a and set b)
a = 2, 3, 5,... (1 Reply)
Discussion started by: Zam_1234
1 Replies
9. Shell Programming and Scripting
Hi Team,
I have a CSV file which I have to read through and needs to insert the content within an XML file using Python ONLY ( as most of the code base we have in python only). I managed to find the first part, missing how to insert to XML under "specific" tags.
cat input.csv... (0 Replies)
Discussion started by: panyam
0 Replies
10. Programming
Hi all...
As you know I like making code backwards compatible for as many platforms as possible.
This Python script was in fact dedicated for the AMIGA A1200 using Pythons 1.4.0, 1.5.2, 1.6.0, 2.0.1, and 2.4.6 as that is all we have for varying levels of upgrades from a HDD and 4MB FastRam... (1 Reply)
Discussion started by: wisecracker
1 Replies
LEARN ABOUT CENTOS
tpm_quote_tools
TPM QUOTE
TOOLS(8) TPM QUOTE TOOLS(8)
NAME
TPM Quote Tools
PROGRAMS
tpm_mkuuid, tpm_mkaik, tpm_loadkey, tpm_unloadkey, tpm_getpcrhash, tpm_updatepcrhash, tpm_getquote, tpm_verifyquote
DESCRIPTION
TPM Quote Tools is a collection of programs that provide support for TPM based attestation using the TPM quote operation.
A TPM contains a set of Platform Configuration Registers (PCRs). In a well configured machine, some of these registers are set to known
values during the boot up process or at other times. For example, a PCR might contain the hash of a boot loader in memory before it is
run.
The TPM quote operation is used to authoritatively verify the contents of a TPM's Platform Configuration Registers (PCRs). During provi-
sioning, a composite hash of a selected set of PCRs is computed. The TPM quote operation produces a composite hash that can be compared
with the one computed while provisioning.
To use the TPM quote operation, keys must be generated. During provisioning, an Attestation Identity Key (AIK) is generated for each TPM,
and the public part of the key is made available to entities that validate quotes.
The TPM quote operation returns signed data and a signature. The data that is signed contains the PCRs selected for the operation, the
composite hash for the selected PCRs, and a nonce provided as input, and used to prevent replay attacks. At provisioning time, the data
that is signed is stored, not just the composite hash. The signature is discarded.
An entity that wishes to evaluate a machine generates a nonce, and sends it along with the set of PCR used to generate the composite PCR
hash at provisioning time. For this use of the TPM quote operation, the signed data is ignored, and the signature returned is used to val-
idate the state of the TPM's PCRs. Given the signature, the evaluating entity replaces the nonce in the signed data generated at provi-
sioning time, and checks to see if the signature is valid for the data. If so, this check ensures the selected PCRs contain values that
match the ones measured during provisioning.
A typical scenario for an enterprise using these tools follows. The tools expect AIKs to be referenced via one enterprise-wide Universally
Unique Identifier (UUID). The program tpm_mkuuid creates one.
For each machine being checked, an AIK is created using tpm_mkaik. The key blob produced is bound to the UUID on its machine using
tpm_loadkey. The public key associated with the AIK is sent to the entities that verify quotes. Finally, the expected PCR composite hash
is obtained using tpm_getpcrhash. When the expected PCR values change, a new hash can be generated with tpm_updatepcrhash.
The program to obtain a quote, and thus measure the current state of the PCRs is tpm_getquote. The program that verifies the quote
describes the same PCR composite hash as was measured initially is tpm_verifyquote.
SEE ALSO
tpm_mkuuid(8), tpm_mkaik(8), tpm_loadkey(8), tpm_unloadkey(8), tpm_getpcrhash(8), tpm_updatepcrhash(8), tpm_getquote(8), tpm_verifyquote(8)
Oct 2010 TPM QUOTE TOOLS(8)