shadowSocks 从 gwflist更新 PAC 时404
问题:MacOS下ShadowsocksX点击“从GFWList更新PAC”报“Request failed : not found(404)”错误。 查看了 github 的 issue,发现是新问题,但是已经有大神解决了,解决方案如下。 下面是大神的 shell 代码,果断观摩之:
| #!/usr/bin/python | |
| #coding:utf-8 | |
| ''' | |
| @author:Byron | |
| 新浪微博:http://weibo.com/ziyuetk | |
| ''' | |
| import urllib2, json | |
| from city import city | |
| yourcity = raw_input("你想查那个城市的天气?") |
| --- CCDevice.mm (revision 6) | |
| +++ CCDevice.mm (working copy) | |
| @@ -102,11 +102,12 @@ | |
| - (void)accelerometer:(CMAccelerometerData *)accelerometerData | |
| { | |
| - _acceleration->x = accelerometerData.acceleration.x; | |
| - _acceleration->y = accelerometerData.acceleration.y; | |
| - _acceleration->z = accelerometerData.acceleration.z; | |
| - _acceleration->timestamp = accelerometerData.timestamp; |
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import sys | |
| import requests | |
| from bs4 import BeautifulSoup | |
| import codecs | |
| import string | |
| import random | |
| import re | |
| import getpass |
| var readline = require('readline'), | |
| fs = require('fs'); | |
| var LinkMap = function(filePath) { | |
| this.files = [] | |
| this.filePath = filePath | |
| } | |
| LinkMap.prototype = { | |
| start: function(cb) { |
| NSURL *url = [NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]; | |
| if ([[UIApplication sharedApplication] canOpenURL:url]) | |
| { | |
| [[UIApplication sharedApplication] openURL:url]; | |
| } | |
| About — prefs:root=General&path=About | |
| Accessibility — prefs:root=General&path=ACCESSIBILITY | |
| Airplane Mode On — prefs:root=AIRPLANE_MODE |
| static const int target_key; | |
| @implementation UIGestureRecognizer (Block) | |
| +(instancetype)nvm_gestureRecognizerWithActionBlock:(NVMGestureBlock)block { | |
| return [[self alloc]initWithActionBlock:block]; | |
| } | |
| - (instancetype)initWithActionBlock:(NVMGestureBlock)block { | |
| self = [self init]; | |
| [self addActionBlock:block]; |
| void Swizzle(Class c, SEL orig, SEL new) { | |
| Method origMethod = class_getInstanceMethod(c, orig); | |
| Method newMethod = class_getInstanceMethod(c, new); | |
| if (class_addMethod(c, orig, method_getImplementation(newMethod), method_getTypeEncoding(newMethod))){ | |
| class_replaceMethod(c, new, method_getImplementation(origMethod), method_getTypeEncoding(origMethod)); | |
| } else { | |
| method_exchangeImplementations(origMethod, newMethod); | |
| } | |
| } |
| #!/bin/bash | |
| # update_gfwlist.sh | |
| # Author : VincentSit | |
| # Copyright (c) http://xuexuefeng.com | |
| # | |
| # Example usage | |
| # | |
| # ./whatever-you-name-this.sh | |
| # | |
| # Task Scheduling (Optional) |
shadowSocks 从 gwflist更新 PAC 时404
问题:MacOS下ShadowsocksX点击“从GFWList更新PAC”报“Request failed : not found(404)”错误。 查看了 github 的 issue,发现是新问题,但是已经有大神解决了,解决方案如下。 下面是大神的 shell 代码,果断观摩之:
| var CryptoJS = require('crypto-js') | |
| var request = require('request-promise') | |
| /* | |
| * npm install crypto-js request-promise request | |
| * node wx_t1t_hack.js | |
| */ | |
| // export function testEncription(msg, fullKey) { | |
| // var fullKey = fullKey.slice(0, 16) |