Skip to content

Instantly share code, notes, and snippets.

@miamor
miamor / LiferayJsonEvalCC6.java
Created June 19, 2021 12:08 — forked from testanull/LiferayJsonEvalCC6.java
Liferay Json Deserialize 1 hit RCE
package ysoserial.payloads;
import com.mchange.lang.ByteUtils;
import org.apache.commons.collections.Transformer;
import org.apache.commons.collections.functors.ChainedTransformer;
import org.apache.commons.collections.functors.ConstantTransformer;
import org.apache.commons.collections.functors.InvokerTransformer;
import org.apache.commons.collections.keyvalue.TiedMapEntry;
import org.apache.commons.collections.map.LazyMap;
import ysoserial.payloads.annotation.Authors;
@miamor
miamor / mTrans.js
Last active June 4, 2021 02:37
Simple Translation tool
// ==UserScript==
// @name mTrans
// @namespace simple.trans.tool
// @version 1.10
// @description Translates selected text into a tooltip.
// @copyright @miamor
// @include https://hanaichi.vn/backend/phucthai/amm/orders/update/*
// @require http://code.jquery.com/jquery-2.1.0.min.js
// @grant GM_getValue
// @grant GM_setValue
@miamor
miamor / simple_userscript.js
Last active October 27, 2019 14:21
Simple annoying adware userscript
// ==UserScript==
// @name Simple annoying adware
// @namespace SimpleAnnoyingAdware
// @include *
// @author Tu nguyen
// @description Just something stupid
// @require https://code.jquery.com/jquery-3.4.1.min.js
// @grant GM_notification
// @grant window.focus
// ==/UserScript==
@miamor
miamor / net_traffic_nsl-kdd_lstm.py
Last active April 13, 2018 06:32
Classify traffic network using LSTM and NSL_KDD dataset
"""
Data used for this script: https://github.com/defcom17/NSL_KDD
Remove the 42th column (name of attack type)
"""
import sys
import os
import json
import pandas
import numpy as np
@miamor
miamor / net_traffic_neural_classifier.py
Last active March 29, 2018 08:23
Simple model to classify network traffic using keras framework.
"""
Data used for this script:
https://raw.githubusercontent.com/networkedsystemsIITB/Traffic_Classification/master/scripts/v1.0/KNN-classification-2-interface-machine/data.csv
"""
"""
Step 1 : Load and setup data
"""
import csv
import pandas as pd
@miamor
miamor / net_traffic_classifier.py
Last active March 29, 2018 08:29
Classify traffic network with simple linear classfiers.
"""
Data used for this script:
https://raw.githubusercontent.com/networkedsystemsIITB/Traffic_Classification/master/scripts/v1.0/KNN-classification-2-interface-machine/data.csv
"""
import pandas
from pandas.plotting import scatter_matrix
import matplotlib.pyplot as plt
from sklearn import model_selection
from sklearn.metrics import classification_report