Skip to content

Instantly share code, notes, and snippets.

View pressure679's full-sized avatar

Vittus Mikiassen pressure679

View GitHub Profile
@pressure679
pressure679 / rake.go
Created September 19, 2019 14:31
use the rake algorithm (rapid applicable keywords) on a txt file
package main
import (
// "io"
// "bufio"
// "strings"
// "strconv"
// "github.com/alixaxel/pagerank"
// "github.com/boltdb/bolt"
"fmt"
"io/ioutil"
@pressure679
pressure679 / noun-extraction.go
Created September 19, 2019 14:30
extract nouns from a txt file (english)
package main
import (
"fmt"
"os"
"github.com/mvryan/fasttag"
// "github.com/neurosnap/sentences"
// "github.com/neurosnap/sentences/data"
// "sort"
"io/ioutil"
// "math"
package main
import (
"fmt"
"strings"
"bytes"
"golang.org/x/net/html"
"github.com/akhenakh/gozim"
"github.com/jaytaylor/html2text"
)
func main() {
@pressure679
pressure679 / memory.c
Created July 11, 2017 19:39
Memory fetcher
#include <stdlib.h>
#include <stdio.h>
int main() {
unsigned char *pointer = (unsigned char *) malloc(0);
unsigned int i;
unsigned int hex;
unsigned int start = (unsigned int) pointer + 0x14c0;
for (; (unsigned int)pointer < start; pointer += 0x20) {
printf("0x%p\n", pointer);
for (i = 1; i <= 0x20; i++) {
/* Problem is described at http://golang.org/pkg/net/http/#Response
as following:
// Body represents the response body.
//
// The http Client and Transport guarantee that Body is always
// non-nil, even on responses without a body or responses with
// a zero-length body. It is the caller's responsibility to
// close Body. The default HTTP client's Transport does not
// attempt to reuse HTTP/1.0 or HTTP/1.1 TCP connections
// ("keep-alive") unless the Body is read to completion and is
@pressure679
pressure679 / MainActivity.java
Last active August 29, 2015 14:23
Eclipse java project for Android 22
package com.example.sampleprj;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
// import android.view.Menu;
//import android.view.MenuItem;
//import android.app.Activity;
//import android.os.Bundle;
//import android.R;
@pressure679
pressure679 / ptkgen.go
Last active October 5, 2022 05:59
ptk generator (CCMP)
func CustomPRF512(key, a, ssid string, b []byte) []byte {
var ptk []byte
var buff bytes.Buffer
nullbyte := []byte{0}
for i := 0; i < 4; i++ {
passwordstr := "Pairwise key expansion" + string(nullbyte) + string(b) + string(i)
password := []byte(passwordstr)
// hmacsha1 = hmac.new(key,A+chr(0x00)+B+chr(i),sha)
//salt := []byte(pmk)
func writefile(filename, txt string) {
f, err := os.OpenFile(filename, os.O_APPEND, 0644)
checkerr(err)
_, err = f.WriteString("\n" + "go" + txt)
checkerr(err)
f.Close()
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Navneting
{
class Program
{