mirror of
https://github.com/frozenpandaman/s3s.git
synced 2026-09-29 04:36:33 -05:00
add guards for directly-executed modules (#37)
Co-authored-by: eli fessler <eliwf8@gmail.com>
This commit is contained in:
9
iksm.py
9
iksm.py
@@ -2,8 +2,8 @@
|
||||
# https://github.com/frozenpandaman/s3s
|
||||
# License: GPLv3
|
||||
|
||||
import requests, json, re, sys
|
||||
import os, base64, hashlib
|
||||
import base64, hashlib, json, os, re, sys
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
session = requests.Session()
|
||||
@@ -379,3 +379,8 @@ def enter_tokens():
|
||||
new_bullettoken = input("Invalid token - length should be 124 characters. Try again.\nEnter your bulletToken: ")
|
||||
|
||||
return new_gtoken, new_bullettoken
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("This program cannot be run alone. See https://github.com/frozenpandaman/s3s")
|
||||
sys.exit(0)
|
||||
|
||||
8
utils.py
8
utils.py
@@ -2,7 +2,8 @@
|
||||
# https://github.com/frozenpandaman/s3s
|
||||
# License: GPLv3
|
||||
|
||||
import base64, datetime, json, re, requests, uuid
|
||||
import base64, datetime, json, re, sys, uuid
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
SPLATNET3_URL = "https://api.lp1.av5ja.srv.nintendo.net"
|
||||
@@ -103,3 +104,8 @@ def custom_key_exists(key, config_data, value=True):
|
||||
if key not in ["ignore_private", "app_user_agent", "force_uploads"]:
|
||||
print("(!) Checking unexpected custom key")
|
||||
return True if key in config_data and config_data[key].lower() == str(value).lower() else False
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("This program cannot be run alone. See https://github.com/frozenpandaman/s3s")
|
||||
sys.exit(0)
|
||||
|
||||
Reference in New Issue
Block a user