get_bomb - print "Your full name =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#! /usr/bin/perl print "This script is to help you download a bomb that is specialized for you.\nIt will ask you for some information about yourself and then it will ask you\nfor your CAEDM password. The password is used to SSH into the bomb host\nmachine and to save the bomb to your current directory. The bomb will be in \nbomb.tar in your current directory.\n\nPress ENTER to continue."; <>; # Get information print "Enter your user name:"; chomp($username1 = <>); print "Enter your full name:"; chomp($fullname1 = <>); print "Enter your lab partners user name if you have one:"; chomp($username2 = <>); print "Enter your lab partners full name if you have one:"; chomp($fullname2 = <>); # Confirm information print "\nYour user name = $username1\n";
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: print &quot;Your full name = $fullname1\n&quot;; print &quot;Lab partners user name = $username2\n&quot;; print &quot;Lab partners full name = $fullname2\n&quot;; print &quot;\nIs this information correct?(y/n)\n&quot;; chomp($correct = &lt;&gt;); if (!($correct eq &quot;y&quot;)) { print &quot;The information is NOT correct\n&quot;; exit(); } # Replace all spaces with %20 $username1 =~ s/ /\%20/; $username2 =~ s/ /\%20/; $fullname1 =~ s/ /\%20/; $fullname2 =~ s/ /\%20/; # Get bomb $command = &quot;ssh $username1\ 'curl \&quot; user1mail=$username1&amp;user1name=$fullname1&amp;user2mail=$username2&amp;user2name=$fullname2 &amp;submit=Submit\&quot; &gt;&gt; bomb.tar'&quot;; #print &quot;command\n$command\n&quot;; system($command);...
View Full Document

This note was uploaded on 02/12/2010 for the course ECEN 324 taught by Professor Jka during the Winter '10 term at BYU.

Ask a homework question - tutors are online