Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Dockerfile.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM gcc:11

RUN apt-get update && apt-get install -y \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*

#Set working directory
WORKDIR /app

#Copy all files to the container
COPY . /app/

RUN mkdir -p /app/users

#Compile the C++ code
RUN g++ -o Task2Praval_J_app Task2Praval_J.cpp -lcrypto -std=c++17 -lstdc++fs

#Run the compiled code
CMD ["./Task2Praval_J_app"]
105 changes: 105 additions & 0 deletions PRAVAL_JIDDU_PJ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
**OVERTHEWIRE ASSIGNMENT**

Lv 0 \= ssh [bandit0@bandit.labs.overthewire.org](mailto:bandit0@bandit.labs.overthewire.org) \-p 2220
Password \= bandit0
$ exit
Lv1 \== $ ssh [bandit1@bandit.labs.overthewire.org](mailto:bandit1@bandit.labs.overthewird.org) \-p 2220
$ ls
$ cat readme
$ cat ./-
$ exit
Lv2 \== $ ssh [bandit2@bandit.labs.overthewire.org](mailto:bandit1@bandit.labs.overthewird.org) \-p 2220
$ cat ‘spaces in this filename’
$ exit
Lv3 \== $ ssh [bandit3@bandit.labs.overthewire.org](mailto:bandit1@bandit.labs.overthewird.org) \-p 2220
$ ls \-A
$ cd inhere
$ find .
$ cat …Hiding-From-You
$ exit
Lv4 \== $ ssh [bandit4@bandit.labs.overthewire.org](mailto:bandit1@bandit.labs.overthewird.org) \-p 2220
$ ls
$ cd inhere
$ find . \-type f \-exec grep \-I . {} \\; \- print
$ exit
Lv5 \== $ ssh [bandit5@bandit.labs.overthewire.org](mailto:bandit1@bandit.labs.overthewird.org) \-p 2220
$ ls
$ cd inhere
$ find \! \-executable \-size 1033c
$ file ./maybehere07/.file2
$ cat ./maybehere07/.file2
$ exit
Lv6 \== $ ssh [bandit6@bandit.labs.overthewire.org](mailto:bandit1@bandit.labs.overthewird.org) \-p 2220
$ cd ..
$ cd ..
$ ls
$ find \-user bandit7 \-group bandit6 \-size 33c
$ cat ./var/lib/dpkg/info/bandit7.password
$ exit
Lv7 \== $ ssh [bandit7@bandit.labs.overthewire.org](mailto:bandit7@bandit.labs.overthewire.org) \- p 2220
$ ls
$ grep millionth data.txt
$ exit
Lv8 \==$ ssh [bandit8@bandit.labs.overthewire.org](mailto:bandit8@bandit.labs.overthewire.org) \-p 2220
$ ls
$ sort data.txt | uniq \-c | grep 1
$exit

