Skip to content

Instantly share code, notes, and snippets.

View akamajoris's full-sized avatar
💭
Life

Canis Majoris akamajoris

💭
Life
View GitHub Profile
@akamajoris
akamajoris / gist:bbd3e4395a87fdca2af2fedaf9cf70e0
Created December 11, 2021 15:20
Sofia hash bruteforce (hisilicon)
#!/usr/bin/python
# -*- coding: utf-8 -*-
import hashlib
hash = 'tlJwpbo6' # for example
def sofia_hash(msg):
h = ""
m = hashlib.md5()
@akamajoris
akamajoris / YApi-RCE.md
Created July 16, 2021 22:12 — forked from pikpikcu/YApi-RCE.md
YApi-RCE

POC YApi RCE:

Reference:

POC

Requests:

POST /api/user/reg HTTP/1.1
Host: 
User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0
@akamajoris
akamajoris / maillog-stats.go
Created April 3, 2019 12:01
Simple maillog parser
package main
import (
"bufio"
"fmt"
"log"
"net"
"os"
"regexp"
"sort"
@akamajoris
akamajoris / col.go
Created August 27, 2018 08:45
Etherum methods collision finder
package main
import (
"encoding/hex"
"fmt"
"log"
"os"
"github.com/ethereum/go-ethereum/crypto/sha3"
)
@akamajoris
akamajoris / domains.sh
Last active March 16, 2018 17:19
Идите на*уй со своими сабдомен сканнерами, которые тянут тонну зависимостей
curl -s "https://crt.sh/?q=%.ya.ru&output=json" | grep -Po 'name_value":"([^"]+)"' | awk -F':' '{ print $2 }' | sed 's/"//g' | sort -u
#!/bin/bash
BOTID='' #change me
MYID='108474952' #change me
echo "Run command: " $*
#start=`date +%s`
res1=$(date +%s.%N)
$*
res2=$(date +%s.%N)
dt=$(echo "$res2 - $res1" | bc)
dd=$(echo "$dt/86400" | bc)
0xaa7790cdd931c6c378259feac4b8734c2eb0215c
@akamajoris
akamajoris / letsencrypt_2017.md
Created August 23, 2017 15:37 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

package main
import "fmt"
func HeapPermutation(a []string, size int) {
if size == 1 {
fmt.Println(a)
}
@akamajoris
akamajoris / main.go
Created June 13, 2017 14:09 — forked from mschoebel/main.go
Snippet: login/logout (Golang)
package main
import (
"fmt"
"github.com/gorilla/mux"
"github.com/gorilla/securecookie"
"net/http"
)
// cookie handling