https://github.com/haletran/42_cybersecurity-piscine
Every days of the 42 Cybersecurity Piscine
https://github.com/haletran/42_cybersecurity-piscine
Last synced: 8 months ago
JSON representation
Every days of the 42 Cybersecurity Piscine
- Host: GitHub
- URL: https://github.com/haletran/42_cybersecurity-piscine
- Owner: Haletran
- Created: 2025-02-03T15:05:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-13T17:34:02.000Z (over 1 year ago)
- Last Synced: 2025-09-01T00:58:48.606Z (10 months ago)
- Language: Go
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 42_Cybersecurity-Piscine
## GO language
```bash
go mod init
go run .
```
```go
// basic hello world in go
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
```
## Day00
The `spider` program allow you to extract all the images from a website, recursively, by
providing a url as a parameter.
Useful packages for `spider` :
- `net/http`
- `colly`
- `goquery`
```./spider.go:39:14: more than one character in rune literal```
-> use double quotes instead of single quotes for strings
## Day01
- The executable must be named ft_otp
- Your program must take arguments.
1. -g: The program receives as argument a hexadecimal key of at least 64 char-
acters. The program stores this key safely in a file called ft_otp.key, which
is encrypted.
2. -k: The program generates a new temporary password based on the key given
as argument and prints it on the standard output.
- Your program must use the HOTP algorithm (RFC 4226).
- The generated one-time password must be random and must always contain the
same format, i.e. 6 digits.
## Day02
Setup a `.onion website` using the Tor network.
```bash
# access ssh on the server
ssh -i ~/.ssh/ft-onion root@172.17.0.2 -p 4242
```
[Host your own Tor darkweb .onion site for free with NGINX](https://www.youtube.com/watch?v=6BV-3yWzWcI&t=10s)