Skip to content

Instantly share code, notes, and snippets.

@booletic
booletic / client.py
Created July 16, 2023 21:03
Intrusion
import socket
import time
from umodbus import conf
from umodbus.client import tcp
# Adjust modbus configuration
conf.SIGNED_VALUES = True
# Create a socket connection
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@booletic
booletic / TeleportToBase.cs
Created February 27, 2023 14:24
A uMod plugin for Rust that allows players to teleport back to their base
using System;
using System.Collections.Generic;
using Oxide.Core;
using Oxide.Core.Configuration;
using Oxide.Core.Libraries.Covalence;
namespace Oxide.Plugins
{
[Info("TeleportToBase", "booletic", "1.0.0")]
[Description("Teleports a player back to their base")]
# Mansoor Aldosari (aldosari.medium.com)
# Detect A Webpage Using Entropy
# Requirements:
# 1. numpy==1.23.0
# 2. pandas==1.3.5
# 3. scipy==1.6.3
from scipy.stats import entropy
import requests
from time import sleep
#!/bin/bash
for i in * .*;
do
if [ "$i" != "." -a "$i" != ".." ];
then
echo -n "$i :"
ent $i | grep 'by [0-9]* percent'
fi
done
<Sysmon schemaversion="4.81">
<EventFiltering>
<ProcessCreate onmatch="include" />
<ProcessTerminate onmatch="include" />
<NetworkConnect onmatch="include">
<SourcePort name="RustSRV" condition="is">28015</SourcePort>
<SourcePort name="RustRcon" condition="is">28016</SourcePort>
<SourcePort name="RustPlus" condition="is">28083</SourcePort>
</NetworkConnect>
</EventFiltering>
# switch between steam accounts seamlessly
# created on 2022-07 by Mansoor Aldosari
$username = Read-Host "Enter Steam Username"
$steam = Get-Process steam -ErrorAction SilentlyContinue
if ($steam) {
$steam | Stop-Process
}
function Counter ()
local count = 0
return function ()
count = count + 1
return count
end
end
local counter = Counter()
def Counter():
count = 0
def increment():
nonlocal count
count += 1
return count
return increment
counter = Counter()
class Counter:
def __init__(self):
self.count = 0
def __call__(self):
self.count += 1
return self.count
counter = Counter()
import numpy as np
x_train = np.array([[-40.], [-30], [-20], [-10], [0], [10], [20], [30], [40]])/100
y_train = np.array([31.28, 31.46, 31.64, 31.82, 32., 32.18, 32.36, 32.54, 32.72])
def forward(w, x, b): return np.float(w*x+b)
def backward(x, y, pred, dw, db):
dw = dw + (-2)*x*(y-pred)
db = db + (-2)*(y-pred)