Skip to content

Instantly share code, notes, and snippets.

@lewiwiii
lewiwiii / network_listener.py
Created May 7, 2024 19:16
[W.I.P.] Python script using scapy that will automatically run the PPPwn exploit every time the console sends PADI
from scapy.all import sniff, PPPoED
import threading
import subprocess
def packet_listener():
print("Starting packet listener on interface eth0...")
def handle_packet(packet):
print("Packet detected. Checking for PADI packets...")
# Check if it's a PADI packet (code 0x09 for PPPoE Discovery Initiation)
if PPPoED in packet and packet[PPPoED].code == 0x09:
@eatnumber1
eatnumber1 / renameat2.c
Last active May 7, 2024 19:23
Command-line tool to call renameat2(2)
/*
* Copyright (c) 2023 Russell Harmon
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@AmirMahdyJebreily
AmirMahdyJebreily / conventional_commit_messages.md
Last active May 7, 2024 19:23 — forked from qoomon/conventional_commit_messages.md
کامیت های مرسوم گیت | Conventional Commit Messages

کامیت های مرسوم گیت | Conventional Commit Messages

ترجمه شده از اینجا با زبان خودمونی تر که هر آدمی بفهمه (هم منی که چند ساله کار میکنم هم اونی که تازه شروع کرده)

چرا باید خوب کامیت بزنیم ؟

این که شما بخواهید در یک پروژه متن باز مشارکت داشته باشید یا اینکه یک پروژه رو با دوستانتون پیش ببرید، نیازمند یک فرمت یا قانون مشخص برای کامیت زدنه! زمانی این نیاز احساس میشه که کامیت های پروژه زیاد شدن و شما نمیدونید دقیقا توی کدوم کامیت چیکار کردید. درست کامیت زدن باعث میشه تا بتونید راحت تر تغییرات رو مدیریت و در انتها یک ریپوزیتوری خوب بسازید که همه بتونن بفهمن شما دقیقا چیکار کردید و بتونن بهتر کمک کنند !
ببین چطوری میتونی با تغییر دادن مدل کامیت زدنت، بین خودت و بقیه تفاوت ایجاد کنی. نمونه ها به شخصه استفاده از این قرارداد یا انواع دیگه ای از اینجور قرارداد ها برای کامیت زدن رو پیشنهاد میکنم. چرا که نه تنها به درد کار های شخصی و تیمی کوچیک میخوره، بلکه به درد کار های بزرگ و سازمانی هم میخورن! باعث میشه از یه جایی ب

@qoomon
qoomon / conventional_commit_messages.md
Last active May 7, 2024 19:23
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@bmaupin
bmaupin / free-database-hosting.md
Last active May 7, 2024 19:20
Free database hosting
@Krilecy
Krilecy / Synthetic Data Generation.ipynb
Last active May 7, 2024 19:20
Synthetic Data Generation for Embedding Model Fine-Tuning
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@commonsensesoftware
commonsensesoftware / DotNet4Console.csproj
Created June 9, 2022 18:27
.NET 4.0 Console using VS2022
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net40</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net40" Version="1.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
@valrotan
valrotan / mmv.zsh
Created March 8, 2024 09:35
Rename many files at once in your favorite editor (vim)
mmv()
{
OLD=/tmp/current_files
NEW=/tmp/rename_files
# get options
dry='false'
verbose='false'
while getopts 'dvh' flag; do
case "${flag}" in

PyTorch C++ API Ubuntu Installation Guide

The best way to get a clean installation of PyTorch, is to install the pre-compiled binaries from the Anaconda distribution. Therefore, we need to setup Anaconda first.

Step 1: Install Anaconda

  • Go to the download section and download your desired Anaconda version for Linux

  • Run the downloaded shell script and follow the install instruction, do
@lothbrokragnar
lothbrokragnar / mysql_migrar_privilegios_usuarios.md
Created May 7, 2024 19:05 — forked from serweb-labs/mysql_migrar_privilegios_usuarios.md
Migrar usuarios y privilegios de un servidor a otro

Los privilegios de MySQL se pueden migrar de varias formas, una de ellas es básicamente exportar e importar la base de datos “mysql” de un servidor a otro. Si no queremos sobreescribir ciertas tablas o registros, lo mejor es ceñirnos únicamente a lo que nos interesa, en este caso los usuarios, passwords y la relación de privilegios para cada una de las bases de datos y tablas del servidor MySQL.

Como he comentado, los usuarios se encuentran en la base de datos de sistema “mysql” y la tabla “user” (mysql.user). Para extraer los privilegios necesitamos dos pasos:

El primer paso consisten en extraer el lista de usuarios del sistema pero construyendo a la vez una consulta SQL para cada uno que nos permita luego extraer la información de cada uno. La consulta es la siguiente. Veis que no accedo a la shell MySQL sino que la ejecuto directamente desde línea de comandos bash para volcarlo a un fichero, esto me permite ahorrarme limpiar posteriormente el formato de tablas, etc:

$ mysql -u root -p -Bse "SELECT