ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Question:
The Pointy Hair Manager wants to be double sure his double secret e-mail makes it to the appropriate person in the Department of Redundancy Department without being deciphered.
He wants you to encrypt it using your sed transform skills. So replace all letters, capital and lowercase and numbers with alternate characters. You'll need 62(IIRC) alternates and you can use fun stuff, remember to
escape (\) the really weird ones. You will need your script to output your encryption to a file.
The phm_double_secret.txt file is this:
To the Head of the Department of Redundnacy Department,
I believe that, with a bit of work, 33.33% of current system administration
staff, Bob, can be furloughed, saving approximately, oh, around $12,532.67
a year.
Please tell me the correct code in Linux? The phm_double_secret.txt file is this
This will bring my total cost savings proposal for the year up to four - the
point were my 25% bonus kicks in. Raising my salary by $72,000.53 a year.
Sincerely,
PHM
P.S. I do feel that I am underpaid - after all my staff works very hard!
Last edited by rpartee1; 03-26-2022 at 07:15 PM.
Reason: incorrect heading
Question:
The Pointy Hair Manager wants to be double sure his double secret e-mail makes it to the appropriate person in the Department of Redundancy Department without being deciphered.
He wants you to encrypt it using your sed transform skills. So replace all letters, capital and lowercase and numbers with alternate characters. You'll need 62(IIRC) alternates and you can use fun stuff, remember to
escape (\) the really weird ones. You will need your script to output your encryption to a file.
The phm_double_secret.txt file is this:
To the Head of the Department of Redundnacy Department,
I believe that, with a bit of work, 33.33% of current system administration
staff, Bob, can be furloughed, saving approximately, oh, around $12,532.67
a year.
Please tell me the correct code in Linux? The phm_double_secret.txt file is this
This will bring my total cost savings proposal for the year up to four - the
point were my 25% bonus kicks in. Raising my salary by $72,000.53 a year.
Sincerely,
PHM
P.S. I do feel that I am underpaid - after all my staff works very hard!
Except for you, since you just post your work here for us to do for you
Do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and searches) and we'll do our best to help. Keep in mind that your instructor might also be an LQ member.
just banish this freeloader [for ? a month / until they beg forgiveness and actually come clean about their inability to actually attempt to solve even the most trivial of 'challenges'
^^ Please, we can, and should be more welcoming that that! It can be difficult to phrase first questions in a new forum. Hopefully, if the OP continues their study they will find their own place among the crowd!
^^ Please, we can, and should be more welcoming that that! It can be difficult to phrase first questions in a new forum. Hopefully, if the OP continues their study they will find their own place among the crowd!
From my side I have only one question to the OP: what did you implement so far, where did you stuck, what is your actual problem?
text="The Pointy Hair Manager wants to be double sure his double secret
e-mail makes it to the appropriate person in the Department of Redundancy
Department without being deciphered."
base64 <<< "$text" > text2.txt
cat text2.txt
VGhlIFBvaW50eSBIYWlyIE1hbmFnZXIgd2FudHMgdG8gYmUgZG91YmxlIHN1cmUgaGlzIGRvdWJs
ZSBzZWNyZXQgIAplLW1haWwgbWFrZXMgaXQgdG8gdGhlIGFwcHJvcHJpYXRlIHBlcnNvbiBpbiB0
aGUgRGVwYXJ0bWVudCBvZiBSZWR1bmRhbmN5ICAKRGVwYXJ0bWVudCB3aXRob3V0IGJlaW5nIGRl
Y2lwaGVyZWQuCg==
base64 -d text2.txt
The Pointy Hair Manager wants to be double sure his double secret
e-mail makes it to the appropriate person in the Department of Redundancy
Department without being deciphered.
Authenticate:
Code:
base64 <<< $(echo abcdefg)
YWJjZGVmZwo=
auth.sh
Code:
#!/usr/bin/bash
#Correct answer is abcdefg
read -p "Type your secret code: " secr
scode=$(echo 'YWJjZGVmZwo=' | base64 --decode)
if [ $secr == $scode ]; then
echo "You are authenticated"
else
echo "You are not authenticated"
fi
Code:
bash ./auth.sh
Type your secret code: abcdefg
You are authenticated
bash ./auth.sh
Type your secret code: xyzabc
You are not authenticated
I'm not really sure if it was the same person (or a classmate). I definitely would not pay ($15) for a solution on that site.
Exact same wording, and email address starts with "rpartee1". Hard to imagine two people posting the exact same thing with the same words, and an almost identical user name.
Regardless, the OP hasn't responded to any of their threads, and until they do, there's little we can assist with.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.