Skip to content

Instantly share code, notes, and snippets.

View tahaghafuri's full-sized avatar
👨‍💻
Coding

Taha Amin Ghafuri [T@G] tahaghafuri

👨‍💻
Coding
View GitHub Profile
@adryanev
adryanev / host
Last active July 14, 2022 08:22
Plesk Trial License Update Automation
A00100-HS8A06-WV4P70-53M275-8RRN21
@amirmojiry
amirmojiry / Convert like-Persian characters to Persian characters
Last active September 29, 2024 11:06
A PHP function for convert like-Persian characters to Persian characters
<?php
function convert_non_persian_chars_to_persian ($str) {
//main goal: arabic chars: from ؀ U+0600 (&#1536;) to ۿ U+06FF (&#1791;)
//source: https://unicode-table.com/en
$right_chars = array (
'ا',
'ب',
'پ',
'ت',
'ث',
@fabiogomezdiaz
fabiogomezdiaz / ubuntu_enable_root_ssh.sh
Created July 6, 2018 19:13
Ubuntu: Enable ssh root login
#!/bin/bash
# Become root
sudo su
# Create root password
passwd
# Install java and ssh
apt-get update
apt-get install -y openssh-server
@nigrosimone
nigrosimone / DiskCache.php
Last active May 7, 2023 16:18
Simple php cache using php generated files and opcache
<?php
/**
* Simple php cache using php generated files and opcache
* Usage:
* $diskCache = new DiskCache();
* $diskCache->write('foo', 'bar');
* echo $diskCache->read('foo'); // print bar
*/
class DiskCache {
HEXRAYS_LICENSE 6.8
USER Giancarlo Russo, HT Srl
EMAIL [email protected]
ISSUED_ON 2015-05-25 18:07:13
LICENSE_ID PRODUCT # SUPPORT EXPIRES DESCRIPTION
--------------- -------- -- ---------- --------- -----------------------------
48-3255-7514-28 IDAPRONW 1 2016-04-08 Never IDA Professional Named License (Windows)
48-B055-7514-8E IDAPRONM 1 2016-04-08 Never IDA Professional Named License (Mac)
@sergeyklay
sergeyklay / CMakeLists.txt
Last active December 30, 2024 16:37
CMakeLists.txt for PHP-extension. This CMake file is just for syntax highlighting in CLion.
cmake_minimum_required(VERSION 3.5)
project(extname
VERSION 1.0.0
LANGUAGES C)
message(STATUS "Begin cmaking of PHP extension ...")
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING
@zb3
zb3 / deobf.php
Last active November 28, 2022 17:30
PHP deobfuscation utils
<?php
/*
note this is not "correct"
it was made to deobfuscate particular obfuscated files
"proper" tool should probably operate on AST to properly parse the file
but even that's not enough - you can't assume things we do here
*/
function unwrap_hexstr_literals($src) //currently only \xHH and \nnn supported
Written by Thanos Apostolou
http://askubuntu.com/questions/53822/how-do-you-run-ubuntu-server-with-a-gui
Some more info can be found here https://help.ubuntu.com/community/ServerGUI. I assume you start with a clean install of Ubuntu Server 16.04 (some modifications may be needed for older versions of Ubuntu). Depending on your needs you can do these:
Minimal GUI:
sudo apt install xorg
sudo apt install --no-install-recommends openbox
Run the command startx and openbox will start (you can open a terminal there and run any application you want)
@herrcore
herrcore / vawtrak_string_decoder.py
Last active May 10, 2023 12:23
IDA python string decoder for Vawtrak 930eccf4bedcd5e0901306410787adc6a95acd957a7383d326d9949c76fcc828
import idaapi, idc, idautils
import re
import struct
import base64
flag_arr=[]
def decrypt_algo(key, data, data_len):
out=""
for i in range(0, data_len):
@Amar-Chaudhari
Amar-Chaudhari / Readme.md
Last active May 26, 2023 15:55
How To Compile And Install PHP Extensions From Source

If you have already compiled and installed PHP and need to install more extension, I will show you a quick-n-dirty way of installing and compiling your desired extension without re-compiling everything

Download & unzip the PHP5 source code

cd /tmp
wget -O php-5.6.22.tar.gz http://pl1.php.net/get/php-5.6.22.tar.gz/from/this/mirror
tar -zxvf php-5.6.22.tar.gz
cd php-5.6.22