Skip to content

Commit

Permalink
SteamAutoFriend v1.2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
pebnn committed Aug 16, 2022
1 parent 2c92fad commit 025d1ed
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions SteamAutoFriend.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import zipfile
from chromedriver_version import chromedriver_versions

version = "1.2.8"
version = "1.2.9"
# Disable clutter in console (SET DEBUG TO TRUE TO VIEW POTENTIAL ERRORS)
debug = False
if debug == False:
Expand Down Expand Up @@ -114,7 +114,7 @@ def getUptime():
session = open("session.txt", "a") # Create session.txt if it doesnt exist
session.close()
info = "# If you enable remember_login in config.yml your username and password will be stored here as an encrypted string.\n" \
"# This allows SteamAutoFriend to automatically log you in when you start the program. (do not edit this file, delete it if login fails)"
"# This allows SteamAutoFriend to automatically log you in when you start the program. (do not edit this file, delete the file if login fails)"
session = open("session.txt", "r") # Open session.txt as readable
password_encrypted = cryptocode.encrypt(username + " " + password, hwid)
lines = info + "\n\n" + password_encrypted # Set values for session.txt
Expand Down Expand Up @@ -181,11 +181,14 @@ def getUptime():
elif steamguard != "Y" or steamguard != "YES":
pass

if account[0].isnumeric() and len(account[0]) > 16:
steamurl = "https://steamcommunity.com/profiles/"
else:
# custom url
steamurl = "https://steamcommunity.com/id/"
try:
if account[0].isnumeric() and len(account[0]) > 16:
steamurl = "https://steamcommunity.com/profiles/"
else:
# custom url
steamurl = "https://steamcommunity.com/id/"
except:
print("Error! You need to input at least one account ID.")

fakefriend = steamurl + account[0]
url = "https://steamcommunity.com/login/home"
Expand All @@ -195,13 +198,21 @@ def getUptime():
chrome_dir = []
# Get current Chrome version number
if auto_chromedriver == True:

# Find and scan Chrome Applications folder for version number
try:
for folder in os.scandir("C:\Program Files (x86)\Google\Chrome\Application"):
chrome_dir.append(folder)
try:
for folder in os.scandir("C:\Program Files (x86)\Google\Chrome\Application"):
chrome_dir.append(folder)
except:
for folder in os.scandir("C:\Program Files\Google\Chrome\Application"):
chrome_dir.append(folder)
except:
for folder in os.scandir("C:\Program Files\Google\Chrome\Application"):
custom_dir = input("Enter your Google Chrome install directory (example: C:\Program Files\Google\Chrome): ") + "\Application"
for folder in os.scandir(custom_dir):
chrome_dir.append(folder)


for folder in chrome_dir:
folder = folder.name
folder_fragment = str(folder[0 : 2])
Expand Down Expand Up @@ -317,14 +328,15 @@ def find_by_css(selector, text=''):
uptime_minutes = getUptime() // 60
uptime_hours = uptime_minutes // 60
uptime = "%02d:%02d" % (uptime_hours, uptime_minutes % 60)
os.system("title SteamAutoFriend v1.2.8" + " by pebnn - Uptime: " + str(uptime))
os.system("title SteamAutoFriend v1.2.9 by pebnn - Uptime: " + str(uptime))

if count > clear_console and clear_console_enable == True: # Clear console lines after set amount of lines has been printed (clear_console is set in config.yml)
try:
os.system("cls")
except:
os.system("clear") # run Linux clear command instead of Windows "cls" if OS is Linux based.
count = 0
Logo()
print("Console cleaned.")
if clear_console_enable == True:
count += 1
Expand Down

1 comment on commit 025d1ed

@pebnn
Copy link
Owner Author

@pebnn pebnn commented on 025d1ed Aug 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.2.9

  • Fixed crash caused if Twofactor input screen loads slowly, causing the script to send the key to a non-existing input box.
  • Added option to enter custom Google Chrome install directory directions for Chromedriver version detection.

Please sign in to comment.