Skip to content

Instantly share code, notes, and snippets.

View lotusirous's full-sized avatar
💭
for { Learn() }

Kha Nguyen lotusirous

💭
for { Learn() }
View GitHub Profile
var tvshows = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
var show_range = 5;
var focus_pos = 0;
var ArrayLookup = function (pos) {
// pos is beginning of Lookup Array
var ret = [];
// tvshows => [0, 1, 2, 3, 4]
//
#!/bin/sh
#
# delete all existing rules.
#
IPT='/sbin/iptables'
LAN_IF='eth3'
WAN_IF='eth0'
OPT_IF='eth1'
# WELCOME TO SQUID 3.4.8
# ----------------------------
#
# This is the documentation for the Squid configuration file.
# This documentation can also be found online at:
# http://www.squid-cache.org/Doc/config/
#
# You may wish to look at the Squid home page and wiki for the
# FAQ and other documentation:
# http://www.squid-cache.org/
# WELCOME TO SQUID 3.4.8
# ----------------------------
#
# This is the documentation for the Squid configuration file.
# This documentation can also be found online at:
# http://www.squid-cache.org/Doc/config/
#
# You may wish to look at the Squid home page and wiki for the
# FAQ and other documentation:
# http://www.squid-cache.org/
#
# Recommended minimum configuration:
#
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
#visible_hostname debian
acl fw2net src 192.168.4.0/24 # LAN network FW 2
#!/bin/sh
#
# delete all existing rules.
#
IPT='/sbin/iptables'
LAN_IF='eth4'
WAN_IF='eth0'
OPT_IF='eth1'
iptables -t nat -A POSTROUTING -o eth4 -s 192.168.13.10 -j SNAT --to-source 192.168.9.10
iptables -t nat -A PREROUTING -i eth4 -d 192.168.9.10 -j DNAT --to-destination 192.168.13.10
iptables -A FORWARD -s 192.168.9.10 -j ACCEPT
iptables -A FORWARD -d 192.168.13.10 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth5 -s 192.168.14.10 -j SNAT --to-source 192.168.10.10
iptables -t nat -A PREROUTING -i eth5 -d 192.168.10.10 -j DNAT --to-destination 192.168.14.10
iptables -A FORWARD -s 192.168.10.10 -j ACCEPT
iptables -A FORWARD -d 192.168.14.10 -j ACCEPT
#include <stdio.h>
int main() {
FILE *fp;
char c;
fp = fopen(__FILE__,"r");
do {
c = getc(fp);
putchar(c);
}
while(c != EOF);
@lotusirous
lotusirous / delete_at.js
Last active July 29, 2018 06:46
Delete an element in an array javascript
my_array = [
1,
2,
4,
5,
6,
]
function delete_at(array, index) {
tmp = array;
tmp.splice(index, 1);

Bên lề

Một số trang thêm tính năng cho cuckoo.

References tại đây

Giới thiệu

Cuckoo là một sandbox phân tích malware. Cho phép thực thi malware trong một môi trường máy ảo, ngoài ra nó còn cho phép phân tích trên môi trường máy thật. Kiến trúc của cuckoo theo mô hình của một máy ảo thật sự bao gồm host và guest.