All the credits go to: iximeow (aka pipeline staller)
See the thread for details.
-
Compile
nasm-stub.rs
rustc nasm-stub.rs
# frozen_string_literal: true | |
require 'delegate' | |
class Deck < DelegateClass(::Hash) | |
attr_reader :choosen | |
def initialize(choosen = nil, **initial) | |
super(initial) |
k;double sin() | |
,cos();main(){float A= | |
0,B=0,i,j,z[1760];char b[ | |
1760];printf("\x1b[2J");for(;; | |
){memset(b,32,1760);memset(z,0,7040) | |
;for(j=0;6.28>j;j+=0.07)for(i=0;6.28 | |
>i;i+=0.02){float c=sin(i),d=cos(j),e= | |
sin(A),f=sin(j),g=cos(A),h=d+2,D=1/(c* | |
h*e+f*g+5),l=cos (i),m=cos(B),n=s\ | |
in(B),t=c*h*g-f* e;int x=40+30*D* |
{ | |
"default": true, | |
"line_length": false, | |
"no-bare-urls": false, | |
"no-duplicate-heading": false, | |
"no-emphasis-as-heading": false, | |
"no-inline-html": false, | |
"no-trailing-punctuation": false, | |
"ul-style": { "style": "sublist" }, | |
"header-style": { "style": "setext_with_atx" } |
/* | |
* Print lines at stdin | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int getint(int *result) | |
{ |
All the credits go to: iximeow (aka pipeline staller)
See the thread for details.
Compile nasm-stub.rs
rustc nasm-stub.rs
;x08#!nasm | |
# https://twitter.com/iximeow/status/1487578872363192322 | |
BITS 64 | |
section .text | |
global _start | |
_start: |
use std::io::Write; | |
use std::process::Command; | |
extern "C" { | |
fn mprotect(addr: *const u8, len: usize, prot: u32) -> u32; | |
} | |
fn main() { | |
let mut args = std::env::args(); | |
let _ = args.next(); |
# frozen_string_literal: true | |
require 'timeout' | |
module Classroom | |
module Command | |
Result = Struct.new :argv, :out, :err, :status, :pid, :timeout, :canceled, keyword_init: true do | |
def exitcode | |
@exitcode ||= status&.exitstatus || 128 | |
end |
--- | |
" ": !ruby/struct:Char | |
data: | |
:encoding: 32 | |
:swidth: | |
:x: 514 | |
:y: 0 | |
:dwidth: | |
:x: 10 | |
:y: 0 |