Skip to content

Instantly share code, notes, and snippets.

View 0xm0's full-sized avatar
🍿

Mo Hassan 0xm0

🍿
View GitHub Profile
@0xm0
0xm0 / Activate_Windows_11_Pro_free.md
Created January 19, 2024 12:51 — forked from kimgiftww/Activate_Windows_11_Pro_free.md
Activate Windows 11 Pro free

An guide how to activate Windows 11 Pro for free

Why?

Because you will get some more features like an Bitlocker and host your device as an External Desktop which can be accessed through the internet

Am i also able to switch from any other edition to Pro?

The answer is yes! You can switch from almost any edition to Pro completely for free!

Note for users with unactivated Pro edition

People which already have Pro, but not activated, can skip to this step.

Getting started

What you first need to do is open CMD (Command Prompt) as Administrator using this keyboard key:

@0xm0
0xm0 / README.m
Created January 21, 2022 02:54
output terminal to text file
|| visible in terminal || visible in file || existing
Syntax || StdOut | StdErr || StdOut | StdErr || file
==========++==========+==========++==========+==========++===========
> || no | yes || yes | no || overwrite
>> || no | yes || yes | no || append
|| | || | ||
2> || yes | no || no | yes || overwrite
2>> || yes | no || no | yes || append
|| | || | ||
&> || no | no || yes | yes || overwrite
@0xm0
0xm0 / py.md
Created November 21, 2021 14:02
Python3-pip has no installation candidate error on install

Run

sudo nano /etc/apt/sources.list And add these lines.

deb http://archive.ubuntu.com/ubuntu bionic main universe
deb http://archive.ubuntu.com/ubuntu bionic-security main universe 
deb http://archive.ubuntu.com/ubuntu bionic-updates main universe

Press Ctrl+O to save the file. Press Ctrl+X to quit nano.

@0xm0
0xm0 / test.ps1
Created November 10, 2021 16:14
Fix ps1 cannot be loaded is not digitally signed. You cannot run this script on the current system.
# Getting an error like this?
# ps1 cannot be loaded is not digitally signed. You cannot run this script on the current system.
# For more information about running scripts and setting
# execution policy, see about_Execution_Policies at
# https:/go.microsoft.com/fwlink/?LinkID=135170.
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
@0xm0
0xm0 / post_install.sh
Created April 12, 2021 07:18
Ubuntu post installation script for installing software of your choice
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
else
#Update and Upgrade
echo "Updating and Upgrading"
apt-get update && sudo apt-get upgrade -y
@0xm0
0xm0 / PSTrack.ps1
Created March 28, 2021 08:06
Covert Physical Tracking POC
$GoogleAPIKey = "Put your Google Geocoding API key between the quotes here"
Add-Type -AssemblyName System.Device
$GeoCoords = New-Object System.Device.Location.GeoCoordinateWatcher
$GeoCoords.Start()
while (($GeoCoords.Status -ne 'Ready') -and ($GeoCoords.Permission -ne 'Denied')) {
Start-Sleep -m 100
}
@0xm0
0xm0 / gist:3253768836e93f4975d09360bd5d088a
Created March 28, 2021 08:06
PowerShell one-liners to disable/enable PnP keyboard
#Disable
(Get-PnpDevice | ? { $_.Class -eq 'Keyboard' } | % { $_ | Disable-PnpDevice }
#Enable
(Get-PnpDevice | ? { $_.Class -eq 'Keyboard' } | % { $_ | Enable-PnpDevice }
@0xm0
0xm0 / build-client.sh
Created March 28, 2021 08:01
Simple client server chat using C
#!/bin/bash
g++ client.cc -std=c++14 -march=native -o client
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <sys/ipc.h>
#include <sys/mman.h>
#include <sys/msg.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
// conversion utilities
conva = new ArrayBuffer(8);
convi = new Uint32Array(conva);
convf = new Float64Array(conva);
function unpack(d) {
convf[0] = d;
return (BigInt(convi[1]) << 32n) + BigInt(convi[0]);
}