Skip to content

Instantly share code, notes, and snippets.

View adi928's full-sized avatar

Aditya Nath adi928

View GitHub Profile
import logging
import azure.functions as func
from azure.storage.blob import BlobServiceClient, BlobClient
from io import BytesIO
import zipfile
def main(req: func.HttpRequest) -> func.HttpResponse:
def copy_azure_blobs(srcName):
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
@adi928
adi928 / azureRepoApi-Push.py
Created April 10, 2021 21:39
Part of a blog elaborating the confluence to azure app service workflow
import json
commitMsg = "Testing 101"
changesList = []
for f_name in filesInZip:
if f_name.split('.')[-1] in ['html', 'css', 'js', 'aspx', 'scss']:
print("[+] Adding file: "+f_name)
else:
print("[+] Skipping file: "+ f_name)
continue
with open("/tmp/"+filename.split('.')[0]+"/"+f_name, "r") as fileContent:
@adi928
adi928 / config.ini
Last active November 13, 2020 00:48
Amass config for spotify bug bounty
mode = active
output_directory = /Users/name/tools/amass
maximum_dns_queries = 10000
[resolvers]
monitor_resolver_rate = true
resolver = 1.1.1.1 ; Cloudflare
resolver = 8.8.8.8 ; Google
resolver = 64.6.64.6 ; Verisign
resolver = 74.82.42.42 ; Hurricane Electric
@adi928
adi928 / python_practice.py
Created December 15, 2019 22:41
Practicing python. Nothing to see here. Move on!
def per_octal(perm_string):
permStr = ""
res = 0
for i in range(len(perm_string)):
perm = perm_string[i]
if perm == 'r':
res += 4
elif perm == 'w':
res += 2
elif perm == 'x':
@adi928
adi928 / nmapBaseline.py
Last active December 3, 2019 21:07
Includes a function for scanning the network and running comparison on Nmap XML outputs. Needs Sanitizing
import nmap
from datetime import datetime
import difflib
from pathlib import Path
## Run nmap
def runNmap():
scanFileName = 'scan-' + str(datetime.now())
argStr = '-sC -sV'
nmapCmd = nmap.PortScanner()
@adi928
adi928 / pattern.py
Last active January 19, 2020 21:05
#! /usr/local/bin/python
import sys
import string
import re
import argparse
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@adi928
adi928 / crawler
Created September 28, 2019 16:01
from http_crawler import crawl
if __name__ == '__main__':
for rsp in crawl('https://admissions.iusb.edu/', exceptions='https://students.iusb.edu/about/big-list.html'):
if rsp.status_code == 200:
print('Got {}'.format(rsp.url))
#include <stdio.h> // Used for printf() statements
#include <wiringPi.h> // Include WiringPi library!
// Pin number declarations. We're using the Broadcom chip pin numbers.
const int ledPin1 = 18; // PWM LED - Broadcom pin 18, P1 pin 12
const int ledPin2 = 23; // Regular LED - Broadcom pin 23, P1 pin 16
const int ledPin3 = 24;
const int ledPin4 = 25;
const int pwmValue = 1024; // Use this to set an LED brightness
@adi928
adi928 / aesEncrypt.cpp
Created September 20, 2018 14:42
Key Expansion included AES encrypt
#include <iostream>
#include "AESConstants.h"
#include <fstream>
#include <string>
using namespace std;
// Input the plaintext and the key
void inputData(char* plainText, char* key)
{
// Variable to contain user's file name