Skip to content

Instantly share code, notes, and snippets.

View losywee's full-sized avatar
🌴
On vacation

Moruy losywee

🌴
On vacation
  • Freelancers
  • London
View GitHub Profile
@losywee
losywee / route.sh
Created December 25, 2015 10:48 — forked from kevinzhow/route.sh
AnyConnect 路由表
route = 8.0.0.0/255.0.0.0
route = 58.0.0.0/255.0.0.0
route = 23.0.0.0/255.0.0.0
route = 117.0.0.0/255.0.0.0
route = 199.0.0.0/255.0.0.0
route = 190.0.0.0/255.0.0.0
route = 198.0.0.0/255.0.0.0
route = 173.0.0.0/255.0.0.0
route = 174.0.0.0/255.0.0.0
route = 168.0.0.0/255.0.0.0
@losywee
losywee / 163.php
Created April 15, 2016 02:13 — forked from rptec/163.php
网易云音乐MV解析- PHP
<?php
## Save as: 163.php
// Musci Video - Format: http://localhost/163.php?pv=720&id=313066
// Musci Singer - Format: http://localhost/163.php?request=singer&id=313066
// Musci Name - Format: http://localhost/163.php?request=name&id=313066
// Musci Cover - Format: http://localhost/163.php?request=cover&id=313066
## Can append suffix to the link. Example: http://localhost/163.php?pv=720&id=313066.mp4
## No Internal Error Output
ERROR_REPORTING(0);
## Get Param
@losywee
losywee / mcrypt-cbc.php
Created August 17, 2016 14:01 — forked from joshhartman/mcrypt-cbc.php
Rijndael 256-bit Encryption Function (CBC)
<?php
// Define a 32-byte (64 character) hexadecimal encryption key
// Note: The same encryption key used to encrypt the data must be used to decrypt the data
define('ENCRYPTION_KEY', 'd0a7e7997b6d5fcd55f4b5c32611b87cd923e88837b63bf2941ef819dc8ca282');
// Encrypt Function
function mc_encrypt($encrypt, $key){
$encrypt = serialize($encrypt);
$iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC), MCRYPT_DEV_URANDOM);
$key = pack('H*', $key);
@losywee
losywee / encrypt_openssl.md
Created March 24, 2018 17:07 — forked from dreikanter/encrypt_openssl.md
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt:

class Sinaupload{
/**
* 上传图床的cookie
*/
private $cookie = '';
/**
* 上传图床接口
*/
private $url = 'http://picupload.service.weibo.com/interface/pic_upload.php'
.'?mime=image%2Fjpeg&data=base64&url=0&markpos=1&logo=&nick=0&marks=1&app=miniblog';
@losywee
losywee / China-telecom encryption.
Created July 2, 2018 13:55
China-telecom mobile client encryption.
import java.security.MessageDigest;
import java.util.Arrays;
import java.io.IOException;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.text.SimpleDateFormat;
import java.util.Date;
@losywee
losywee / README.md
Created February 28, 2023 10:58 — forked from TheBinitGhimire/README.md
Getting an AWS Educate account with $100 worth of cloud credits!
@losywee
losywee / hardened.conf
Created February 10, 2019 04:55 — forked from CHEF-KOCH/hardened.conf
Android 4.4.4/5 sysctl.conf secure hardening tweaks + others
# Show all system parameters with their values (default or changed)
# sysctl -A or via -> sysctl -a | grep tcp
### Show values of parameters modified by you
# sysctl -p
### Show value for a single parameter parameter-name
# sysctl parameter-name
### Change value for a single parameter parameter-name without editing sysctl.conf manually.
# sysctl -w parameter-name = parameter-value
# https://gist.github.com/CHEF-KOCH/0001e66a8c10b1177abe