Блог*
Открыть в Telegram
Блог со звёздочкой. Много репостов, немножко программирования. Небольшое прикольное комьюнити: @decltype_chat_ptr_t Автор: @insert_reference_here
Больше1 982
Подписчики
+124 часа
-137 дней
-1330 дней
Архив постов
1 983
Repost from ☕️ Мерлин заваривает τσάι 🐌
#KingMe attack
An input validation error in the move parser allows remote privilege escalation.
The popular internet chess site lichess.org allows for the import of PGN files, a standard text-based inter-change format for giving the sequence of moves in a game. Moves look like “e4” (move a pawn to the e4 square) or “Qxd3” (queen captures on d3) or “Rcc8” (the rook on the C file moves to c8). When a pawn moves into the last or first rank, it usually promotes to queen, but may legally promote to a bishop, knight, or rook at the player’s option. This preference is specified using the notation g8=B (or N for knight, R for rook, or Q for queen to optionally be explicit). lichess.org does not properly implement this syntax, and allows a move like g8=K, which is not legal chess.
The pawn is promoted to a king. This is a privilege escalation vulnerability, because the king has privileges that the pawn does not have, such as the privilege to be checkmated.
http://tom7.org/chess/cve.pdf
13 февр. 2023, 12:28
1 983
Repost from ИА Панорама
⚡️ Военные США сбили чайник Рассела
Объект засекли на низкой околоземной орбите и запустили по нему ракету с истребителя F-22.
13 февр. 2023, 07:25
1 983
#prog #rust #article
Release Engineering Is Exhausting So Here's cargo-dist
Или как собирать бинарники под разные системы так, чтобы это всё работало с минимальными усилиями.
12 февр. 2023, 09:03
1 983
Repost from N/a
— Алин, а что если верить например не в конкретную теорию заговора а во что-то среднее между ними
— Ну не, это скучно они все и так одинаковые. Лучше как вот насчёт теории заговора о теориях заговора: кто-то наводнил меметическое пространство всей этой ерундой про евреев и проч чтобы сомневающиеся не дошли до НАСТОЯЩИХ скрываемых истин
— Алин, это не теория заговора, это нормальная мысль
11 февр. 2023, 01:22
1 983
#prog #rust #rustlib
merge
Provides Merge, a trait for objects that can be merged.
trait Merge {
fn merge(&mut self, other: Self);
}
Example:
use merge::Merge;
#[derive(Merge)]
struct User {
// Fields with the skip attribute are skipped by Merge
#[merge(skip)]
pub name: &'static str,
// The Merge implementation for Option replaces its value if it is None
pub location: Option<&'static str>,
// The strategy attribute is used to customize the merge behavior
#[merge(strategy = merge::vec::append)]
pub groups: Vec<&'static str>,
}
let defaults = User {
name: "",
location: Some("Internet"),
groups: vec!["rust"],
};
let mut ferris = User {
name: "Ferris",
location: None,
groups: vec!["mascot"],
};
ferris.merge(defaults);
assert_eq!("Ferris", ferris.name);
assert_eq!(Some("Internet"), ferris.location);
assert_eq!(vec!["mascot", "rust"], ferris.groups);10 февр. 2023, 15:43
1 983
Repost from .рубик
В продолжение извращений - есть маленький бинарь на rust, который транслируется все вызовы себя в git в весле.
https://github.com/andy-5/wslgit
У него довольно узкий юзкейс, но вдруг кому-то пригодится)
10 февр. 2023, 13:48
1 983
https://t.me/ebuchiy_sluchay/1527
Тру. Работает, правда, далеко не только на мужчинах, но им слишком часто подобного недостаёт
10 февр. 2023, 07:03
