Commit b7401a41 authored by SINGH SOURABH BHAGWAN's avatar SINGH SOURABH BHAGWAN

Lab03 upload

parent 5ce5880e
#!/bin/bash
ssh-keygen -t rsa
ssh-copy-id $1@$2
\ No newline at end of file
#!/bin/bash
COUNTER=0
while [ true ]; do
let COUNTER=COUNTER+1
done
\ No newline at end of file
#!/bin/bash
PS1='${debian_chroot:+($debian_chroot)}\u@\h - \t [\W]:\$ '
alias bk="cd \$OLDPWD"
echo -e ""
echo -e '\\\\ // 00'
echo -e ' \\\\ // 0 0'
echo -e ' \\\\ // 0 0'
echo -e ' \\\\ // 0 0'
echo -e ' \\// 0 0'
echo -e ' // 0 0'
echo -e ' // 0 0'
echo -e ' // 00'
echo -e "\n"
\ No newline at end of file
TEAM AUDACITY(GROUP 27)
I, Sourabh, pledge on Gita that I have not given or received any unauthorized assistance on this assignment or any previous task.
I,Harshith, pledge on my honour that I have not given or received any unauthorized assistance on this assignment or any previous task.
I,Uddeshya, pledge on Gita that I have not given or received any unauthorized assistance on this assignment or any previous task.
We have made equal contribution in this assignment.
Sourabh(150050009) 100%
Harshith(150050069) 100%
Uddeshya(15D110007) 100%
########## A ###########
When you press [TAB], readline reads what you typed and sends it to bash for completion.
Bash has inbuild function for add auto-completion results. So, Bash searches through those which are stored already for the give command. If it can't find a complete entry, it returns all the files in the current directory. We can also add entries to the completion.
########## B ###########
Relevant File for memory is '\proc\meminfo'
The command we used to get the desired output : `cat meminfo | grep Mem | tr -d [:blank:] | cut -d ':' -f2`
########## C ###########
The command used to SSH to mars is `ssh {user-name}@mars.cse.iitb.ac.in`
This command contains the '-X' argument where X represents X-server `ssh -X {user-name}@mars.cse.iitb.ac.in`
After logging into mars server, to open -> `subl /tmp/lab03_inlab_C3.txt`
We've done the password less authentication.
########## D ###########
We made an infinite loop (infiniteLoop.sh)
Command to run it in background is `chmod a+x infiniteLoop.sh` and `./infiniteLoop.sh &`
To kill 'cell.sh', we used `kill -9 {process-id}`
For process-id, we grepped through process using `ps aux | grep cell.sh`
Team AUDACITY(GROUP 27)
I, Sourabh, pledge on Gita that I have not given or received any unauthorized assistance on this assignment or any previous task.
I, Harshith, pledge on my honour that I have not given or received any unauthorized assistance on this assignment or any previous task.
I, Uddeshya, pledge on Gita that I have not given or received any unauthorized assistance on this assignment or any previous task.
We have made equal contribution in this assignment.
Sourabh(150050009) 100%
Harshith(150050069) 100%
Uddeshya(15D110007) 100%
Reflection Essay :
BASH - Bourne Again SHell
We explored many aspects of BASH. We got an insight of how to search, edit, replace, delete with different
parameters. It was exciting to send POST requests, host server, tranfer files across machines. And,
also, ppm (Portable Pixmap) was uncompressed and inefficient. It was fun to crack zip file (kind of
brute force) passwords (:P).
References :
Mostly Man Pages
And The Linux Documentation Project Docs
And Stackoverflow.
Tokyo
/home/harshith/devel/bash/Earth
cd "`find -name Japan`"
find -size +50k -size -100k -name "[tT]*" -perm 400
subl "`find -size +50k -size -100k -name "[tT]*" -perm 400`"
GRASS Sceptile
/home/harshith/devel/bash/Earth
cd "`find -name China`"
sed -rne "/(grass|water)\>\s\<[^bm]{6,10}\>/Ip" -e "" Shanghai
Magikarp
rm -r `ls -l | grep -E "^d.*" | cut -d " " -f 9`
rm `ls | grep -E "^A.*"`
rm `find -regextype "posix-egrep" -regex "./([1-9]|([1][1-9])|20)"`
rm *.jpg
cat `ls` > ultraball.html
Squirtle
alpha omega
curl -d "username=alpha&password=omega" "https://www.cse.iitb.ac.in/~sharat/current/cs251/Assign/Lab03/support/verify.php"
cf3c122f1dabdc0fc4e1c37a25556bc8
f24109a62a0422577119abeb0db4f801
192.168.100.10
192.168.100.20
ncat -l 192.168.100.10 < Bulbasaur > Slowpoke
ncat 192.168.100.10 < Slowpoke > Bulbasaur
#!/bin/bash
for (( i = 0; i < 4; i++ )); do
case $i in
"0")
TYPE="application/x-gzip"
EXT=".gzip"
;;
"1")
TYPE="image/jpeg"
EXT=".jpg"
;;
"2")
TYPE="text/html"
EXT=".html"
;;
"3")
TYPE="text/x-c"
EXT=".c"
;;
esac
echo $TYPE $EXT;
file --mime-type * | grep $TYPE | cut -d ":" -f 1 | \
while read FILE;
do
mv "$FILE" "$FILE$EXT";
done;
done;
gcc *.c;
./a.out &> masterball;
ROTOM
application/x-gzip
image/jpeg
text/html
text/x-c
Magikarp
ls -ltr | cut -c 32-34 | tr -d "[[:blank:]]" | while read ASCII; do printf "\x$(printf %x $ASCII)"; done; echo "\n";
Hawlucha
sed -r -e "s/(fighting|flying)/255 0 0/g" corruptedPoke<0301>mon.ppm > H1out
sed -r -e "s/\<((Sp.A)|(Sp.D)|(Atk)|(Def)):(1[0-9][0-9])/255 8 153/g" H1out > H2out
sed -r -e "s/HP-([0-9]{1,3})\/([0-9]{1,3})/\2/g" H2out > uncorruptedPoke<0301>mon.ppm
#!/bin/bash
cat dictionary.txt | \
while read PASS;
do
# echo $PASS;
yes | unzip -qq -o -P $PASS legendaryPokemon.zip
if [[ $? == "0" ]]; then
#statements
echo "";
echo "$PASS";
break;
fi
# yes;
done;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment