Skip to content

Instantly share code, notes, and snippets.

Avatar

Lê Quang Thảo komang4130

View GitHub Profile
View gist:94b3580af8bb117aeb8bfbecddf662e3
https://gist.github.com/komang4130/56ebabe0160186793d0595c1cac65d6d
View vd
<?php require_once("lib/connection.php"); ?>
<?php
if ( isset($_SESSION["is_logged"]) )
{
if ( $_SESSION["admin"])
{
View gist:a2df326e214af87eb1c72c81d10ddf90
from requests import *
from base64 import *
block_size = 16
url = "http://167.99.161.30:8080"
def get_cookies(name):
data = {"name": name}
s = Session()
View 2018_meepwnCTF_esor.py
#!/usr/bin/python2
from Crypto.Cipher import AES
import hmac, hashlib
import os
import sys
menu = """Choose one:
1. encrypt data
2. decrypt data
3. quit
View gist:c93e07de0c443daaf5f0c32225d32744
import socket
import os
#product=FLAG&price=999999999&timestamp=1529122879569249&sign=b46e16950a89fc50eb229be891af53625eceb6a7c6b82c323c8ac7e7d0dc78cb
def hash_length_extension(order,length):
append = "&price=1000"
key_length = length
data = order[:-70]
sign = order[-64:]
hashpump = os.popen("hashpump -d '%s' -s '%s' -a '%s' -k '%i'" % (data,sign,append,key_length)).readlines()
View gist:cfd47f498a5d60de628a1b9ff7dfe8c2
import socket
import os
#product=FLAG&price=999999999&timestamp=1529122879569249&sign=b46e16950a89fc50eb229be891af53625eceb6a7c6b82c323c8ac7e7d0dc78cb
def hash_length_extension(order,length):
append = "&price=1000"
key_length = length
data = order[:-70]
sign = order[-64:]
hashpump = os.popen("hashpump -d '%s' -s '%s' -a '%s' -k '%i'" % (data,sign,append,key_length)).readlines()
View pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.koman</groupId>
<artifactId>demo</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>demo Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
View gist:3d61ae4970fbcd55883bb890b10d1a5c
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import pickle
import time
usr = "komang123"
pwd = "123456"
driver = webdriver.Firefox()
View gist:57b7420ee0b98b65139215f854b346d3
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
usr = "komang123"
pwd = "123456"
driver = webdriver.Firefox()
cookie = {"key": "value"}
driver.add_cookie(cookie)
View weird
yETN4ADO3IzMxIzN4UDMxEzM4ETOzQTM5EzN5QDOygTMzQjM1QTNzYTN4UDMyETMwgTO2YDNxMjNxYTM1YDO3QTOxkTMxgTM4gjM4YTO4QjM2kDNwIDM5ETNxgDMyUDM0ETN0IjMzQzNzcjN1AjN0UTNxUjNyMzN3cTMyczNwMTO0czNxgjM1kTO3UTO3UDM1cTM2EzM3UDO2ETNyITN5czM2cDNwQjMxcDNwkzN0gjM2cjMycTN5UTN1IDO5kDM5QzM1YTNykDM5IzN3gzN5kzNyEDN2kTNwgDOzEDM4UjM5MDM3ATOwUTMxEDM0IjN1ATO0AzM2gTMzkzMzkzN2EzM4gTN2gTO4kjNwATN3gTNzMTOxIDO1gDOxUDMyUjN2UDM0YjN1UjN1MzMyITN3IjMwIzM2MTN5UDM4UjMxYDM5UjM3MDM3UzM2MzN5UDOzkDNzczMwYDNzczMzIDMxETM1cjN0gTM4AjNxUjM5cDN2ITN1QDO2kTM4ATNxETNxADM1UzN2ATM3kTO1kjM3UDMxITO4MzNzkTNyADN4ATNxMjM3MzN4YTN