glacier ctf 25
This commit is contained in:
1
2025/glacier/misc/best_food/flag.txt
Normal file
1
2025/glacier/misc/best_food/flag.txt
Normal file
@@ -0,0 +1 @@
|
||||
gctf{FAKE_FAKE_FAKE_FAKE_FAKE_FAKE}
|
||||
42
2025/glacier/misc/best_food/main.rs
Normal file
42
2025/glacier/misc/best_food/main.rs
Normal file
@@ -0,0 +1,42 @@
|
||||
/// Compute the mean latitude/longitude (center) of a set of coordinates.
|
||||
pub fn mean_center(coords: &[(f64, f64)]) -> Option<(f64, f64)> {
|
||||
if coords.is_empty() {
|
||||
return None;
|
||||
}
|
||||
let (mut sum_lat, mut sum_lon) = (0.0, 0.0);
|
||||
for &(lat, lon) in coords {
|
||||
sum_lat += lat;
|
||||
sum_lon += lon;
|
||||
}
|
||||
Some((sum_lat / coords.len() as f64, sum_lon / coords.len() as f64))
|
||||
}
|
||||
|
||||
fn get_center_point(amenity: &str) -> Option<(f64, f64)> {
|
||||
// TODO: Get POI's and finde center point.
|
||||
unimplemented!();
|
||||
|
||||
return mean_center(nodes);
|
||||
}
|
||||
|
||||
fn calc_final_point(
|
||||
a: (f64, f64, f64),
|
||||
b: (f64, f64, f64),
|
||||
c: (f64, f64, f64),
|
||||
) -> Option<(f64, f64)> {
|
||||
// TODO: Calculate hidden place coords.
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let (lat_a, lon_a) = get_center_point("bar").unwrap();
|
||||
let (lat_b, lon_b) = get_center_point("atm").unwrap();
|
||||
let (lat_c, lon_c) = get_center_point("taxi").unwrap();
|
||||
|
||||
let secret_hideout = calc_final_point(
|
||||
// (lat, lon, dis)
|
||||
(lat_a, lon_a, 0.6412652119499),
|
||||
(lat_b, lon_b, 0.2822972577454),
|
||||
(lat_c, lon_c, 0.9572772921063),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
2
2025/glacier/misc/best_food/sha256sum
Normal file
2
2025/glacier/misc/best_food/sha256sum
Normal file
@@ -0,0 +1,2 @@
|
||||
624334072551c61994e332e6b069da525dabd206a96b0e0fe96b4bad16e0dd65 ./main.rs
|
||||
6cc4e5fb79eb10fefc68aef9a70100f486aabaeeee13ea6e1ed227ce218cc9fe ./flag.txt
|
||||
BIN
2025/glacier/misc/rfc1035/app
Executable file
BIN
2025/glacier/misc/rfc1035/app
Executable file
Binary file not shown.
BIN
2025/glacier/misc/rfc1035/app.i64
Normal file
BIN
2025/glacier/misc/rfc1035/app.i64
Normal file
Binary file not shown.
12
2025/glacier/misc/rfc1035/decode.py
Normal file
12
2025/glacier/misc/rfc1035/decode.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import codecs
|
||||
|
||||
with open("./pic.txt", "rb") as f:
|
||||
data = f.read().strip()
|
||||
|
||||
binary_data = codecs.decode(data, 'unicode-escape').encode('latin1')
|
||||
|
||||
with open("pic.png", "wb") as f:
|
||||
f.write(binary_data)
|
||||
|
||||
|
||||
|
||||
BIN
2025/glacier/misc/rfc1035/flag.png
Normal file
BIN
2025/glacier/misc/rfc1035/flag.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
BIN
2025/glacier/misc/rfc1035/pic.png
Normal file
BIN
2025/glacier/misc/rfc1035/pic.png
Normal file
Binary file not shown.
1
2025/glacier/misc/rfc1035/pic.txt
Normal file
1
2025/glacier/misc/rfc1035/pic.txt
Normal file
File diff suppressed because one or more lines are too long
1
2025/glacier/misc/rfc1035/sha256sum
Normal file
1
2025/glacier/misc/rfc1035/sha256sum
Normal file
@@ -0,0 +1 @@
|
||||
7ade19dfaccf17665b67c23b1f47d2738a21fa955f912ed76d276af475f0e7af ./app
|
||||
98793
2025/glacier/misc/rfc1035/strings
Normal file
98793
2025/glacier/misc/rfc1035/strings
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user