Skip to content

Instantly share code, notes, and snippets.

View LanHao0's full-sized avatar
🎯
Focusing

LanHao LanHao0

🎯
Focusing
View GitHub Profile
title date tags
GCMForMojo 的部署与设置
2017-01-21 11:07:03 -0800
GCM
Android

2017年2月6日更新:完善部分内容,更新内容

2017年2月8日更新:发现自己脑抽少写了一步较为关键的步骤,赶紧补上orz,连带解决笔误

@LanHao0
LanHao0 / ssltest.py
Created August 13, 2017 14:42 — forked from sh1n0b1/ssltest.py
Python Heartbleed (CVE-2014-0160) Proof of Concept
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
<AppUpdater>
<update>
<latestVersion>1.1.3</latestVersion>
<latestVersionCode>26</latestVersionCode>
<url>ttps://lanhaoo.club/irc.apk</url>
<releaseNotes>
"- 1.新增功能:应用增加没什么用的通知,接受服务器PUSH消息",\n "- 2.新增功能:检测更新",\n "- 3.Bug fixes:部分机型键盘挡住输入框"\n
</releaseNotes>
</update>
</AppUpdater>
@LanHao0
LanHao0 / qq_message_xml.md
Created July 27, 2018 19:48 — forked from koukuko/qq_message_xml.md
发送XML消息的格式

QQ的XML消息格式整理

QQ可以使用xml的方式发送消息,以下为了方便描述统称为卡片。

发送方式

通过机器人的API进行发送xml即可,但是如果选择发送xml,那么其他如[image=xxx][@xxx]这些命令就不可使用了。整个消息只有XML。

基本结构

xml主要由msg,item,source这3部分组成

<?xml version='1.0' encoding='utf-8' standalone='yes'?>
# -*- coding: utf-8 -*-
def addone():
x=41
y=0
while x<66:
x=x+1
y=y+1
x=str(x)
y=str(y)
mystr= "var btn_"+y+"=document.getElementById("+'"'+y+'"'+");"
outfile = open('resulttiku.txt', 'w',encoding='utf-8') #new file
list_1=[]
for line in open('tiku.txt',encoding='utf-8'): #old txt file
tmp = line.strip()
if tmp not in list_1:
list_1.append(tmp)
outfile.write(line)
outfile.close()
bad_words = ['Pixel','Uptimebot/1.0;','DotBot/1.1;',' MJ12bot/v1.4.8','GrapeshotCrawler/2.0;','115.216.108.86','Baiduspider/2.0;','YisouSpider/5.0','"Sogou','"IAS crawler','FeedFetcher-Google','"CheckMarkNetwork/1.0','GoogleImageProxy)"',' /generate_204']
with open('access.txt') as oldfile, open('newfile.txt', 'w') as newfile:
for line in oldfile:
if not any(bad_word in line for bad_word in bad_words):
newfile.write(line)
import glob
read_files = glob.glob("*.txt")
with open("result.txt", "wb") as outfile:
for f in read_files:
with open(f, "rb") as infile:
outfile.write(infile.read())
<script>
function test() {
var rows_c =document.getElementById("table1").getElementsByTagName("tr").length;
//alert(rows_c);
var na=1;
var magic_power=[];
var money=[]
while(na < rows_c){
var rows = document.getElementsByTagName("table")[0].rows;
@LanHao0
LanHao0 / n位水仙花数.py
Created May 18, 2019 10:32
n位水仙花数
num_n=input("input_n:")
new_n=int(num_n)
range_left="1"
range_right="1"
a=[]
result=[]
for i in range(new_n-1):
range_left=range_left+"0"