Skip to content

Instantly share code, notes, and snippets.

View kriss-u's full-sized avatar

Krishna Upadhyay kriss-u

View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
// Self-referential Structure
struct listNode {
char data; // A character data in the list
struct listNode *nextPtr; // Pointer to next node
}; // end struct listNode
typedef struct listNode ListNode; // alias for the struct
@kriss-u
kriss-u / stack.c
Last active August 29, 2019 10:05
#include <stdio.h>
#include <stdlib.h>
// Self-referential structure
struct stackNode {
int data; // A integer data in the stack
struct stackNode *nextPtr; // Pointer to next element of stack
}; // end struct stackNode
typedef struct stackNode StackNode; // alias for the struct
#include <stdio.h>
#include <stdlib.h>
// Self-referential Structure
struct queueNode {
char data; // A character data in the queue
struct queueNode *nextPtr; // Pointer to next node
}; // end struct queuNode
typedef struct queueNode QueueNode; // alias for the struct
@kriss-u
kriss-u / exploit.py
Created June 12, 2021 10:42
fuel CMS <= 1.4.1 - Remote Code Execution
# Exploit Title: fuel CMS 1.4.1 - Remote Code Execution (1)
# Date: 2019-07-19
# Exploit Author: 0xd0ff9
# Vendor Homepage: https://www.getfuelcms.com/
# Software Link: https://github.com/daylightstudio/FUEL-CMS/releases/tag/1.4.1
# Version: <= 1.4.1
# Tested on: Ubuntu - Apache2 - php5
# CVE : CVE-2018-16763
# Updated by Krishna Upadhyay for Python 3
#!/usr/bin/python
#
# Pickle deserialization RCE payload.
# To be invoked with command to execute at it's first parameter.
# Otherwise, the default one will be used.
#
import pickle
import sys
import base64
@kriss-u
kriss-u / cmsmadesimple-exploit.py
Last active May 20, 2023 03:45
cmsmadesimple <= 2.2.9 SQL injection
#!/usr/bin/python3
# Exploit Title: Unauthenticated SQL Injection on CMS Made Simple <= 2.2.9
# Date: 30-03-2019
# Exploit Author: Daniele Scanu @ Certimeter Group
# Vendor Homepage: https://www.cmsmadesimple.org/
# Software Link: https://www.cmsmadesimple.org/downloads/cmsms/
# Version: <= 2.2.9
# Tested on: Ubuntu 18.04 LTS
# CVE : CVE-2019-9053
# Updated by Krishna Upadhyay for Python 3
@kriss-u
kriss-u / adroit-decrypt.java
Created July 10, 2021 13:39
Adroit decrypt code
// Online Java Compiler
// Use this editor to write, compile and run your Java code online
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
@kriss-u
kriss-u / pg-db-transfer.sh
Last active February 21, 2023 12:24
This script can be used to copy db, with SSH Tunneling support. Use it with caution since it cleans up the destination database.
#!/bin/bash
# GREEN="\e[42m"
function set_foreground_color() {
if [ -z "$1" ]
then
echo -e "$(tput setaf 1)Must pass color code from 0 to 9."
exit 1
else
echo $(tput setaf "$1")
fi
@kriss-u
kriss-u / firebase.sh
Created April 4, 2023 05:41
Transfer users between firebase accounts
#!/bin/bash
# GREEN="\e[42m"
function set_foreground_color() {
if [ -z "$1" ]
then
echo -e "$(tput setaf 1)Must pass color code from 0 to 9."
exit 1
else
echo $(tput setaf "$1")
fi