Skip to content

Instantly share code, notes, and snippets.

View z3nth10n's full-sized avatar
🏠
Working from home

Álvaro Rodríguez z3nth10n

🏠
Working from home
View GitHub Profile
<?php
if(@$_GET["debug"] !== null) {
error_reporting(E_ALL);
ini_set("display_errors", 1);
}
$url="https://api.github.com/gists/";
$dlgitlab_url=$url."425549fbcb38834e551aea7521f5b9b1";
#!/bin/bash
name="debian-9.9.0-amd64-xfce-CD-1.iso"
wget https://cdimage.debian.org/mirror/cdimage/archive/9.9.0/amd64/iso-cd/$name
@z3nth10n
z3nth10n / download_vm.sh
Last active July 23, 2019 03:19
Creates a new Debian from Internet
#!/bin/bash
name="debian-9.9.0-amd64-xfce-CD-1.iso"
mac=$(od -txC -An -N3 /dev/random|tr \ :)
cd /var/lib/vz/template/iso
wget https://cdimage.debian.org/mirror/cdimage/archive/9.9.0/amd64/iso-cd/$name
qm create 100 --cdrom nfs-iso:iso/$name --name debian-test -bootdisk scsi0 -scsi0 NVME:60,size=15G -scsihw virtio-scsi-pci --ostype l26 --memory 1024 -sockets 2 -cores 2 -cpu host -numa 1 -net0 virtio,bridge=vmbr0
qm start 100
echo -e "\e[VM created && started succesfully!"
@z3nth10n
z3nth10n / gitlab_installer.sh
Last active July 23, 2019 02:54
Installs Gitlab on a Debian (VM) as root
#!/bin/bash
apt-get update
apt-get install -y curl openssh-server ca-certificates
apt-get install -y postfix
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | bash
EXTERNAL_URL="https://$1" apt-get install gitlab-ee
echo -e "\e[32mInstalled succesfully!"

Maybe this topic isn't allowed (maybe because of the illegal or "too broad" aspect of this topic), I would try to be very concise with this because I would like to implement this with the main objective of learning "tampering/hooking" techniques.

Anyway, the question is that some time ago, I found an application that inserted two entries into the %WinDir%/etc/hosts file to cancel the advertising from Spotify.

This glitch was fixed by Spotify recently, so now any new song that has to be played is not going to be heard unless the ads are played before.

Well, the thing is that not long ago I found this repository (Spotify1710), I look at it, since I do not understand C++ a lot and well, I tried to make it works and I saw that it did not work (Spotify crashed) so I started doing the same but in C#. (Maybe I should try an older version of Spotify?, since there are several releases...)

As I have seen how this utility works, what it does is to inject a (managed)

{
"Width": 1344,
"Height": 1344,
"Nodes": [
{
"Bounds": "0, 0, 32, 32",
"Texture": {
"Source": "E:\\VISUAL STUDIO\\Visual Studio Projects\\TexturePacker\\bin\\Debug\\png\\aero_arrow.png",
"Width": 32,
"Height": 32
@z3nth10n
z3nth10n / NamedHandler.cs
Created April 3, 2019 00:42
Named Thread & Thread Marked
using System;
namespace GTAMapper.Extensions.Threading
{
public class NamedHandler<TArg>
{
public readonly Func<string, TArg> Handler;
public NamedHandler(Func<string, TArg> handler)
{
using GTAMapper.Extensions.Threading;
using System;
using System.Collections;
using UnityEngine;
namespace GTAMapper.Extensions
{
public static class BatchedCoroutines
{
public static IEnumerator BatchCoroutines(
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using UnityEngine;
namespace GTAMapper.Extensions.Threading
{
public class ConcurrentQueuedCoroutines<T>
{
@z3nth10n
z3nth10n / ThreadSafeBool.cs
Last active April 2, 2019 22:43
ThreadSafeBool
using System.Threading;
namespace GTAMapper.Extensions.Threading
{
/// <summary>
/// Thread safe enter once into a code block:
/// the first call to CheckAndSetFirstCall returns always true,
/// all subsequent call return false.
/// </summary>
public class ThreadSafeBool