Skip to content

Instantly share code, notes, and snippets.

@RBPi
RBPi / htb_exam_monitoring.py
Last active May 8, 2024 10:02
HTB Academy Certificate Exams Results Monitoring
# HTB Academy Certificate Exams Results Monitoring
# Author: RBPi
import requests
import time
import random
import os
import urllib.parse
import urllib.request
@isasharafdin
isasharafdin / npm-downloads-increaser.mjs
Created May 8, 2024 10:01
🚀 Instantly amplify your npm package's downloads with npm Downloads Increaser! This powerful script rapidly boosts your download stats, showcasing your package's popularity. Dive in and see your numbers soar! 🌟
import https from 'https'; // Import the https module to make HTTPS requests
import readline from 'readline'; // Import the readline module for interactive command line interfaces
// Create a readline interface for user input from the command line
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
/**
@hoodoer
hoodoer / setRefererHeader.js
Last active May 8, 2024 10:01
Code Snippet to Set 'Referer' Header using JavaScript (e.g. XSS Payload)
// Save the current URL path to restore after making
// malicious request with faked referer header value
var savedPath = window.location.pathname;
var savedSearch = window.location.search;
// Change URL/History to control the referer header value
// Swap out "/this-is-my-fake-referer-value" to be what you need
window.history.replaceState(null, '', '/this-is-my-fake-referer-value');
// Send malicious request with faked referer header value
@cstroe
cstroe / OpenSourceCRM.rst
Last active May 8, 2024 10:01
A distilled list of open-source CRM software
@lewangdev
lewangdev / default.custom.yaml
Last active May 8, 2024 09:58
雾凇拼音自定义配置,MacOS-like & Wechat-like Dark/Light Color Scheme For Rime
patch:
# 菜单
menu:
page_size: 8 # 候选词个数
# alternative_select_labels: [ ①, ②, ③, ④, ⑤, ⑥, ⑦, ⑧, ⑨, ⑩ ] # 修改候选项标签
# alternative_select_keys: ASDFGHJKL # 如编码字符占用数字键,则需另设选字键
# ascii_mode、inline、no_inline、vim_mode 等等设定,可参考 /Library/Input Methods/Squirrel.app/Contents/SharedSupport/squirrel.yaml
# 中西文切换
#
# 【good_old_caps_lock】 CapsLock 切换到大写或切换中英。
@WKL-Sec
WKL-Sec / get_current_process_image_filename_peb.cpp
Created May 6, 2024 16:51
Retrieve the current process's image file name using the Process Environment Block (PEB) in C++.
// White Knight Labs
// By Stigs
// Offensive Development Course - Filename Check with PEB
#include <iostream>
#include <Windows.h>
#include <winternl.h>
// Function to get the current process image file name using PEB
std::wstring GetCurrentProcessImageFileName()
@vctr-uniq
vctr-uniq / shake_camera.gd
Last active May 8, 2024 09:57
Godot Engine - Shake 3D camera script
# usage example:
# curr_camera.shake(0.25, 40, 0.2)
extends Camera
var duration = 0.0
var period_in_ms = 0.0
var amplitude = 0.0
var timer = 0.0
var last_shook_timer = 0
@soheilhy
soheilhy / nginxproxy.md
Last active May 8, 2024 09:56
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@wojteklu
wojteklu / clean_code.md
Last active May 8, 2024 09:54
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@zuhairkareem
zuhairkareem / search_partial_string_array.php
Last active May 8, 2024 09:54
Search partial string in an array in PHP
<?php
/**
* First Method.
*/
function array_search_partial($arr, $keyword) {
foreach($arr as $index => $string) {
if (strpos($string, $keyword) !== FALSE)
return $index;
}
}