Skip to content

Instantly share code, notes, and snippets.

@x011
x011 / ws-cli.php
Created November 12, 2017 13:03 — forked from ikwattro/ws-cli.php
php: simple websocket client
<?php
/*
based on: http://stackoverflow.com/questions/7160899/websocket-client-in-php/16608429#16608429
FIRST EXEC PYTHON SCRIPT TO GET HEADERS
*/
$ws = new ws(array
(
'host' => '127.0.0.1',
'port' => 8080,
@x011
x011 / LetsEncrypt.md
Created February 21, 2018 10:35 — forked from davestevens/LetsEncrypt.md
Let’s Encrypt setup for Apache, NGINX & Node.js

Let's Encrypt

Examples of getting certificates from Let's Encrypt working on Apache, NGINX and Node.js servers.

Obtain certificates

I chose to use the manual method, you have to make a file available to verify you own the domain. Follow the commands from running

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
@x011
x011 / .block
Created May 7, 2018 02:58 — forked from mbostock/.block
GeoJSON in Three.js
license: gpl-3.0
height: 960
border: no
# Make sure less secure apps access is enabled on your gmail account.
# https://support.google.com/accounts/answer/6010255?hl=en
def gmail_checker(username,password):
import imaplib
i=imaplib.IMAP4_SSL('imap.gmail.com')
try:
i.login(username,password)
if i.welcome and "OK Gimap" in i.welcome :
return True
@x011
x011 / Google_IP_Addresses.txt
Created October 8, 2018 10:09
List of Google ip addresses - Feel free to contribute if you find new ip's operated by google.
1.0.0.0/24
1.1.1.0/24
1.2.3.0/24
8.6.48.0/21
8.8.8.0/24
8.35.192.0/21
8.35.200.0/21
8.34.216.0/21
8.34.208.0/21
23.236.48.0/20
@x011
x011 / libssh_server_fingerprints.md
Created October 30, 2018 17:05 — forked from 0x4D31/libssh_server_fingerprints.md
An analysis of Censys Public Scan 20180807 (only port 22) to estimate the number of servers {potentially} vulnerable to the recent Libssh bug
<?php
/**
* User: x
* Project: stack
* Time: 13-Nov-18 03:16
*/
/* set a default timezone? */
date_default_timezone_set("America/New_York");
$fromDateTime = new DateTime('2018-11-13 03:00:00'); # Y-m-d H:i:s
$toDateTime = new DateTime('2018-11-13 19:59:00');
@x011
x011 / python_windows_monitor_on_off.py
Last active July 15, 2022 09:44
Pyhon script to turn the monitor On/Off on windows systems.
import win32gui, win32con
from time import sleep
SC_MONITORPOWER = 0xF170
win32gui.SendMessage(win32con.HWND_BROADCAST, win32con.WM_SYSCOMMAND, SC_MONITORPOWER, 2) # Off
sleep(2)
win32gui.SendMessage(win32con.HWND_BROADCAST, win32con.WM_SYSCOMMAND, SC_MONITORPOWER, -1) # On
@x011
x011 / README.md
Created November 27, 2018 20:58 — forked from magnetikonline/README.md
NSSM - the Non-Sucking Service Manager cheatsheet.
@x011
x011 / windows10_processes_to_json.py
Last active November 28, 2018 00:29
Small python3 script to dump all running processes and properties to a json object
'''
Author: The famous unknown
Date: 20181127
Description: Small python3 script to dump all running processes and properties to a json object.
OS: Windows
Python Version: Python3
Uses: wmi.WMI().Win32_Process() # https://docs.microsoft.com/en-us/windows/desktop/cimwin32prov/win32-process
'''
import json, wmi