Skip to content

Instantly share code, notes, and snippets.

View VIRUXE's full-sized avatar

Flávio Pereira VIRUXE

  • United Kingdom
View GitHub Profile
@VIRUXE
VIRUXE / vehicleInfo-pt-br.full.json
Created May 9, 2024 08:24
Full GTAV vehicle info, extracted from the game, with pt-BR labels (January 2023)
This file has been truncated, but you can view the full file.
{
"1032823388": {
"hash": 1032823388,
"name": "ninef",
"displayName": "NINEF",
"localizedName": "9F",
"manufacturerName": "OBEY",
"localizedManufacturer": "Obey",
"vehicleClass": 6,
"vehicleClassName": "VEH_CLASS_6",
@VIRUXE
VIRUXE / IMG.py
Last active May 14, 2024 22:33
Python class to handle IMG archives from old GTA games - not sure I finished or even tested it
import struct
from utils import *
class IMGArchive:
sectorsize = 2048
headersize = 8
dentrysize = 32
def __init__(self, filepath, callback=None):
self.filestream = open(filepath, 'rb')
@VIRUXE
VIRUXE / vehicles.json
Created May 9, 2024 07:35
GTAV Vehicle Labels in Portuguese, using their internal name as keys. Organized by their respective categories.
{
"AMPHIBIOUS_QUADBIKE": {
"OFF_ROAD": {
"blazer5": "Blazer Aqua"
}
},
"SUBMARINECAR": {
"SPORT_CLASSIC": {
"stromberg": "Stromberg",
"toreador" : "Toreador"
@VIRUXE
VIRUXE / ac.pwn
Created May 7, 2024 00:41
Anti-cheat socket connection code for Scavenge and Survive
/*
AC client connects to GS through socket
Server stores IP and username in buffer
OnPlayerConnect -> check name/IP is in buffer
if so: query that IP for AC, get hardware info
Player = an in-game player who is connected to the game server
Client = anti-cheat client application connected to the server
*/
dpkg --add-architecture i386
apt update
https://stackoverflow.com/questions/61590804/how-to-install-gcc-9-on-debianlatest-docker
apt-get install libuuid1:i386
apt-get install libstdc++6:i386
uuid-dev:i386
@VIRUXE
VIRUXE / gpci.go
Created May 6, 2024 23:04
SA-MP's GPCI function implementation in GO and PHP
// https://github.com/Renegade334/gpci-js/blob/master/src/index.ts
package main
import (
"crypto/sha1"
"encoding/binary"
"encoding/hex"
"fmt"
"os/user"
@VIRUXE
VIRUXE / bot.php
Created May 6, 2024 17:06
Simple utility Discord bot, ran on DiscordPHP
<?php
use Discord\Discord;
use Discord\Parts\Channel\Message;
use Psr\Http\Message\ResponseInterface;
use React\EventLoop\Factory;
require __DIR__ . '/vendor/autoload.php';
$discord = new Discord([
'token' => 'ODUxMDU1Njc5OTgwNTY4NTc2.YLytXQ.vXIhW7iCr7ClrTGj2mjcTrqQHBQ', // Big Smoke
@VIRUXE
VIRUXE / walkshake.lua
Last active April 30, 2024 17:38
Add vibration to walking and vehicle burnouts in FiveM (GTA V)
CreateThread(function()
local isShaking = false
while true do
local playerPed = PlayerPedId()
local inVehicle = IsPedInAnyVehicle(playerPed, false)
-- Intense burnout vibration
if inVehicle and IsVehicleInBurnout(GetVehiclePedIsIn(playerPed, false)) then
if not isShaking then
@VIRUXE
VIRUXE / server_log.py
Last active January 16, 2023 22:24
Parse a SA-MP (San Andreas Multiplayer) Scavenge and Survive server log and make it all gay with colours, while viewing it live.
import os
import time
class Colors:
BLACK = "\033[0;30m"
RED = "\033[0;31m"
GREEN = "\033[0;32m"
YELLOW = "\033[0;33m"
BLUE = "\033[0;34m"
MAGENTA = "\033[0;35m"
@VIRUXE
VIRUXE / samplayers.py
Created January 16, 2023 09:22
Query a SA-MP (San Andreas Multiplayer) server to get info on who joins and leaves
import sys
import time
from samp_client.client import SampClient # pip install samp-client
server = sys.argv[1].split(':')
players = []
with SampClient(server[0], int(server[1])) as client:
max_players = client.get_server_info().max_players