nssm.exe install SERVICE_NAME "C:\path\to\exe\or\bat\file.ext" "argument1 argument2"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'); |
An analysis of Censys Public Scan 20180807 (only port 22) to estimate the number of servers {potentially} vulnerable to the recent Libssh bug.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 | |
height: 960 | |
border: no |
Examples of getting certificates from Let's Encrypt working on Apache, NGINX and Node.js servers.
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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, |