mirror of
https://github.com/DarkSecDevelopers/HiddenEye-Legacy.git
synced 2024-03-22 21:12:55 +08:00
d44f240fe4
New - Defs packages New - Packages structured project New - SocialFish was replaced by HiddenEye
24 lines
694 B
Python
24 lines
694 B
Python
#Primitive config works
|
|
import configparser
|
|
import os
|
|
|
|
def createConfig(path = "Settings.ini"):
|
|
config = configparser.ConfigParser()
|
|
config.add_section("Settings")
|
|
config.add_section("Defaults")
|
|
config.set("Settings", "Language", "en")
|
|
config.set("Settings", "DidBackground", "True")
|
|
config.set("Defaults", "webPage", "Facebook")
|
|
config.set("Defaults", "additionalOption", "1")
|
|
with open(path, 'w') as configFile:
|
|
config.write(configFile)
|
|
|
|
def readConfig(path = "Settings.ini"):
|
|
config = configparser.ConfigParser()
|
|
config.read(path)
|
|
return config
|
|
|
|
def ifSettingsNotExists():
|
|
if not os.path.exists("Settings.ini"):
|
|
createConfig()
|