command | description |
---|---|
ctrl + a | Goto BEGINNING of command line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"crypto/aes" | |
"crypto/cipher" | |
"encoding/base64" | |
"fmt" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum { BMAX = 32, BMIN = BMAX / 2, BHEIGHT = 6 }; | |
struct BNode { | |
uint32_t length; | |
Key keys[BMAX]; | |
union { | |
BNode *children[BMAX]; | |
Value values[BMAX]; | |
}; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##TCP FLAGS## | |
Unskilled Attackers Pester Real Security Folks | |
============================================== | |
TCPDUMP FLAGS | |
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere) | |
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere) | |
Pester = PSH = [P] (Push Data) | |
Real = RST = [R] (Reset Connection) | |
Security = SYN = [S] (Start Connection) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function gitclone() { | |
cd ~/workspace | |
path=$1 | |
# remove http:// or https:// at the begining | |
path=${path#http://} | |
path=${path#https://} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.util.*; | |
import java.lang.management.BufferPoolMXBean; | |
import java.lang.management.ManagementFactory; | |
import javax.management.MBeanServerConnection; | |
import javax.management.ObjectName; | |
import javax.management.remote.*; | |
import com.sun.tools.attach.VirtualMachine; // Attach API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "log" | |
import "flag" | |
import "net/http" | |
import "fmt" | |
var dir = flag.String("d", ".", "file directory") | |
var port = flag.Int("p", 8088, "server port") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"time" | |
"sync/atomic" | |
"hash/adler32" | |
"fmt" | |
"os" | |
"runtime" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://stackoverflow.com/a/11910583/5797497 | |
Old thread, but got exactly the same stupid mistake. /lib64 was moved to /lib64.bak remotely and everything stopped working. | |
This was a x86_64 install, so ephemient's solution was not working: | |
# /lib64.bak/ld-linux.so.2 --library-path /lib64.bak/ /bin/mv /lib64.bak/ /lib64 | |
/bin/mv: error while loading shared libraries: /bin/mv: wrong ELF class: ELFCLASS64 | |
In that case, a different ld-linux had to be used: | |
# /lib64.bak/ld-linux-x86-64.so.2 --library-path /lib64.bak/ /bin/mv /lib64.bak/ /lib64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gdb -ex 'set print thread-events off' --batch -q -x ~/df.py | |
import os | |
import os.path | |
import sys | |
import gdb | |
pid = open('/var/run/docker.pid', 'r').read() | |
print 'attach to ' + pid | |
gdb.execute('attach ' + pid) | |
os.chdir('/proc/%s/fd'%pid) |
NewerOlder