Skip to content

Instantly share code, notes, and snippets.

View shouc's full-sized avatar
:shipit:

typeform chain builder shouc

:shipit:
View GitHub Profile
import math
Cl2 = -914.539251
Cl = -457.274191
CH4 = -39.925088
CH3 = -39.307514
CH3Cl = -496.645171
HCl = -457.859632
CH2Cl2 = -953.354926
CHCl3 = -1410.057976
CCl4 = -1866.755609
@shouc
shouc / badoo.py
Created July 5, 2019 02:45
Badoo auto star and social media account extraction
# -*- coding:utf-8 -*-
############################################
USERNAME = "YOUR_USERNAME"
PASSWORD = "YOUR_PASSWORD"
CHROME_DRIVER = "YOUR_PATH_TO_CHROME_DRIVER"
############################################
from selenium.webdriver.common.keys import Keys
from selenium import webdriver
import time
@shouc
shouc / ccs.py
Created October 31, 2019 19:26
Spamming CCS as they don't respond to my email
import smtplib
from email.mime.text import MIMEText
from email.header import Header
sender = '[email protected]'
receivers = ['[email protected]']
message = MIMEText("""
To whom it may concern,
Checking in again: did you receive my last email?
@shouc
shouc / midterm-2.cpp
Created November 26, 2019 18:29
midterm-2
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main(int argc, char const *argv[])
{
if (argc == 1){
cerr << "Usage: ./" << argv[0] << " filename" << endl;
#include "cpp-httplib/httplib.h"
using namespace httplib;
int main() {
Server svr;
svr.Get("/1", [](const Request& req, Response& res) {
res.set_redirect("1\r\nSet-Cookie: a=1");
});
svr.Get("/2", [](const Request& req, Response& res) {
res.set_header("a", "1\r\nSet-Cookie: a=1");
});
@shouc
shouc / WeCTF Scoring.sql
Last active April 17, 2020 18:24
Scoring
CREATE EVENT IF NOT EXISTS `calc_challenges_new_score`
ON SCHEDULE
EVERY 5 MINUTE
COMMENT 'Calculate points for challenges every 5 min'
DO
-- TBD
-- Following CCC's algorithm
-- @base + ( @top - @base ) / (1 + (max(0, solves -1)/ 11.92201) ** 1.206069)
CREATE EVENT IF NOT EXISTS `calc_challenges_new_score`
ON SCHEDULE
EVERY 3 SECOND
COMMENT 'Calculate points for challenges'
DO
UPDATE challenges AS c SET c.`point` = CONVERT(c.base_point + (c.top_point - c.base_point) / (1 + POW(GREATEST(c.solved_count - 1, 0) / 11.92201, 1.206069)), UNSIGNED);
@shouc
shouc / PyCrypto Writeup.md
Last active July 5, 2020 17:25
ASIS CTF 2020 PyCrypto Writeup

PyCrypto Writeup

To begin with, there is a very easy crypto chall. By solving it with collision, we can get:

key = "ASIS2020_W3bcrypt_ChAlLeNg3!@#%^"

Then, leverage this vuln (trentm/python-markdown2#348) to make /ticket to have XSS.

@shouc
shouc / WebRTC Writeup.md
Created September 14, 2020 03:26
CSAW CTF 2020 WebRTC Writeup

0x00 Challenge

supervisord.conf:

[supervisord]
nodaemon=true

[program:gunicorn3]
command=gunicorn3 --workers=10 -b 0.0.0.0:5000 app:app
@shouc
shouc / DecodeCode.c
Created November 21, 2020 04:47
DecodeCode.c
#include "DecodeCode.h"
mipsinstruction decode(int value)
{
mipsinstruction instr;
unsigned int v = (unsigned int) value;
instr.funct = v & 0b111111;
instr.immediate = value & 0b1111111111111111;
unsigned short is_signed = instr.immediate >> 15;