Skip to content

Instantly share code, notes, and snippets.

View labgeek's full-sized avatar

JD labgeek

  • Seattle, WA
View GitHub Profile
Retrieves all of the trust relationships for this domain - Does not Grab Forest Trusts
([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()).GetAllTrustRelationships()
Grab Forest Trusts.
([System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest()).GetAllTrustRelationships()
@labgeek
labgeek / windows_privesc
Created March 4, 2021 21:57 — forked from sckalath/windows_privesc
Windows Privilege Escalation
// What system are we connected to?
systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
// Get the hostname and username (if available)
hostname
echo %username%
// Get users
net users
net user [username]
#include <iostream>
#include <cstring>
using namespace std;
//function prototype
void solve(char[]);
int main()
{
char name[100] = { 0 };
char result;
/*****************************************************************//**
* \file hw6.c
* \brief Counts the number of words of a given length in maxRow sentences
*
* \author labgeek@gmail.com
* \date 4/10/1996
*********************************************************************/
#include <stdio.h>
#include <iostream>
#include <array>
using namespace std;
bool sumOfTwo(int a[], int b[], int v, int len1, int len2)
{
for(int i = 0; i<len1; i++)
{
int needed_value = v - a[i];
for(int j = 0; j<len2; j++){
/*
* Sort number using STL vectors
*/
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
#include <stdio.h>
#include <string.h>
int main(){
char *s;
s = malloc(1024 * sizeof(char));
scanf("%[^\n]", s);
// printf("%s", s);
char *token = strtok(s, " ");
/*
* List.cpp
*
* Created on: Jul 20, 2020
* Author: labgeek@gmail.com
*/
#include <iostream>
#include <cstdlib>
#include "List.h";
/*
* List.h
*
* Created on: Jul 20, 2020
* Author: labgeek@gmail.com
*/
#ifndef LIST_H_
#define LIST_H_
#include <stdio.h>
#include <stdlib.h>
void rArray(int *, int);
int main()
{
int num, *arr, i;
scanf("%d", &num);
arr = (int*) malloc(num * sizeof(int));
for(i = 0; i < num; i++) {