Skip to content

Instantly share code, notes, and snippets.

@net1
net1 / bayes_stopwords.cf
Created September 17, 2023 05:20
Stopwords for Asian languages in Unicode format for use with SpamAssassin
if (version >= 4.000000)
ifplugin Mail::SpamAssassin::Plugin::Bayes
if can(Mail::SpamAssassin::Conf::feature_bayes_stopwords)
bayes_stopword_th (\xe0(?:\xb8(?:\x97\xe0(?:\xb8(?:\xb1\xe0\xb9\x89\xe0\xb8\x87(?:\xe0\xb8\x99\xe0\xb8\xb5\xe0\xb9\x89)\x3f|\xb5\xe0\xb9\x88(?:\xe0\xb8\xaa\xe0\xb8\xb8\xe0\xb8\x94)\x3f|\xb2\xe0\xb8\x87|\xb8\xe0\xb8\x81)|\xb9\x8d\xe0\xb8\xb2(?:\xe0\xb9\x83\xe0\xb8\xab\xe0\xb9\x89)\x3f)|\x95\xe0(?:\xb9(?:\x88\xe0\xb8(?:\xb2\xe0\xb8\x87(?:\xe0\xb9\x86)\x3f|\xad)|\x89\xe0\xb8\xad\xe0\xb8\x87)|\xb8(?:\xb1\xe0\xb9\x89\xe0\xb8\x87(?:\xe0\xb9\x81\xe0\xb8\x95\xe0\xb9\x88)\x3f|\xb2\xe0\xb8\xa1))|\xab\xe0\xb8(?:\xa5\xe0\xb8(?:\xb1\xe0\xb8\x87(?:\xe0\xb8\x88\xe0\xb8\xb2\xe0\xb8\x81)\x3f|\xb2\xe0\xb8\xa2)|\x99\xe0\xb8\xb6\xe0\xb9\x88\xe0\xb8\x87|\xa3\xe0\xb8\xb7\xe0\xb8\xad|\xb2\xe0\xb8\x81)|\x99\xe0(?:\xb8(?:\xb1\xe0(?:\xb9\x89\xe0\xb8\x99|\xb8\x81)|\xad\xe0\xb8\x81\xe0\xb8\x88\xe0\xb8\xb2\xe0\xb8\x81|\xb5\xe0\xb9\x89)|\xb9(?:\x88\xe0\xb8\xb2|\x8d\xe0\xb8\xb2))|\xad\xe0\xb8(?:\xa2\xe0(?:\xb8
@net1
net1 / example_host.conf
Created December 9, 2022 10:15 — forked from rm3nchaca/example_host.conf
Simple script for blocking attacker bots with nginx and a lua script
server {
listen 80;
server_name example.com;
root /www/example;
access_by_lua 'denyip()'; #check error counter
error_page 400 404 405 406 = /404.html;
location = /404.html {
set $inc 1; #this is useful for blocking website scanners
set_by_lua $err 'incerror()' $inc;
@net1
net1 / Import-Variation-Product-Programmatically - WooCommerce
Created February 19, 2022 18:57 — forked from progremzion/Import-Variation-Product-Programmatically - WooCommerce
Script to import variation product from XLS along with images.
<?php
//Set Maximum Execution Time - To Avoid Execution
ini_set('max_execution_time', 0);
//Load WordPress
require_once("wp-load.php"); // Include the class_alias()
require_once(ABSPATH . 'wp-admin/includes/taxonomy.php');
include 'excel_reader/excel_reader.php'; // Include the class
$excel = new PhpExcelReader; // Creates object instance of the class
$excel->read('import/import.xls'); // Reads and stores the excel file data
//Define Variable
@net1
net1 / yara_performance_guidelines.md
Created January 17, 2022 04:11 — forked from Neo23x0/yara_performance_guidelines.md
YARA Performance Guidelines

This Gist has been transfered into a Github Repo. You'll find the most recent version here.

YARA Performance Guidelines

When creating your rules for YARA keep in mind the following guidelines in order to get the best performance from them. This guide is based on ideas and recommendations by Victor M. Alvarez and WXS.

  • Revision 1.4, October 2020, applies to all YARA versions higher than 3.7
<!-- Modify this according to your requirement -->
<h3>
Redirecting to duckdev.com after <span id="countdown">10</span> seconds
</h3>
<!-- JavaScript part -->
<script type="text/javascript">
// Total seconds to wait
var seconds = 10;
# To use : add your line notify api token
LINE_NOTIFY_ACCESS_TOKEN=
# Provide your multiline text. We use shell script heredoc syntax here.
MESSAGE=$(cat << END_HEREDOC
HELLO LINE 1
HELLO LINE 2
END_HEREDOC
)
@net1
net1 / example.com
Created October 6, 2021 13:19 — forked from 1hakr/example.com
Supercharge your NGIX config
proxy_cache_path /tmp/cacheapi levels=1:2 keys_zone=microcacheapi:100m max_size=1g inactive=1d use_temp_path=off;
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name example.com;
location /api/ {
# Rate Limiting
limit_req zone=reqlimit burst=20; # Max burst of request
# ============ Login SCB ========================
# To Use provide your username and password
# chmod -R 777 login_scb.sh
# ./login_scb.sh
# Please provide your username and password on https://www.scbeasy.com/
username=
password=
# Please Specify Your cookie file (Any blank text file is OK.)
# ============ Login K-Bank ========================
# To Use provide your username and password
# chmod -R 777 login_k-bank.sh
# ./login_k-bank.sh
# Please provide your username and password here
# This is not the best choice to use this script. because your password is saved on your machine and transfer through script
# Please consider K-Bank Open API instead https://apiportal.kasikornbank.com/open-api/
username=
password=
@net1
net1 / selenium-php-webdriver-cheatsheet.md
Created June 19, 2021 11:39 — forked from aczietlow/selenium-php-webdriver-cheatsheet.md
Cheat sheet for using php webdriver (facebook/webdriver).

Webdriver PHP API workthough

  • Open a browser

    # start an instance of firefox with selenium-webdriver
    
    $browser_type = 'firefox'
    $host = 'http://localhost:4444/wd/hub'
    

$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);