Skip to content

Instantly share code, notes, and snippets.

🌴
On vacation

Moruy losywee

🌴
On vacation
  • Freelancers
  • London
Block or report user

Report or block losywee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@losywee
losywee / hardened.conf
Created Feb 10, 2019 — forked from CHEF-KOCH/hardened.conf
Android 4.4.4/5 sysctl.conf secure hardening tweaks + others
View hardened.conf
# 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
@losywee
losywee / China-telecom encryption.
Created Jul 2, 2018
China-telecom mobile client encryption.
View China-telecom 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;
View sina weibo image uploader
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 / encrypt_openssl.md
Created Mar 24, 2018 — forked from dreikanter/encrypt_openssl.md
File encryption using OpenSSL
View encrypt_openssl.md

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:

@losywee
losywee / mcrypt-cbc.php
Created Aug 17, 2016 — forked from joshhartman/mcrypt-cbc.php
Rijndael 256-bit Encryption Function (CBC)
View mcrypt-cbc.php
<?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 / 163.php
Created Apr 15, 2016 — forked from rptec/163.php
网易云音乐MV解析- PHP
View 163.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 / route.sh
Created Dec 25, 2015 — forked from kevinzhow/route.sh
AnyConnect 路由表
View route.sh
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
You can’t perform that action at this time.