Skip to content

Instantly share code, notes, and snippets.

@dvas0004
dvas0004 / searchsploit-update.sh
Created October 19, 2014 09:41
Kali Linux Searchsploit updater
echo "Updating SearchSploit... (Kali Linux)"
# move into the exploit db directory within Kali
cd /usr/share/exploitdb
echo "Downloading latest archive..."
wget http://www.exploit-db.com/archive.tar.bz2
echo "Downloaded archive, proceeding to extract..."
tar -xjvf archive.tar.bz2
package main
import (
"gorm.io/driver/sqlite"
"gorm.io/gorm"
)
type job1 struct {
ID int `gorm:"primaryKey"`
UniqueField1 string
package main
import (
"bytes"
"fmt"
"log"
"math/rand"
"os"
"strings"
"time"
@dvas0004
dvas0004 / DefaultRouter.kt
Last active February 20, 2022 22:14
A clear, simple example of multipart file upload using Reactive Spring (http://blog.davidvassallo.me/2018/07/09/reactive-spring-webflux-multipart-file-upload/)
package com.example.FileUploadExample
import com.example.FileUploadExample.HomeHandler
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.http.MediaType
import org.springframework.web.reactive.function.server.HandlerFunction
import org.springframework.web.reactive.function.server.RequestPredicates
import org.springframework.web.reactive.function.server.RouterFunction
import org.springframework.web.reactive.function.server.RouterFunctions
package main
import (
"bytes"
"crypto/sha256"
"encoding/base64"
"encoding/json"
"fmt"
"net/http"
"strings"
package main
import (
"bytes"
"encoding/json"
"fmt"
"log"
"net/http"
"strconv"
"sync"
from bluetooth import *
import sys
from subprocess import call
if sys.version < '3':
input = raw_input
addr = None
@dvas0004
dvas0004 / eidVerifySignature.py
Created February 25, 2019 10:10
python script to verify ECDSA signatures generated from the newer Estonian eID cards. Signature and Certificate must be obtained from eID itself, eg by using: https://hwcrypto.github.io/demo/
# pip install ecdsa
# pip install cryptography
# https://github.com/warner/python-ecdsa
# https://cryptography.io/en/latest/
from ecdsa import VerifyingKey, BadSignatureError
from cryptography import x509
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description></description>
<groupId>0165328f-016a-1000-faa4-53a3512c51c5</groupId>
<name>NetFlow To File</name>
<snippet>
<connections>
<id>2b15b939-ffe5-342a-0000-000000000000</id>
<parentGroupId>ca04b9d6-b10c-33c7-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
package com.example.mvc
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController
import java.lang.Thread.sleep
import java.util.concurrent.CompletableFuture
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
@RestController