Skip to content

Instantly share code, notes, and snippets.

View cdprf's full-sized avatar
🎯
Focusing

Yunus Emre YUCE cdprf

🎯
Focusing
View GitHub Profile
@cdprf
cdprf / eventlogwatcher.cs
Last active April 20, 2023 00:49
eventlog watcher #Windows #eventlogs #notify
using System;
using System.Diagnostics;
using System.Diagnostics.Eventing.Reader;
using System.Threading;
using System.Windows.Forms;
using System.Drawing;
namespace AdministrativeEventWatcher
{
class Program
#!/bin/bash
#
# Author: Yunus Emre
# Date: 2023-04-07
# Description: This script attempts to repair an ext2/ext3/ext4 filesystem using backup superblocks.
# you can get possible backup of superblock list with this command. good luck
# sudo mke2fs -n /dev/sdc
# Superblock backups stored on blocks:
# 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
# 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@cdprf
cdprf / IP to Country Code
Created January 28, 2023 21:24
function to getting ip from ip_lookup table
CREATE DEFINER=`emre`@`%` FUNCTION `IPN2COUNTRY`(IPN bigint) RETURNS varchar(2) CHARSET utf8
DETERMINISTIC
BEGIN
DECLARE SEHIR VARCHAR(2);
select country into SEHIR from dbip_lookup where startip <= `IPN` and endip >= `IPN` ;
RETURN SEHIR;
END
@cdprf
cdprf / INSERT_ALL_IP_to_Mysql
Created January 28, 2023 21:22
Mysql loop to fill table with ip address Just for testing server capabilities
CREATE DEFINER=`emre`@`%` PROCEDURE `INSERT_ALL_IP`()
BEGIN
DECLARE v_ipt varchar(16) DEFAULT "0.0.0.1";
DECLARE done INT DEFAULT 0;
DECLARE v_ip BIGINT(11) DEFAULT 1;
DECLARE CURS CURSOR FOR SELECT DISTINCT(DOMAIN_IP_CONTRY.IP) as IPT, INET_ATON(DOMAIN_IP_CONTRY.IP) AS IP FROM DOMAIN_IP_CONTRY;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
OPEN CURS;
@cdprf
cdprf / GoogleDorking.md
Created November 27, 2022 01:34 — forked from ikuamike/GoogleDorking.md
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
<?xml version="1.0" encoding="utf-8"?>
<Apps>
<App DisplayName="[HTTP] Dell OpenManage [1311]" FileName="iexplore" Arguments="http://%Hostname%:1311" WaitForExit="False" TryToIntegrate="False" />
<App DisplayName="[HTTP] HP HomePage [2381]" FileName="iexplore" Arguments="http://%Hostname%:2381" WaitForExit="False" TryToIntegrate="False" />
<App DisplayName="[HTTP] ILO" FileName="iexplore" Arguments="http://ilo-%Hostname%" WaitForExit="False" TryToIntegrate="False" />
<App DisplayName="[HTTP] Localhost" FileName="iexplore" Arguments="http://%hostname%" WaitForExit="False" TryToIntegrate="False" />
<App DisplayName="[MSC] Compmgmt" FileName="compmgmt.msc" Arguments="/computer:%hostname%" WaitForExit="False" TryToIntegrate="False" />
<App DisplayName="[MSC] EventViewer" FileName="eventvwr" Arguments="%hostname%" WaitForExit="False" TryToIntegrate="False" />
<App DisplayName="[MSC] Services" FileName="services.msc" Arguments="/computer:%hostname%" WaitForExit="False" TryToIntegrate="Fa
#!/bin/bash
#dirsearchem
#$1 box name
#$2 URL (check for Domain, HTTPS, port first)
clear
date
echo "Running dirsearch on $1 $2"
@cdprf
cdprf / AdbCommands
Created September 4, 2022 23:29 — forked from nani1337/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
§ curl "william:password@localhost:9080/login"
Login failed
By exploiting the LDAP injection, we bypass the LDAP filter constraint and are successfully signed in:
$ curl "william))(&(abc=:password@localhost:9080/login"
WSPrincipal:uid=william,cn=users,dc=my-company,dc=com