Skip to content

Instantly share code, notes, and snippets.

View zyuzuguldu's full-sized avatar
πŸ›°οΈ
Hijacking

zahid zyuzuguldu

πŸ›°οΈ
Hijacking
View GitHub Profile
@zyuzuguldu
zyuzuguldu / CleanRepo.md
Created June 8, 2024 06:31 — forked from fschiettecatte/CleanRepo.md
Removing all traces of a file from a GIT repository

Removing all traces of a file from a GIT repository

I recently had to remove all traces of a file from a GIT repository.

First clone the repository:

git clone ssh://[email protected]/home/repositories/codebase codebase

@zyuzuguldu
zyuzuguldu / compare_gbm_rmses.py
Created June 6, 2024 16:54 — forked from tomonori-masui/compare_gbm_rmses.py
Comparing custom GBM's RMSE to sklearn's
from sklearn.ensemble import GradientBoostingRegressor
from sklearn.metrics import mean_squared_error
custom_gbm = CustomGradientBoostingRegressor(
n_estimators=20,
learning_rate=0.1,
max_depth=1
)
custom_gbm.fit(x, y)
custom_gbm_rmse = mean_squared_error(y, custom_gbm.predict(x), squared=False)
@zyuzuguldu
zyuzuguldu / custom_gbrt.py
Created June 6, 2024 16:54 — forked from tomonori-masui/custom_gbrt.py
CustomGradientBoostingRegressor
class CustomGradientBoostingRegressor:
def __init__(self, learning_rate, n_estimators, max_depth=1):
self.learning_rate = learning_rate
self.n_estimators = n_estimators
self.max_depth = max_depth
self.trees = []
def fit(self, X, y):
@zyuzuguldu
zyuzuguldu / pcap2wav
Created December 15, 2019 18:16 — forked from jayluxferro/pcap2wav
Convert raw PCAP files into a .wav file
#!/bin/bash
#
# pcap2wav
# Original Author: Michael Collins <[email protected]>
#Standard disclaimer: batteries not included, your mileage may vary...
# Updated by Avi Marcus <[email protected]>
#
# Accepts arg of pcap file w/only 2 RTP streams
# Creates a .<codec> file and a .wav file
# For codecs other than PCMA and PCMU the script calls fs_cli and does a little recording to create the wav file(s)
@zyuzuguldu
zyuzuguldu / reclaimWindows10.ps1
Created April 20, 2019 15:10 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <[email protected]>
# Modified by: alirobe <[email protected]> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@zyuzuguldu
zyuzuguldu / windows_hardening.cmd
Created April 20, 2019 15:05 — forked from jaredhaight/windows_hardening.cmd
Script to perform some hardening of Windows OS.
::
::#######################################################################
::
:: Change file associations to protect against common ransomware attacks
:: Note that if you legitimately use these extensions, like .bat, you will now need to execute them manually from cmd or powershell
:: Alternatively, you can right-click on them and hit 'Run as Administrator' but ensure it's a script you want to run :)
:: ---------------------
ftype htafile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
ftype WSHFile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
ftype batfile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"

Faking DNS from userland

To give false DNS responses from userland we need to handle different type of syscalls : gethostbyname(), gethostbyname2(), getaddrinfo(), getnameinfo(), etc. To cover all these cases, and to prevent leaks to real dns servers, we will use two libraries : libresolv_wrapper and libnss_wrapper.

Installation

Install resolv_wrapper and nss_wrapper, either from sources or from your favorite Linux distribution.

@zyuzuguldu
zyuzuguldu / gist:57d48f97d1e8a025689e76720d5d9abb
Created November 12, 2018 19:09
TP-LINK T4U linux (debian) install
#!/bin/bash
wget https://github.com/abperiasamy/rtl8812AU_8821AU_linux/archive/master.zip
unzip rtl8812AU_8821AU_linux-master.zip -x rtl8812AU_8821AU_linux-master
cd rtl8812AU_8821AU_linux-master
make
sudo make install
sudo modprobe rtl8812au
sudo apt-get update
sudo apt-get install dkms
sudo cp -R . /usr/src/rtl8812AU_8821AU_linux-1.0
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
*** Initial setup before Ambari setup ***
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
OS checks:
yum install wget
@zyuzuguldu
zyuzuguldu / RELK.sh
Created April 19, 2017 08:46 — forked from adionditsak/RELK.sh
Install the ELK stack (with Redis) with one script for the central log server (CentOS 6.5).
#/bin/bash
##########################################################
### INTRODUCTION
##########################################################
: '
Install and configure R (Redis) + ELK server from scratch on CentOS 6.5.
* Logstash version 1.4.2
* Elasticsearch version 1.3.2