cover photo

COURSEWORK

Puneeth's CL-CY-001 course work. Lv 2

PuneethAUTHORACTIVE

14 / 9 / 2023


Level 2 Report


Ubuntu Command Line

  • Create a folder named test :

To create a folder we use the mkdir command.

mkdir (folder_name)

1

  • cd into that folder :

To cd into the folder we use the cd command.

cd (folder_name)

2

  • Create a blank file without using any text editor :

To create a blank file we use the ls command.

ls > (filename.txt)

3

  • Create 2600 folders in this folder :

To create multiple folders we use mkdir -p fname{ } command

mkdir -p m90{1..2600}

4

  • Concatenate two text files containing any random text and display them on the terminal

To concatenate two files, first we create two files and add text into them. Then, we concatenate the two files using command cat and store it in another file.

cat file1 file2 > file3

5

To add text into a file we use echo command.


Sharing files between devices:

  • Setting up a sharing file solution

Files can be shared between computers using Wi-Fi.

The following steps are :

  • First, we need to enable sharing using the network. Go to Control Panel > Network and Internet > Network and Sharing Center > Advanced sharing settings.

Under Private and Public profile, enable network discovery, file and printer sharing and disable password protected sharing options.

  • Go to the services app in desktop and change the following services : SSDP Discovery, UPnP Device Host, Function Discovery Provider Host and Function Discovery Resource Publication to automatic startup by right clicking and selecting properties.

  • Finally, select the folder to be shared. Right click and select properties. Under sharing tab, click on share to share the file.

  • Shared file can be accessed by selecting the required system under the Network tab in This PC.

Decoding Various Ciphers

In this task, we are converting the text Cybersecurity in Marvel into various cyphers.

  • Caesar Cypher

The Caesar Cipher technique is one of the earliest and simplest methods of encryption technique. It’s simply a type of substitution cipher, i.e., each letter of a given text is replaced by a letter with a fixed number of positions down the alphabet.

  • Pigpen Cypher

Pig-Pen Encryption uses 26 symbols to represent each letter of the alphabet by mono-alphabetical substitution.

Symbols are created using a 3x3 grid, crosses and dots. Digits do not have symbols.

Given below is the table in which each letter is represented as a unique symbol

Table

  • Morse Code

Morse code is a method used in telecommunication to encode text characters as standardized sequences of two different signal durations, called dots and dashes.

Given below is the Morse Code Table for alphabets.

  • Railfence Cipher

The rail fence cipher is a simple transposition cipher. It is also known as a zigzag cipher. The name comes from the way letters are arranged. In a rail fence cipher, the plaintext letters are written diagonally in a up-down pattern from left to right. The message is then read row-by-row from top to down. The number of rows can vary, and so can also the starting place for the first letter.

  • Playfair Cipher

The Playfair cipher was invented in 1854 by Charles Wheatstone, but named after lord Playfair who heavily promoted the use of the cipher. It is a polygraphic substitution cipher, which encrypts pair of letters instead of single letters. This makes frequency analysis much more difficult, since there are around 600 combinations instead of 26.

  • Polybus Cypher

The Polybius cipher, also called Polybius square, is a substitution cipher using a square grid. Each character of the plain message is replaced by a couple of coordinates defining its position in the grid.

Result:


Vi Editor

Vi editor is a powerful and widely used text editor in UNIX and Linux operating system. It is entirely keyboard-driven and runs in a terminal .

To open it, we type the vi keyword .

vi (file_name)

In this task, I learnt the basics of vi and created a file in vi illustrating the various features of vi.


Javascript

In this task, I learnt the basics of javascript and made a webpage that takes marks and names of students. Then, it calculates the rank, percentage, total marks and displays it.

Code


Async JS

In this task, I learnt about asynchoronous javascript which allows the program to be executed immediately where the synchronous code will block further execution of the remaining code until it finishes the current one.

Code


Promises

In this task, I implemented promises on the above program. The result is the same but the main improvement is for better readability and control flow.

Code


Linux Continued

In this task, I learnt about regex, piping and grep. Using this, I extracted login times using grep from last.

Then, I put this information into a text file and put it into a folder named logs. Then, I Zipped this folder using gzip and tar.


UVCE,
K. R Circle,
Bengaluru 01