Skip to content

Instantly share code, notes, and snippets.

@tesths
tesths / gist:7e79113772a8413fdbf927fe8e21ca68
Created August 31, 2024 02:22 — forked from parano/gist:1868242
Excel表格密码保护的解除方法
表格受密码保护时,我们修改数据Excel弹出“您试图更改的单元格或图表受保护,因而是只读的。
若要修改受保护单元格或图表,请先使用‘撤消工作表保护’命令(在‘审阅’选项卡的‘更改’组中)来取消保护。
可能会提示输入密码。这时候我们可以用VBA宏代码破解法来破解表格保护密码:
第一步:打开该文件,先解除默认的“宏禁用”状态,方法是点击工具栏下的“选项”状态按钮,
打开“Microsoft Office安全选项”窗口,选择其中的“启用此内容”,“确定”
再切换到“视图”选项卡,点击“宏”→“录制宏”,出现“录制新宏”窗口,在“宏名”定义一个名称为:
PasswordBreaker,点击“确定”退出;
第二步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“编辑”,
打开“Microsoft Visual Basic”编辑器,用如下内容替换右侧窗口中的所有代码:
@tesths
tesths / msoWord_SplitPages.vbs
Last active May 17, 2021 00:55 — forked from wangye/msoWord_SplitPages.vbs
VBScript/VBS/VBA split single word document to multi-documents by pages
'
' Description: VBScript/VBS/VBA
' split single word document
' to multi-documents by pages
' Author: wangye <pcn88 at hotmail dot com>
' Website: http://wangye.org
' Copyright by author
'
Const PrevPage = 0
Const NextPage = 1
import io, sys, time, re, os
import winreg
import requests
import json
xpath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings"
def setProxy(enable,proxyIp,IgnoreIp):
try:
key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, xpath, 0, winreg.KEY_WRITE)
@tesths
tesths / bilibili
Created June 29, 2019 08:00
bilibili
{"_id":"bilibili","startUrl":["https://www.bilibili.com/ranking/all/0/0/3"],"selectors":[{"id":"element","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"li.rank-item","multiple":true,"delay":"2000","clickElementSelector":".rank-tab li","clickType":"clickOnce","discardInitialElements":"do-not-discard","clickElementUniquenessType":"uniqueText"},{"id":"title","type":"SelectorLink","parentSelectors":["element"],"selector":"a.title","multiple":false,"delay":0},{"id":"play","type":"SelectorText","parentSelectors":["element"],"selector":".detail > span:nth-of-type(1)","multiple":false,"regex":"","delay":0},{"id":"comment","type":"SelectorText","parentSelectors":["element"],"selector":"span:nth-of-type(2)","multiple":false,"regex":"","delay":0},{"id":"source","type":"SelectorText","parentSelectors":["element"],"selector":"a span","multiple":false,"regex":"","delay":0},{"id":"grade","type":"SelectorText","parentSelectors":["element"],"selector":".pts div","multiple":false,"regex":"","delay":0},{"
@tesths
tesths / bash.sh
Created February 13, 2019 13:31
frp 配置文件
nohup ./frps -c ./frps.ini > frp.txt 2>&1 &
@tesths
tesths / sana.json
Created November 16, 2018 12:29
SanaChina961229 Web Scraper
{
"_id": "weibo",
"startUrl": [
"https://weibo.com/SanaChina961229?is_search=0&visible=0&is_all=1&is_tag=0&profile_ftype=1&page=[1-2]"
],
"selectors": [
{
"id": "real-content",
"type": "SelectorElementScroll",
"parentSelectors": [
@tesths
tesths / weibo.json
Created November 14, 2018 02:47
web scraper 爬虫
{
"_id": "weibo",
"startUrl": [
"https://weibo.com/SanaChina961229?is_search=0&visible=0&is_all=1&is_tag=0&profile_ftype=1&page=[501-588]"
],
"selectors": [
{
"id": "real-content",
"type": "SelectorElementScroll",
"parentSelectors": [
@tesths
tesths / gongzhonghao.json
Last active November 14, 2018 02:47
web scraper 公众号爬虫
{
"_id": "gongzhonghao",
"startUrl": [
"https:AAA"
],
"selectors": [
{
"id": "total",
"type": "SelectorElementScroll",
"parentSelectors": [
@tesths
tesths / story.rb
Created August 6, 2018 08:26
instagram story download
require 'httparty'
response = HTTParty.get('https://www.instagram.com/xx/', timeout: 60)
response = response.scan(/window._sharedData = (.*?);/)[0][0]
json = JSON.parse(response)
user_id = json['entry_data']['ProfilePage'][0]['graphql']['user']['id']
puts user_id
url = 'https://i.instagram.com/api/v1/feed/user/' + user_id + '/reel_media/'
require 'json'
require 'httparty'
require 'telegram/bot'
require 'byebug'
def request_ins
begin
puts "request start at " + Time.now.to_s
response = HTTParty.get('https://www.instagram.com/twicetagram/', timeout: 60)