Skip to content

Instantly share code, notes, and snippets.

View cimi's full-sized avatar
☀️

Alex Ciminian cimi

☀️
View GitHub Profile
@cimi
cimi / jmc-copyright-checker.main.kts
Created March 2, 2022 17:57
Kotlin script to check copyright notices on changed files in openjdk/jmc
!ENTRY org.openjdk.jmc.console.ui 4 4 2021-02-11 17:23:03.865
!MESSAGE Could not connect to Connection to be Edited : Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused: connect]
!STACK 0
org.openjdk.jmc.rjmx.ConnectionException caused by java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused: connect]
at org.openjdk.jmc.rjmx.internal.RJMXConnection.connect(RJMXConnection.java:344)
at org.openjdk.jmc.rjmx.internal.ServerHandle.doConnect(ServerHandle.java:116)
at org.openjdk.jmc.rjmx.internal.ServerHandle.connect(ServerHandle.java:106)
at org.openjdk.jmc.console.ui.editor.internal.ConsoleEditor$Conn
@cimi
cimi / solve_intro.py
Created May 23, 2020 09:16
Hackasat - solve intro
from pwn import *
TICKET="ticket{charlie13078november:GKoPacNtB4q3dptlAjUMQlHHdNvsJxdmyjs1ABiR05oAFVa8guB34bd-hSYtx0glKQ}"
HOST="intro2.satellitesabove.me"
PORT=5001
ANSWER="1789224188"
p = remote(HOST, PORT)
# docker build -t ctf:ubuntu19.10 .
# docker run --rm -v $PWD:/pwd --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -d --name ctf -i ctf:ubuntu19.10
# docker exec -it ctf /bin/bash
FROM ubuntu:19.10
ENV LC_CTYPE C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y build-essential jq strace ltrace curl wget rubygems gcc dnsutils netcat gcc-multilib net-tools vim gdb gdb-multiarch \
@cimi
cimi / juice_shop_morty.go
Created October 26, 2019 17:23
Solution for OWASP Juice Shop challenge
package main
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
"os"
"strconv"
"strings"
<html>
<head>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script>
window.onload = function () {
var flag = "fb{cr055_s173_l34|<5_4r4_c00o";
//var flag = "fffff";
var cur_flag = flag;
var cur_char = "";
// https://leetcode.com/problems/median-of-two-sorted-arrays/
import (
"fmt"
"sort"
)
func findMedianSortedArrays(nums1 []int, nums2 []int) float64 {
total := len(nums1) + len(nums2)
mid1, mid2 := total / 2, total / 2
if total % 2 == 0 {
@cimi
cimi / murmurhash3.bench.js
Last active September 25, 2018 09:53
Benchmark modified version of murmurhash3js with multi-byte character code handling against original
import Benchmark from "benchmark";
import benchmarks from "beautify-benchmark";
import polyfill from "text-encoding";
import murmurhash3jsOriginal from "murmurhash3js";
import murmurhash3jsModified from "@cimi/murmurhash3js";
test.only(
"benchmark example",
() => {

Keybase proof

I hereby claim:

  • I am cimi on github.
  • I am cimi (https://keybase.io/cimi) on keybase.
  • I have a public key ASCCW9Z9WSeaRLZjVCHFSp2mZFScvMUuCBIuLK6YnSSI0Qo

To claim this, I am signing this object:

@cimi
cimi / transparent-octocat.html
Last active January 16, 2023 12:24
Transparent octocat outline in SVG
<!-- modified version of github-corners with transparent octocat -->
<a href="https://github.com/cimi/color-automata" class="github-corner" aria-label="View source on Github">
<svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true">
<defs>
<mask id="octomask">
<path fill="white" d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
<path fill="black" d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" style="transform-origin: 130px 106px;" class="octo-arm"></path>
<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 2