Skip to content

Instantly share code, notes, and snippets.

View 5teven1in's full-sized avatar
🎯
Focusing

Steven Lin 5teven1in

🎯
Focusing
View GitHub Profile
@5teven1in
5teven1in / Inversion.cpp
Created June 8, 2021 11:23
TOI202105 新手組
#include <bits/stdc++.h>
using namespace std;
void print(const string &s, int start, int end, char dir)
{
if (dir == '+')
{
for (int i = start + 1; i < end; i++)
cout << s[i];
@5teven1in
5teven1in / Maze.cpp
Last active June 9, 2021 17:42
TOI202105 潛力組
#include <bits/stdc++.h>
#define MAXN 505
using namespace std;
int N;
char maze[MAXN][MAXN];
int ans[MAXN][MAXN];
bool vis[MAXN][MAXN];
@5teven1in
5teven1in / README.md
Last active June 26, 2021 07:48
HITCON CTF 2020 11011001 Writeup

11011001 [255pts]

0100111001101111001000000110100001101001011011100111010000100000011010000110010101110010011001010010110000100000011101110110100001100001011101000010000001100001011100100110010100100000011110010110111101110101001000000110010101111000011100000110010101100011011101000110100101101110011001110010000001100110011011110111001000111111

11011001-878450f7a8f95309ce756975ce912376d829c1d7caeed7f80da72ee3bc67e5ca

Author: david942j
30 Teams solved.

Easy Unpack

Concept

  • basic reverse

Solution

After the binary decrypt and extract the real code, it will jump to the OEP. We can find the jump instrcution at the end of the binary.

Easy Keygen

Concept

  • basic reverse
  • static analysis
  • XOR encryption

Solution

Easy Crack

Concept

  • basic reverse
  • static analysis
  • string comparison

Solution

@5teven1in
5teven1in / get_chocolatey_package_list.py
Last active June 8, 2021 06:55
chocolatey package list crawler
import sys
import requests
from bs4 import BeautifulSoup as BS
url_format = "https://chocolatey.org/packages?sortOrder=package-download-count&page={}&prerelease=False&moderatorQueue=False&moderationStatus=all-statuses"
def get_list(idx):
res = requests.get(url_format.format(idx))
soup = BS(res.text, 'html.parser')
lis = soup.find_all('div', class_="package-list-align")
import json
import httpx
from bs4 import BeautifulSoup as BS
from urllib.parse import quote, unquote
search_url = "https://shopee.tw/search?keyword={}"
search_items_url = "https://shopee.tw/api/v2/search_items/?by=relevancy&keyword={}&limit=50&newest=0&order=desc&page_type=search&version=2"
def get_items(keyword):
choco install -y adobereader
choco install -y flashplayerplugin
choco install -y googlechrome
choco install -y flashplayeractivex
choco install -y chocolatey-core.extension
choco install -y jre8
choco install -y firefox
choco install -y 7zip.install
choco install -y kb2919442
choco install -y kb2919355