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.

Programming
Python tasks

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

`x`0 | `ox`1 | `oo`2
Example input 1
xxoxoo
Output
0012
Example input 2
xoxxoxoxooxoxoo
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
Output
[1, 3, 7, 7, 8, 8, 9]
True
Example input 2
[4, 9, 3, 6, 8] 7
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@
Output
cdef1@
Example input 2
9A&cYzg
Output
9C&eAbi

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
xyzxyzxyzza
Output
x: 3
y: 4
z: 4
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
Output
6
Example input 2
56207
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
Output
Minimum: 2
Maximum: 9
Example input 2
7
7 8 1 5 3 5 6
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
Output
Vowels: 5
Consonants: 12
Example input 2
helloworld
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
Output
Factorial:120
Example input 2
10
Output
Factorial:3628800
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.
Git

Git Task

Click here & follow the instructions on the github page.