Lv9 \== $ ssh [bandit9@bandit.labs.overthewire.org](mailto:bandit9@bandit.labs.overthewire.org) \-p 2220
$ ls
$ strings \-a data.txt | grep \=
$ exit
Lv10 \== $ ssh [bandit10@bandit.labs.overthewire.org](mailto:bandit9@bandit.labs.overthewire.org) \-p 2220
$ ls
$ strings data.txt | base64 \-di
$ exit
Lv11 \== $ ssh [bandit11@bandit.labs.overthewire.org](mailto:bandit11@bandit.labs.overthewire.org) \-p 2220
$ ls
$ cat data.txt | tr 'a-z' 'n-za-m' | tr 'A-Z' 'N-ZA-M'
$ exit
Lv12 \==$ ssh [bandit12@bandit.labs.overthewire.org](mailto:bandit12@bandit.labs.overthewire.org) \-p 2220
$ dir\_name=$(mktemp \-d)
$ cp data.txt $dir\_name
$ cd $dir\_name
$ file data.txt \# got ASCII
$ xxd \-r data.txt \> data2.bin
$ file data2.bin
$ mv data2.bin data2.gz && gunzip data2.gz
$ ls
$ file data2
$ bunzip2 data2
$ file data2.out
$ mv data2.out data3.gz && gunzip data3.gz
$ ls
$ file data3
$ tar \-x \-f data3
$ ls
$ file data5.bin
$ tar \-x \-f data5.bin
$ ls
$ file data6.bin
$ bunzip2 data6.bin
$ file data6.bin.out
$ tar \-xf data6.bin.out
$ file data8.bin
$ mv data8.bin data8.gz && gunzip data8.gz
$ file data8
$ cat data8
$ exit
Lv 13 \== $ ssh [bandit13@bandit.labs.overthewire.org](mailto:bandit9@bandit.labs.overthewire.org) \-p 2220
$ ls
$ ssh \-i sshkey.private bandit14@bandit.labs.overthewire.org \-p 2220
$ cd /etc/bandit\_pass/
$ cat bandit14
$exit
Lv 14 \== $ ssh [bandit14@bandit.labs.overthewire.org](mailto:bandit9@bandit.labs.overthewire.org) \-p 2220
$ cat /etc/bandit\_pass/bandit14 | nc 127.0.0.1 30000
$exit
Lv 15 \== $ ssh [bandit15@bandit.labs.overthewire.org](mailto:bandit15@bandit.labs.overthewire.org) \-p 2220
$ ncat \- –ssl localhost 30001
8xCjnmgoKbGLhHFAZlGE5Tmu4M2tKJQo
$ exit




93 changes: 93 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,96 @@ Complete levels 0 to 15 of the [Bandit wargame](http://overthewire.org/wargames/
- How you solved it (commands, logic, etc.)

- Commit this file to your branch.

## Task 2
### Netflix Inventory Management

You got your dream job in **MAANG**. To give other employees a run for their money, you have to come up with an **OOPS-based content rental client**.

---

#### High-Level Overview

Create a Netflix-style inventory management system using Object-Oriented Programming (OOPS). The system should manage a collection of movies, TV shows, and users, allowing them to browse, rent, and return content.
NOTE: Your Program should retain its memory of whatever data has been fed by the user

---

#### Login and Account Creation

1. The system should be accessed via a **CLI (Command Line Interface)**.
2. It should have options for:
- **User Login / Sign-Up**
- **Admin Login**
3. Users choose their own username. The system should ensure **uniqueness of usernames**.

---

#### User Account Features

1. Browse content by **category** (Movies or TV Shows) or **genre**.
2. **Search** content by **title** or **genre**.
3. **Rent** movies or TV shows.
4. **Return** rented content.
5. View currently rented items along with:
- **Date rented**
- **Last date of return**
6. View **purchased** items.
7. Check total **charges due**.

---

#### Admin Account Features

1. **Add** new movies and TV shows.
2. **Remove** existing movies and TV shows.
3. **Check** charges due for any user.

---

#### Content Structure

##### Common Attributes:
- **Title**
- **Genre**
- **Rating**
- `is_rented`
- `is_purchased`

---

##### Movie:
- **Duration**
- **Rent cost**
- **Purchase cost**

---

##### TV Show:
- **Seasons**
- **Episodes per season**
- **Per season rent cost**
- **Per season purchase cost**
---

#### Submission

- Fork the GitHub repository.
- Create a new branch with your name:
Format — `[firstname]_[lastname_initial]` (e.g., `atulya_s`)
- Submit a **pull request** by:
**11:59:59 PM, 13th May 2025**
- For any doubts, open an issue on the main repo.
- The task should be contained in a directory structured as Task2/{[firstname]_[lastname_initial]}/
- Also your code should be written in C++
- Your Code should have a Dockerfile along with it and we should be able to run it through docker as well
---

#### Suggestions

- Do **not** use GPT or other AI tools as we might very well ask you to explain your code as well as your thought process.
- Use your **own logic** and write clean, structured code.
- If you think you can make the program with alternative methods like MongoDB or SQL then you are free to do so.(But then your code should still run inside docker satisfying all the requirements)
- Feel free to get **creative** with features, but stick to the core requirements.
- Hint: For storage think of each object as a file.
---
Loading