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
#define IS_OS_8_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) | |
if (IS_OS_8_OR_LATER) { | |
[[UIApplication sharedApplication] registerForRemoteNotifications]; | |
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound) categories:nil]; | |
[[UIApplication sharedApplication] registerUserNotificationSettings:settings]; | |
} else { | |
[application registerForRemoteNotificationTypes: | |
UIRemoteNotificationTypeBadge | | |
UIRemoteNotificationTypeAlert | | |
UIRemoteNotificationTypeSound]; |
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
# device_id, sid, uid 需要自己先抓包获取到 | |
# game_mode 1是无尽模式 2是限时模式 | |
import hashlib | |
import hmac | |
import base64 | |
import requests | |
def data_to_string(data): |
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 requests | |
from bs4 import BeautifulSoup | |
SESSION_ID = '' | |
FILE_PATH = '' | |
def get_stu_info(page): | |
base_url = 'http://www.nextsecond.cn/fellow' |
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 socket | |
from concurrent.futures import ThreadPoolExecutor | |
MAX_WORKERS = 40 | |
PORT = 80 | |
IP_ADDR = "192.168.1.[HOST_ADDR]" | |
def detect_port(ip): |
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 os, shutil | |
from datetime import datetime | |
def main(): | |
save_folder = dir_path = os.path.dirname( | |
os.path.realpath(__file__)) + '\wallpapers' | |
wallpaper_folder = os.getenv('LOCALAPPDATA') + ( | |
'\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy' | |
'\LocalState\Assets') |
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 time | |
class TokenBucket(object): | |
def __init__(self, rate, capacity): | |
self._rate = rate | |
self._capacity = capacity | |
self._current_amount = 0 | |
self._last_consume_time = int(time.time()) |
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 os | |
import aiohttp | |
import json | |
import base64 | |
import asyncio | |
import uvloop | |
START_ID = 1000 | |
END_ID = 1020 |