Skip to content

Instantly share code, notes, and snippets.

View c0rp3n's full-sized avatar
🐲
Here be Dragons ...

Oliver John Hitchcock c0rp3n

🐲
Here be Dragons ...
View GitHub Profile
@c0rp3n
c0rp3n / README.md
Created July 28, 2020 13:22
Sourcemod plugin compiling VSCode
@c0rp3n
c0rp3n / struct-member-meta-programming.cpp
Last active March 24, 2020 09:26
Struct member meta programming
// I devoloped this method whilst finding a way to nicely abstract binding a struct
// to a SQL statement for my SQLite wrapper
// final function to perform the addition on each member
template<class T, class M>
void add2_member(T& value, M member)
{
value.*member += 2;
}
@c0rp3n
c0rp3n / update-sm.sh
Created July 8, 2019 14:11
A short script to pull and download the sripting files for Sourcemod.
# Sourcemod Updater
sourcemodmversion="1.10"
sourcemodscrapeurl="https://sm.alliedmods.net/smdrop/${sourcemodmversion}/sourcemod-latest-linux"
sourcemodlatestfile="$(wget "${sourcemodscrapeurl}" -q -O -)"
sourcemoddownloadurl="https://www.sourcemod.net/latest.php?os=linux&version=${sourcemodmversion}"
curlpath=$(command -v curl 2>/dev/null)
curlcmd=$(${curlpath} --progress-bar --fail -L -o "sourcemod.tar.gz" "${sourcemoddownloadurl}")
tar xvsf sourcemod.tar.gz addons/sourcemod/scripting
@c0rp3n
c0rp3n / csgo-in-plain-sight.md
Last active April 2, 2019 17:34
CS:GO Cheating Server sided in plain sight.

CS:GO Cheating in plain sight

So this gist should explain the techniques behind the cheating scandal in TGL through the use of recompiled server side sourcemod plugins as to avoid suspition and detection.

The brief concept was they recompiled a default plugin present on most servers thus to avoid anyone seeing any out of place files, in this case it was nextmap, so then presumably they added too or replaced the existing command in this plugin due to the plugin being opensouece and freely availible at nextmap.sp

Adding a new command

So to go into further depth, there are two approaches they could have taken the first would be adding a new console command here and the second would be too add code to the commands callback being the function Command_List as listmaps is not a admin command.

@c0rp3n
c0rp3n / conversion-recursion.pl
Last active February 19, 2019 14:30
AI Workshop 4 - Assignment
mins_to_hours_and_mins(InM, OutH, OutM):-
InM < 60,
OutH is 0,
OutM is InM.
mins_to_hours_and_mins(InM, OutH, OutM):-
InM >= 60,
NewInM is InM - 60,
mins_to_hours_and_mins(NewInM, NewOutH, OutM),
OutH is NewOutH + 1.
@c0rp3n
c0rp3n / car-filtering.pl
Created February 5, 2019 13:56
AI Workshop 2
car(ford,fiesta,popular,uk,950,hatchback,5300).
car(ford,orion,gl,uk,1300,saloon,7800).
car(ford,orion,gl,uk,1600,saloon,8600).
car(ford,orion,ghia,uk,1600,saloon,9500).
car(fiat,uno,55,italy,950,hatchback,5200).
car(fiat,uno,70,italy,1050,hatchback,6500).
car(rover,metro,city,uk,1000,hatchback,4900).
car(rover,metro,mg,uk,1300,hatchback,5700).
supplier(ford,uk,'21 Tinsgate, Dagenham','081 233 4821').
supplier(rover,uk,'18 Beadle Road, Cowley','0325 24112').
@c0rp3n
c0rp3n / sdcalc.cpp
Created September 26, 2018 10:53
Workshop activity for C++, Calculate the Standard Deviation for inputted numbers. Extended to use random numbers for testing.
#include <iostream>
#include <string>
#include <corecrt_math.h>
#include <random>
#include <vector>
#define SD_INPUT_COUNT 10
#define SD_USE_RANDOM
#include <iostream>
#define MAX_DEVISIONS 16
int main()
{
std::cout << "Dynamic Cicle Creator." << std::endl;
int beamCount, beamGap, circumference, divisions, divisionSize;
int sectionStartingPoints[MAX_DEVISIONS];
@c0rp3n
c0rp3n / circularItterTest.cpp
Created August 15, 2018 22:20
Just a testing for itterate arround a circle orr circular array.
//============================================================================
// Name : circularItterTest.cpp
// Author : c0rp3n
// Version : 1.0.0
// Copyright : GPLv3
// Description : A quad circular itterator program.
//============================================================================
#include <iostream>
using namespace std;
@c0rp3n
c0rp3n / README.md
Created November 28, 2017 19:45
JQuery dynamic loading for a title page for a blog or other content.

JQuery dynamic loading for a title page for a blog or other content, this approach allows me to not have repeated and data and code for each blog post. This is just a simple implementation a more complicated one may be included later.