Forwarded from .рубик (Rubikoid)
В продолжение извращений - есть маленький бинарь на rust, который транслируется все вызовы себя в git в весле.
https://github.com/andy-5/wslgit
У него довольно узкий юзкейс, но вдруг кому-то пригодится)
https://github.com/andy-5/wslgit
У него довольно узкий юзкейс, но вдруг кому-то пригодится)
GitHub
GitHub - andy-5/wslgit: Use Git installed in Bash on Windows/Windows Subsystem for Linux (WSL) from Windows and Visual Studio Code…
Use Git installed in Bash on Windows/Windows Subsystem for Linux (WSL) from Windows and Visual Studio Code (VSCode) - andy-5/wslgit
👍1👎1
#prog #rust #rustlib
merge
Provides Merge, a trait for objects that can be merged.
merge
Provides Merge, a trait for objects that can be merged.
trait Merge {Example:
fn merge(&mut self, other: Self);
}
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);
Lib.rs
Merge — Rust library
Merge multiple values into one
🔥10👍1🙏1
Forwarded from b'Лог' (Не Алина)
— Алин, а что если верить например не в конкретную теорию заговора а во что-то среднее между ними
— Ну не, это скучно они все и так одинаковые. Лучше как вот насчёт теории заговора о теориях заговора: кто-то наводнил меметическое пространство всей этой ерундой про евреев и проч чтобы сомневающиеся не дошли до НАСТОЯЩИХ скрываемых истин
— Алин, это не теория заговора, это нормальная мысль
— Ну не, это скучно они все и так одинаковые. Лучше как вот насчёт теории заговора о теориях заговора: кто-то наводнил меметическое пространство всей этой ерундой про евреев и проч чтобы сомневающиеся не дошли до НАСТОЯЩИХ скрываемых истин
— Алин, это не теория заговора, это нормальная мысль
👎8👍5🌚5😁2💩1
#prog #rust #article
Release Engineering Is Exhausting So Here's cargo-dist
Или как собирать бинарники под разные системы так, чтобы это всё работало с минимальными усилиями.
Release Engineering Is Exhausting So Here's cargo-dist
Или как собирать бинарники под разные системы так, чтобы это всё работало с минимальными усилиями.
blog.axo.dev
axo blog - Release Engineering Is Exhausting So Here's cargo-dist
Release Announcement for cargo-dist, a tool to help you package up binaries for a Rust application.
👍7
Forwarded from ИА Панорама
⚡️ Военные США сбили чайник Рассела
Объект засекли на низкой околоземной орбите и запустили по нему ракету с истребителя F-22.
Объект засекли на низкой околоземной орбите и запустили по нему ракету с истребителя F-22.
😁20🔥4
Блог*
#prog #go t.iss.one/gepardchan/10
Telegram
Гепардово гнездо
Как повесить компилятор Rust
(продолжение к https://t.iss.one/gepardchan/10, но тогда было про Go, а сейчас про Rust!)
Скормите ему вот такой вот код:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=4c9d40ee85823a6574df8b57075380c0
Тогда…
(продолжение к https://t.iss.one/gepardchan/10, но тогда было про Go, а сейчас про Rust!)
Скормите ему вот такой вот код:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=4c9d40ee85823a6574df8b57075380c0
Тогда…
😁2
Forwarded 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.
https://tom7.org/chess/cve.pdf
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.
https://tom7.org/chess/cve.pdf
😁11👍2
Forwarded from Segment@tion fault
Поздравляю всех подписчиков со светлым праздником 14 февраля!
Именно в этот день, 77 лет назад, был запущен первый ENIAC.
Именно в этот день, 77 лет назад, был запущен первый ENIAC.
👍17🎉9😁4❤2😱2