Skip to content

Instantly share code, notes, and snippets.

View nickfox-taterli's full-sized avatar
😰
想哭

Tater Li nickfox-taterli

😰
想哭
View GitHub Profile
@nickfox-taterli
nickfox-taterli / topspeed.php
Created June 18, 2020 05:09
查看流量卡的信息
<?php
$curl = curl_init();
//似乎GET也可以:http://www.topspeed-network.com/action/cardDetails?number=89860424181940054639&operatorsId=3
curl_setopt_array($curl, array(
CURLOPT_URL => "http://www.topspeed-network.com/action/cardDetails",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
@nickfox-taterli
nickfox-taterli / solusvm.php
Created June 18, 2020 05:07
solusvm 查看监控脚本
<?php
function humanFileSize($size, $unit="") {
if( (!$unit && $size >= 1<<30) || $unit == "GB")
return number_format($size/(1<<30),2)." GB";
if( (!$unit && $size >= 1<<20) || $unit == "MB")
return number_format($size/(1<<20),2)." MB";
if( (!$unit && $size >= 1<<10) || $unit == "KB")
return number_format($size/(1<<10),2)." KB";
return number_format($size)." bytes";
@nickfox-taterli
nickfox-taterli / upload_od_with_nonadmin.py
Created June 12, 2020 02:48
无管理员OneDrive上传
import json
import os
import sys
import requests
if len(sys.argv) != 3:
print('使用方法:./' + sys.argv[0] + ' url file')
exit(-1)
@nickfox-taterli
nickfox-taterli / OfficeAccount.py
Created June 10, 2020 09:06
O365翻车查找
import json
import os
import time
import yaml
from requests_oauthlib import OAuth2Session
# Azure SDK 必须这么做,因为Azure服务器可能不按顺序返回参数.
os.environ['OAUTHLIB_RELAX_TOKEN_SCOPE'] = '1'
os.environ['OAUTHLIB_IGNORE_SCOPE_CHANGE'] = '1'
@nickfox-taterli
nickfox-taterli / KERN_SLABALLOC.c
Last active February 21, 2023 08:56
SLAB FreeRTOS Port
/*
* KERN_SLABALLOC.C - Kernel SLAB memory allocator
*
* Copyright (c) 2003,2004 The DragonFly Project. All rights reserved.
*
* This code is derived from software contributed to The DragonFly Project
* by Matthew Dillon <[email protected]>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@nickfox-taterli
nickfox-taterli / gmail_php.php
Created April 23, 2020 11:16
Gmail PHP API Send
<?php
//composer require google/apiclient:"^2.0"
//composer require phpmailer/phpmailer
require './vendor/autoload.php';
if (php_sapi_name() != 'cli') {
throw new Exception('This application must be run on the command line.');
}
@nickfox-taterli
nickfox-taterli / full_ip_speedtest_cf.c
Created April 13, 2020 09:58
CF所有Web节点的测速(全部IP检查)
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
@nickfox-taterli
nickfox-taterli / crossaccount_aws.php
Created March 2, 2020 05:45
Cross Account Aws PHP Script
<?php
require 'vendor/autoload.php';
use Aws\CloudWatch\CloudWatchClient;
use Aws\Ec2\Ec2Client;
use Aws\Sts\StsClient;
// 采样10分钟数据是防止数据不对齐问题.
function Ec2Meters($cloudwatchClient, $instance, $MetricName)
@nickfox-taterli
nickfox-taterli / v2ray-detect.nse
Last active March 8, 2020 09:37
vmess ws 检测脚本(配合nmap)
-- 只扫原生WS,不要太恐慌.
local stdnse = require "stdnse"
local http = require "http"
categories = { "default", "discovery", "safe" }
portrule = function(host, port)
return true
end
@nickfox-taterli
nickfox-taterli / config.json
Last active October 29, 2023 09:00
v2ray test
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbounds": [
{
"port": 60080,
"listen": "127.0.0.1",