Skip to content

Instantly share code, notes, and snippets.

View cooliscool's full-sized avatar
🐼

M. Ajmal Moochingal cooliscool

🐼
View GitHub Profile
@cooliscool
cooliscool / CommandExecutor.java
Created December 27, 2023 18:39
Android Shell Command executor class.
package com.moo.myapplication2;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class CommandExecutor {
public static String executeCommand(String command) {
StringBuilder output = new StringBuilder();

Path traversal to RCE in Android - Mobile Hacking Lab ‘Document Viewer’ write-up

During my preparation for eMAPT, I came across Mobile Hacking Labs - and their free hacking labs which I felt would help me for practice. So I decided to give it a try starting with the ‘Document Viewer’ challenge. Getting right into the problem.

Problem statement

The do give out some solid hints & right direction in the problem statement.

  • Your target is an Android application with a feature to open PDFs from HTTP/HTTPS URLs
@cooliscool
cooliscool / gist:85d45bbd0bf4ac50a3ed8108fbff6534
Last active December 1, 2023 01:48
Kubernetes Policy Engines

Kubernetes Policy Engines: How to Implement Security, Compliance, and Governance Policies in Your Cluster

kubernetes_captain_retouched (image generated by DALL-E)

Embarking on the journey of Kubernetes security unveils a vast landscape, encompassing crucial elements that safeguard your containerized applications. Among the intriguing facets within this realm, we delve into pivotal sections that form the bedrock of Kubernetes security:

  • RBAC Mastery: Kubernetes security begins with defining who holds the keys to the kingdom. Role-Based Access Control (RBAC) empowers you to orchestrate who wields authority over kubectl, the gateway to your Kubernetes cluster. Craft roles and permissions tailored for distinct users and groups, ensuring a finely tuned control mechanism.

  • Secrets Safeguard: The cloak of security extends to shielding your application's secrets. In the digital realm, secrets are akin to treasures — pa

@cooliscool
cooliscool / jerk.py
Last active October 28, 2023 05:58
Mouse Jerk 😜
import pyautogui
import random
import time
while True:
current_x, current_y = pyautogui.position()
# Generate random x and y coordinates around the current position
new_x = current_x + random.randint(-5, 5)
new_y = current_y + random.randint(-5, 5)
@cooliscool
cooliscool / egg_hunter.asm
Created October 27, 2022 05:22 — forked from AdityaChaudhary/egg_hunter.asm
Linux/x86 Egg Hunter
; Egg Hunter
; Author: Aditya Chaudhary
; Date: 20th Jan 2019
global _start
section .text
@cooliscool
cooliscool / main.go
Created November 24, 2021 14:30
Pretty print JSON from stdin - Go program
package main
import ("fmt"
"encoding/json"
"os"
"bufio"
"bytes"
)
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main(void)
{
printf("My UID is: %d. My GID is: %d My EUID is: %d. My EGID is: %d \n", getuid(), getgid() , geteuid(), getegid());
system("/usr/bin/id");
setuid(geteuid());
printf("My UID is: %d. My GID is: %d My EUID is: %d. My EGID is: %d \n", getuid(), getgid() , geteuid(), getegid());
system("/usr/bin/id");
@cooliscool
cooliscool / index.php
Created June 13, 2018 04:24
Youtube Downloader API in PHP
// Author : Mohammed Ajmal
// github.com/cooliscool
// GNU Public License
<?php
if(isset($_GET['v'])){
// $download = exec('youtube-dl '.$_GET['v']);
$comm = 'youtube-dl '.$_GET['v'].' 2>&1';
@cooliscool
cooliscool / flightgearWarrior.py
Last active October 24, 2021 09:43
To Run Flight Gear simulations
import time
import requests as g
import csv
port= 8089
hostname='localhost'
latDegToMet = 111000
metToFeet = 3.28084
radToDeg = 180/3.14159
@cooliscool
cooliscool / netaccess.py
Last active August 31, 2021 01:15
Approve Netaccess automatically ( for IIT Madras ).
#!/usr/bin/env python
import requests
import sys
import getpass
username = 'aexxxxxx'
print ('LDAP pass ')
pa = str(getpass.getpass())
with requests.session() as s:
page = s.post('https://netaccess.iitm.ac.in/account/login' , data={ 'userLogin':username, 'userPassword':pa, 'submit':''})