Skip to content

Instantly share code, notes, and snippets.

View SurajDadral's full-sized avatar
💻
Exploring

Suraj SurajDadral

💻
Exploring
View GitHub Profile
@SurajDadral
SurajDadral / attendance.py
Created February 4, 2021 19:45
Automate Attendance in Moodle
import requests
import re
moodle_root = "https://example.com"
username = "MyUsername"
password = "MySecretPassword"
attendance_page = f"{moodle_root}/mod/attendance/view.php?id=16681"
session = requests.Session()
@SurajDadral
SurajDadral / 47138.py
Created December 5, 2020 15:47
CVE-2018-16763 - Python3 code
# Find original code (Python2) at: https://www.exploit-db.com/exploits/47138
# Exploit Title: fuelCMS 1.4.1 - Remote Code Execution
# 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
@SurajDadral
SurajDadral / guess_number.rexx
Created November 20, 2020 18:34
Rex snippets
/* REXX */
say "I'm thinking of a number between 1 and 10."
secret = RANDOM(1,10)
tries = 1
do while (guess \= secret)
say "What is your guess?"
say "PS: Send 'Q' to exit"
pull guess
if (compare(guess, "Q") == 0) then
@SurajDadral
SurajDadral / cc_check.py
Created November 20, 2020 14:24
Validate credit card data using Z Open Automation Utilities and Python
# Import the Z Open Automation Utilities libraries we need
from zoautil_py import MVSCmd, Datasets
from zoautil_py.types import DDStatement
# Import datetime, needed so we can format the report
from datetime import datetime
# Import os, needed to get the environment variables
import os
@SurajDadral
SurajDadral / default.conf
Last active August 9, 2025 21:35
Enable PHP and CGI in user directory (public_html) in nginx
# Default server configuration
#
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
@SurajDadral
SurajDadral / GSoC2020_finalReport.md
Last active November 20, 2020 18:38
Final report of the GSoC 2020 project - Extended functionality of Rebar Addon in FreeCAD