This file contains hidden or 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 random import choice as random | |
ROCK = 1 | |
PAPER = 2 | |
SCISSORS = 3 | |
out_of = 3 | |
best = out_of -1 | |
MOVES = { |
This file contains hidden or 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 java.net.URLEncoder; | |
import org.apache.commons.lang.StringEscapeUtils; | |
public class Sanitize { | |
/* | |
* @param input the String to be sanitized for use in HTML | |
* @return the sanitized String | |
*/ | |
public static String html(Object input) { |
This file contains hidden or 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
var AaB_0x44df=['\x56\x45\x39\x47\x52\x47\x55\x3d','\x65\x56\x70\x34\x56\x47\x45\x3d','\x4d\x48\x67\x78\x4e\x51\x3d\x3d','\x4d\x48\x67\x78\x4e\x67\x3d\x3d','\x61\x6c\x6c\x75\x65\x58\x4d\x3d','\x63\x6d\x35\x59\x55\x6e\x63\x3d','\x64\x33\x52\x6c\x53\x58\x4d\x3d','\x55\x55\x68\x4a\x52\x46\x6f\x3d','\x64\x56\x64\x68\x63\x55\x49\x3d','\x54\x33\x52\x79\x57\x58\x49\x3d','\x4d\x48\x67\x78\x4f\x51\x3d\x3d','\x63\x45\x74\x70\x61\x30\x67\x3d','\x54\x6c\x5a\x4f\x64\x6c\x55\x3d','\x4d\x48\x67\x78\x4e\x77\x3d\x3d','\x4d\x48\x67\x78\x4f\x41\x3d\x3d','\x57\x55\x6c\x50\x5a\x55\x34\x3d','\x64\x57\x68\x52\x54\x48\x6b\x3d','\x57\x6d\x6c\x6c\x63\x58\x67\x3d','\x61\x45\x35\x73\x61\x33\x51\x3d','\x64\x56\x6c\x59\x57\x47\x77\x3d','\x51\x56\x4a\x52\x62\x47\x6b\x3d','\x52\x6d\x39\x43\x54\x46\x59\x3d','\x4d\x48\x67\x30','\x4d\x48\x67\x78','\x4d\x48\x67\x79','\x56\x32\x5a\x69\x51\x56\x6f\x3d','\x4d\x48\x67\x7a','\x4d\x48\x67\x31','\x52\x32\x39\x7a\x62\x32\x77\x3d','\x54\x31\x4a\x47\x56\x30\x6b\x3d','\x62\x6c\x42\x6c\x55\x57\x4d\x3d','\x |
This file contains hidden or 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 urllib.request | |
def test(i): | |
try: | |
output = (urllib.request.urlopen("https://c.statcounter.com/t.php?sc_project=9723423&java=1&security=7dbba45b&u1=1DED3E2F05F14F9140589E441356E648&sc_random=0.04749143558385471&jg=new&rr=1.1.1.1.1.1.1.1.1&resolution=1920&h=1082340&camefrom=&u=https%3A//masseychem.weebly.com/ib-candidates.html&t=IB%20Candidates%20-%20Mr.%20Massey%27s%20Chemistry%20Pages&rcat=d&rdom=d&rdomg=new&bb=5&sc_snum=5&sess=7a9eb4&p=0", timeout=10).read()) | |
print(i) | |
except: | |
print('Timeout!') | |
def rip(): |
This file contains hidden or 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
`env -i ./binary` clear env vars | |
'AABB%<offset>$n' writes 4 (len('AABB')) to 0x41414242 (hex('AABB')) | |
'AABB%<value-4>x%<offset>$n' writes `value` to 0x41414242 | |
to write 0xABABACAC to 0x41414242, split into 0x4141 and 0x4242: | |
CABBAABB%<unhex('ABAB')-8>%<offset>$hn%<unhex('ACAC')-unhex('ABAB')-8>%<offset+1>$hn | |
<address><address+2>%<number>x%<offset>$hn%<other number>x%<offset+1>$hn |
This file contains hidden or 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
url = 'https://www.brainscape.com/flashcards/domain-4-software-troubleshooting-session-6098579/packs/9226858' | |
def getHTML(page): | |
import urllib.request | |
with urllib.request.urlopen(page) as response: | |
return response.read().decode('utf-8') | |
html = getHTML(url).split("<h3 class='card-answer-text' itemprop='text'>") | |
first = True |
This file contains hidden or 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
# enter in the maze content in ascii here | |
maze = [list('######################'), | |
list('#S #### # # ##'), | |
list('## #### # ##### ### ##'), | |
list('## # ###E##'), | |
list('####### ####### ######'), | |
list('## # ### ##'), | |
list('## ######## ##### ##'), | |
list('## ####### ##### ##'), | |
list('## ## ##'), |
This file contains hidden or 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
<?php | |
# This is the location where program will reside | |
if (isset($_SERVER["HTTP_ORIGIN"]) || isset($_SERVER['HTTP_REFERER']) ) { | |
$valid_site = false; | |
$origin_site = isset($_SERVER['HTTP_ORIGIN']) ? $_SERVER['HTTP_ORIGIN']: $_SERVER['HTTP_REFERER']; | |
$origin_site = trim($origin_site); | |
$pattern = "/(.*)tutorialspoint.com(.*)/"; | |
if( preg_match($pattern, $origin_site, $matches )){ | |
$valid_site = true; | |
} |
This file contains hidden or 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 python | |
# coding: utf8 | |
from gluon import * | |
import re | |
import smtplib | |
import tempfile | |
import ssam_utils | |
import ttsd.ldaputils | |
import ttsd.ldaputils.ad | |
from ttsd.ldaputils import StudentConfiguration |
This file contains hidden or 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
text = 'Once upon a time in the land of Tigernet there lived a wise, but $adjective wizard named James. In his dominion was all kinds of electronic $nouns and $nouns. One day, the wizard Fulton declared, \'Let us make a giant balloon and adorn it with such devices as $nouns, $adjective $nouns, and $adjective $nouns. With these devices we will measure the curvature of the $noun - a $adjective but important scientific inquiry.\' So the many citizens of Tigernet embraced the $adjective mission of their leader and began the $adjective and $adjective task of building the $nouns. They used $adjective tools to make $quantity $adjective $nouns - some were $adjective while others were $adjective. They worked $adverb for $quantity days and nights. Finally, the day came to launch. They filled the $adjective balloon and watched it $adverb rise into the $adjective $adjective sky. It was a beautiful sight.' | |
for wordtype in {'noun', 'verb', 'adjective', 'adverb', 'quantity'}: | |
for _ in range(text.count('$%s' % wordtype) |
NewerOlder