SET 1

Your door to cybersecurity starts with nothing more than curiosity. Solve these introductory challenges to familiarize yourselves with the fundamentals. As you go, always try to learn and explore every topic you encounter; try to go the extra distance; leave no detail behind. Also remember to maintain detailed writeups for all the tasks you do. All tasks here are mandatory for entry into the club.

Git

Git Task

Click here & follow the instructions on the github page.

Linux task

OverTheWire: Bandit

Complete Levels 0 through 10 (inclusive) of the Bandit Wargame.
Submit your work as a markdown (.md) file that documents the solution for each level, including the command(s) used and a brief explanation of the purpose and functionality of each command.

Keep a brief writeups of the commands used in each level.
Programming
Python tasks

Q1.Write a python script to input and decode the following ternary numeric notation:

`x`0 | `ox`1 | `xx`2
Example input 1
xxoxx
Example input 2
xoxxoxoxxxxoxxx
Output
0012
Output
010112012

Q2.Write a Python script that takes a list of numbers and a target number as input. Sort the list using any sorting algorithm (without using any built-in sorting functions). Then, search for the target number in the sorted list and print True if it is found; otherwise, print False.

Example input 1
[7, 8, 9, 1, 7, 8, 3] 3
Example input 2
[4, 9, 3, 6, 8] 7
Output
[1, 3, 7, 7, 8, 8, 9]
True
Output
[3, 4, 6, 8, 9]
False

Q3.Write a Python script that shifts every input letter two positions forward in the alphabet while leaving all non-alphabetic characters unchanged.
Note: Letters must wrap back to a and A after z and Z respectively.

Example input 1
abcd1@
Example input 2
9A&cYzg
Output
cdef1@
Output
9C&eYbi

Q4.Write a python script that counts and prints the frequency of each character in the input string. Then print the reversed string.

Example input 1
xyzxyyzxyzza
Output
x: 3
y: 4
z: 3
a: 1
Reversed string: azzyxzyxzyx
Programming
C tasks

Q5.Write a C script to input a number and find the sum of all of its digits.

Example input 1
123
Example input 2
56207
Output
6
Output
20

Q6.Write a C program to find the minimum and maximum values in an integer array. The first line of input contains an integer N, representing the number of elements in the array. The second line contains N space-separated integers. Print the minimum and maximum values in the array.

Example input 1
5
2 6 4 9 3
Example input 2
7
7 8 1 5 3 5 6
Output
Minimum: 2
Maximum: 9
Output
Minimum: 1
Maximum: 8

Q7.Write a C program that takes a string input and counts the number of vowels and consonants.

Example input 1
bi0s CTF recruitment
Example input 2
helloworld
Output
Vowels: 5
Consonants: 10
Output
Vowels: 3
Consonants: 7

Q8.Write a program in C to find the factorial of a given number using pointers.

Example input 1
5
Example input 2
10
Output
Factorial:120
Output
Factorial:3628800