Skip to content

Instantly share code, notes, and snippets.

View gjyoung1974's full-sized avatar
🎯
Focusing

Gordon Young gjyoung1974

🎯
Focusing
View GitHub Profile
@tckz
tckz / registry.js
Created June 30, 2009 09:36
jscriptでレジストリ参照(リモート可)
var Registry = function () {
this.initialize.apply(this, arguments);
};
Registry.prototype = {
initialize: function(computer) {
var locator = new ActiveXObject("WbemScripting.SWbemLocator");
var server = locator.ConnectServer(computer, "root\\default");
this.stdregprov = server.Get("StdRegProv");
namespace JoeKingry
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
class Program
{
static void Main(string[] args)
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@akirad
akirad / Snmpwalk.java
Last active June 11, 2019 08:57
An example of snmpwalk by java. It needs snmp4j. [Compile] javac -cp <path to a snmp4j.jar> Snmpwalk.java [Execute] java -cp <path to a snmp4j.jar>;. Snmpwalk If there is not the current dir in the path of -cp, java can't find Snmpwalk class...
import java.io.IOException;
import java.util.List;
import org.snmp4j.CommunityTarget;
import org.snmp4j.Snmp;
import org.snmp4j.TransportMapping;
import org.snmp4j.mp.SnmpConstants;
import org.snmp4j.smi.Address;
import org.snmp4j.smi.GenericAddress;
import org.snmp4j.smi.OID;
import org.snmp4j.smi.OctetString;
@bzerangue
bzerangue / macs-on-active-directory.md
Last active October 12, 2023 21:07
Binding and Unbinding to Active Directory from Mac OS via Command Line

Binding and Unbinding to Active Directory from Mac OS via Command Line

  • Open the Terminal Application
  • Type in sudo -i and type in your Mac Administrator account password. sudo gives you root level or administrator level privileges.

To View current Active Directory Settings

dsconfigad -show

To Unbind a Computer from an Active Directory Domain

@jdennes
jdennes / Gemfile
Last active September 22, 2022 16:31
Export a list of members from a GitHub organisation
source "https://rubygems.org"
gem "octokit"
@jesusprubio
jesusprubio / gist:8f092af4ca252e252eab
Last active April 12, 2023 15:02
Proposal: A Node.js penetration test framework

Proposal: Node.js penetration test framework

Hi guys! Since I started to write Bluebox-ng I've been tracking the different security projects I found written in Node.js. Now we've published the first stable version we think it's the right moment to speak among us (and, of course, everyone interested in it :).

Why?

  • I think we're rewriting the same stuff in our respective projects again and again. For example, almost any tool supports IPv6 because the functions we need are still not present in the Node core and the libraries I found (IMHO) were not enough.
  • There're different projects implementing exactly the same thing, ie: port scanners.
  • We're working in a too new environment, so we need to make it together.
@SidShetye
SidShetye / HardenSSL.ps1
Last active August 14, 2023 14:59
Script to harden SSL/TLS on Azure Cloud Service
# Call this from inside a startup task/batch file as shown in the next two lines (minus the '# ')
# PowerShell -ExecutionPolicy Unrestricted .\HardenSsl.ps1 >> log-HardenSsl.txt 2>&1
# EXIT /B 0
# Credits:
# http://azure.microsoft.com/blog/2014/10/19/how-to-disable-ssl-3-0-in-azure-websites-roles-and-virtual-machines/
# http://lukieb.blogspot.com/2014/11/tightening-up-your-azure-cloud-service.html
$nl = [Environment]::NewLine
$regkeys = @(
@sumeetpareek
sumeetpareek / packer-aws-ami-template.json
Last active December 21, 2021 15:46
packer template to create aws ami using ansible provisioner
{
"variables": {
"aws_access_key": "", // This helps me connect to AWS
"aws_secret_key": ""
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-east-1",
@mahmoudimus
mahmoudimus / doit.sh
Last active February 4, 2023 09:02
intellij remote development with nomachine on ec2 ubuntu
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
add-apt-repository -y ppa:webupd8team/java
apt-get -qq update
apt-get install -y oracle-java8-installer xfce4 xvfb
wget http://download.nomachine.com/download/4.6/Linux/nomachine_4.6.4_13_amd64.deb
dpkg -i nomachine_4.6.4_13_amd64.deb
echo 'DefaultDesktopCommand "/usr/bin/X11/startxfce4"' >> /usr/NX/etc/server.cfg
echo "PhysicalDesktopAuthorization 0" >> /usr/NX/etc/server.cfg
echo "VirtualDesktopAuthorization 0" >> /usr/NX/etc/server.cfg
COOKIE=`ps -ef | md5sum | cut -f 1 -d " "`