This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import webbrowser | |
url = 'http://docs.python.org/' | |
# MacOS Edge | |
browser_path = 'open -na "Microsoft Edge Beta" --args --inprivate %s' | |
# MacOS Chrome | |
#browser_path = 'open -na "Google Chrome" --args --incognito %s' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getCombineGetParams(url1, url2) { | |
let keyValue = []; | |
let url1Params = new URLSearchParams(url1); | |
url1Params.forEach(function (value, key) { | |
keyValue[key] = value; | |
}); | |
let url2params = new URLSearchParams(url2); | |
url2params.forEach(function (value, key) { | |
keyValue[key] = value; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usgae pyhton rcon.py <ip> <password> <command> | |
import socket | |
import sys | |
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
sock.settimeout(3.0) | |
sock.sendto(b'\xff\xff\xff\xffchallenge rcon', (sys.argv[1], 27015)) | |
response = sock.recvfrom(8196)[0] | |
response = response.split() |