Skip to content

Instantly share code, notes, and snippets.

@GerrieWell
Last active February 24, 2017 07:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GerrieWell/6caf08ee84517e663f791b8d62399a64 to your computer and use it in GitHub Desktop.
Save GerrieWell/6caf08ee84517e663f791b8d62399a64 to your computer and use it in GitHub Desktop.
gfwlist_convertToSS.md
if __name__ == '__main__':
	f = open("./gfwlist20170118.js","rb");
	dest = open("./gfwlist_update.js","wb");
	while 1:
		line = f.readline();
		if not line:
			break;
		str = ""
		if line[0] =='!' :
			continue;
		str += '"'
		for c in line:
			if c == '/' :
				str+="\/" ;
			else:
				if c != '\n':
					str+=c ;
		str += '",\n'
		dest.write(str);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment