Skip to content

Instantly share code, notes, and snippets.

import cv2
import face_recognition
import os
import time
import ctypes
from datetime import datetime
#pip install opencv-python face-recognition
def enroll_owner():
"""
ads.facebook.com
an.facebook.com
pixel.facebook.com
<#
Author : Nitish Kumar
Produces GPO inventory report
version 1.0 | 01/09/2023 Initial version
Disclaimer: This script is designed to only read data from the domain and should not cause any problems or change configurations but author do not claim to be responsible for any issues. Do due dilligence before running in the production environment
#>
Import-Module ActiveDirectory
#Check BitLocker prerequisites
$TPMNotEnabled = Get-WmiObject win32_tpm -Namespace root\cimv2\security\microsofttpm | where {$_.IsEnabled_InitialValue -eq $false} -ErrorAction SilentlyContinue
$TPMEnabled = Get-WmiObject win32_tpm -Namespace root\cimv2\security\microsofttpm | where {$_.IsEnabled_InitialValue -eq $true} -ErrorAction SilentlyContinue
$WindowsVer = Get-WmiObject -Query 'select * from Win32_OperatingSystem where (Version like "6.2%" or Version like "6.3%" or Version like "10.0%") and ProductType = "1"' -ErrorAction SilentlyContinue
$BitLockerReadyDrive = Get-BitLockerVolume -MountPoint $env:SystemDrive -ErrorAction SilentlyContinue
$BitLockerDecrypted = Get-BitLockerVolume -MountPoint $env:SystemDrive | where {$_.VolumeStatus -eq "FullyDecrypted"} -ErrorAction SilentlyContinue
$BLVS = Get-BitLockerVolume | Where-Object {$_.KeyProtector | Where-Object {$_.KeyProtectorType -eq 'RecoveryPassword'}} -ErrorAction SilentlyContinue
#Step 1 - Check if TPM is enabled and initialise if required
@NL647
NL647 / AWX_Building_Custom_EE.md
Created August 29, 2024 02:56 — forked from CaptainStealthy/AWX_Building_Custom_EE.md
Ansible/AWX - Building a custom execution environment for Windows server management using ansible-builder v3

TL;DR

Need to build a custom EE for AWX? I needed to do it for managing Windows hosts, but if you need any extra Python modules or Ansible collections, check out the other file snippets.

Build Steps

Environment Setup

Install Python 3 (3.12 is latest as of this writing)

{
"pairs": [
"1000000MOG/USDT:USDT",
"10000LADYS/USDT:USDT",
"10000WEN/USDT:USDT",
"1000BONK/USDT:USDT",
"1000FLOKI/USDT:USDT",
"1000PEPE/USDT:USDT",
"1000TURBO/USDT:USDT",
"AGI/USDT:USDT",
anyio==3.7.0
click==8.1.3
et-xmlfile==1.1.0
exceptiongroup==1.1.1
fastapi==0.98.0
h11==0.14.0
idna==3.4
Jinja2==3.1.2
MarkupSafe==2.1.3
numpy==1.25.0
@NL647
NL647 / AdbCommands
Created April 15, 2024 17:52 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@NL647
NL647 / nodejs-ubuntu-bind-port-80.md
Created January 10, 2024 22:47 — forked from drawveloper/nodejs-ubuntu-bind-port-80.md
Allow Node.js to bind to privileged ports without root access on Ubuntu

How to: Allow Node to bind to port 80 without sudo

TL;DR

Only do this if you understand the consequences: all node programs will be able to bind on ports < 1024

sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/node

Important: your node location may vary. Use which node to find it, or use it directly in the command:

@NL647
NL647 / transfer_files.yml
Created December 14, 2023 19:49
Ansible zip & send
---
- name: Zip and transfer files from Windows servers to Linux server
hosts: windows
gather_facts: no
tasks:
- name: Zip contents of folders A and B
win_shell: |
$zipFile = "$env:COMPUTERNAME.zip"
Compress-Archive -Path C:\path\to\folderA, C:\path\to\folderB -DestinationPath C:\path\to\temp\$zipFile