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
| # Requires: BeautifulSoup (https://pypi.python.org/pypi/beautifulsoup4) | |
| # Requires: Requests (https://pypi.python.org/pypi/requests) | |
| from bs4 import BeautifulSoup | |
| from threading import Thread, Lock | |
| import requests | |
| import sys | |
| import re | |
| import base64 |
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
| class MaxHeap<T : Comparable<T>>() { | |
| private val items: MutableList<T?> = mutableListOf() | |
| var size: Int = 0 | |
| private set | |
| fun push(item: T) { | |
| set(size++, item) | |
| siftUp(size - 1) | |
| } |
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
| ML = """ | |
| 20060064 20c7009b 00c64020 00e84822 | |
| 01075022 01065820 01676024 01476825 | |
| 38ee5555 00ed7822 00cd8020 01e78827 | |
| 022f9020 | |
| """ | |
| OPCODE_MAP = { | |
| 0b001000: "addi", | |
| 0b001100: "andi", |
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
| ASM = """ | |
| addi $6 , $0 , 100 | |
| addi $7 , $6 , 155 | |
| add $8 , $6 , $6 | |
| sub $9 , $7 , $8 | |
| sub $10, $8 , $7 | |
| add $11, $8 , $6 | |
| and $12, $11, $7 | |
| or $13, $10, $7 | |
| xori $14, $7 , 0x5555 |
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 android.app.Fragment; | |
| import android.content.Context; | |
| import android.content.pm.PackageManager; | |
| import android.os.Build; | |
| import android.support.annotation.NonNull; | |
| import android.support.v4.content.ContextCompat; | |
| public class CompatFragment extends Fragment { | |
| @Override | |
| public Context getContext() { |
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 android.app.Fragment; | |
| import android.app.FragmentManager; | |
| import android.app.FragmentTransaction; | |
| import android.support.v4.view.PagerAdapter; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| /** | |
| * An implementation of the support library FragmentPagerAdapter | |
| * class for the native Android {@link Fragment} class. |
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 android.content.*; | |
| import android.database.Cursor; | |
| import android.database.sqlite.SQLiteDatabase; | |
| import android.database.sqlite.SQLiteOpenHelper; | |
| import android.database.sqlite.SQLiteQueryBuilder; | |
| import android.net.Uri; | |
| import android.provider.BaseColumns; | |
| import android.support.annotation.NonNull; | |
| import android.text.TextUtils; |
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 android.content.ContentResolver; | |
| import android.content.ContentUris; | |
| import android.content.ContentValues; | |
| import android.content.Context; | |
| import android.database.Cursor; | |
| import android.net.Uri; | |
| public abstract class AutoContentLoader<T> { | |
| private final Uri mContentUri; | |
| private final String[] mAllColumns; |
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.lang.reflect.Array; | |
| public static String join(String delimiter, Object parts) { | |
| int length = Array.getLength(parts); | |
| if (length == 0) { | |
| return ""; | |
| } | |
| StringBuilder sb = new StringBuilder(); | |
| for (int i = 0; i < length; ++i) { | |
| Object part = Array.get(parts, i); |
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
| /* | |
| * Keygen for LaFarge's crackme #2 | |
| * http://crackmes.de/users/lafarge/lafarges_crackme_2/ | |
| */ | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <string.h> |