boxmoe_header_banner_img

いらっしゃい
しゅかしゅかしゅ's Blog

文章导读

ASF in Ubuntu


avatar
Yu_Takasaki 2022年6月11日 4.64k

在服务器上挂卡/刷时长

提取自台部落“SkYe231”的文章,由于文章已被删除,故使用Google网页快照功能还原

附加参考废纸时雨
Mogeko’s Blog


Ubuntu 20
主机配置为 1C1G
ASF 搭建版本:V5.2.6.3

下载 ASF

从 ASF V3 开始 .Net SDK 不是必须要安装,已经集成,所以直接下载安装 ASF (本文默认在 /root 目录下安装)。最新版下载链接请到这里找,大部分用户下载Latest版本就好,Pre-release测试版可能有很多问题。

# 创建文件夹
mkdir asf && cd asf
# 下载压缩包(5.2.6.3可以换成最新的版本号)
wget https://github.com/JustArchiNET/ArchiSteamFarm/releases/download/5.2.6.3/ASF-linux-x64.zip
# 解压(没有unzip的:apt install unzip -y)
unzip ASF-linux-x64.zip
# 权限
chmod +x ArchiSteamFarm

生成 ASF 程序配置文件

使用在线网站生成,选择 ASF 选项并根据下面提示选择性填写内容,可根据个人需求自行调整,各个参数介绍看Wiki。

XcjUmV.png

SteamOwnerID:64 位 SteamID,到这里登录后获取。

CurrentCulture:zh-CN

IPC:√

IPCPassword:password(自行设置)

其他选项使用默认,下载配置文件 ASF.config 到本地,通过 finalshell (宝塔的文件功能都行)等工具上传 ASF.config 到服务器的 /asf/config 目录下。

生成 steam 帐号配置文件(ASF Bot 配置文件)

使用在线网站(还是上面那个)生成,选择 机器人 选项并根据下面提示选择性填写内容,可根据个人需求自行调整,各个参数介绍看Wiki。

XcjcOx.png

name:test(机器人名=配置文件名)

SteamLogin :steam帐号名

SteamPassword:steam帐号密码

enable:√

其他选项使用默认,下载配置文件 test.config 到本地,通过 finalshell 等工具上传 test.config 到服务器的 /asf/config 目录下。

运行程序

在 asf 目录下执行:

./ArchiSteamFarm

按照提示输入验证码即可。如果想访问 WEB 界面还需要一些设置,为 Asf-ui 绑定域名

网页端效果:

XcvKj1.png

进阶设置

保持后台运行
Screen

安装 screen
apt install screen -y
创建一个名为 asf 的窗口,并在其中执行程序。
screen -S asfcd /home/asf./ArchiSteamFarm

按 Ctrl+A+D 搁置窗口,程序已经在后台运行了,可以放心退出终端了。

Systemd(推荐)

安装 systemd
apt install systemd
创建 service 文件
vi /etc/systemd/system/asf.service
输入以下内容并保存(我也不知道为什么中间非得空一行,我写的时候只换了一行)
[Unit]
Description=Archi Steam Farm
After=network.target

[Service]
Type=simple
User=root
EnvironmentFile=/etc/environment
Environment=””
ExecStart=/root/asf/ArchiSteamFarm
Restart=always
RestartSec=15s

[Install]
WantedBy=multi-user.target

现在可以运行了。

service asf start  # 开始运行挂卡
service asf stop # 停止运行
service asf status # 查看服务状态

ASF进阶使用:在ASF网页中登录有两步验证的Steam帐号

链接按钮

steam 两步验证

这一步我没做

不可能在挂卡平台每次都手动输入密钥,这也太蠢了。那么我们就需要将令牌导入到 ASF 中,以实现自动登录。各个平台操作不同,详情请见官方 WIKI。

安卓设备的方法如下:

手机 root
首先,你需要有系统的 root 权限,这个不多说,每个设备都有所不同。

提取令牌文件
安装一个能够访问系统根目录的文件管理器,如 ES 文件浏览器。

将文件 /data/data/com.valvesoftware.android.steam.community/files/Steamguard-XXX 复制出来,XXX 是你的 SteamID。重命名为 BotName.maFile 并放置到 /home/asf/config 目录下,程序会自动检测并读取。如我的 bot 名字为 test,则重命名为 test.maFile。

提取设备 ID
将文件 /data/data/com.valvesoftware.android.steam.community/shared_prefs/steam.uuid.xml 打开,找到如 android:XXXXXXXXXXXXXXXX 字样,这就是你的设备 ID,注意保存。

输入设备 ID
导入好令牌文件以后,首次启动,将会看到如下字样。

[*] INFO: ImportAuthenticator() <1> Converting .maFile into ASF format…
<1> Please enter your Device ID (including “android:”):
这时输入你的设备 ID,连 android: 字样一起输入,回车。看到如下字样,表示你已经完成,以后启动就不再需要输入了,会自动登录。

[*] INFO: ImportAuthenticator() <1> Successfully finished importing mobile authenticator!
注意事项
注意:为了你的 steam 账号安全,切勿暴露你的令牌文件和设备 ID。拥有这些内容,将能任意变更你的账户。

用 Telegram 远程控制 ASF 挂卡

这步我也没做

提供给有需求的人,要求主机上 python 版本至少为 3.6。

向 Telegram 申请 bot token
在 Telegram 里,搜索 @BotFather 机器人并启用。

发送以下命令:

创建机器人:/newbot
设定 bot 名称:ASF(任取,可重复,这里只是个例子)
设定 bot 用户名:test_asf_bot(任取,不可重复,这里只是个例子)
@BotFather 会发给你一串 token,形如 123456789:XXXXXX-XXXXXXXXXX,注意保留。

申请 Chat ID
在 Telegram 里,搜索 @getidsbot 机器人并启用。

转发一条你自己的消息给 bot,会返回给你一串信息,里面包含你的 Chat ID 。

安装 telegram_bot_asf
请确保 python 版本正确

git clone https://github.com/deluxghost/telegram-asf.git
cd telegram-asf
sudo pip3 install -r requirements.txt
编辑 simple.config,修改如下内容。

[telegram]
bot_token = 你的机器人token
admin_id = 你的chatid
;proxy = socks5://127.0.0.1:1234

[ipc]
address = http://127.0.0.1:1242/
password = 你设置的IPCPassword
后台启动 bot
screen -S asf-bot python3 simple.py simple.conf
在 Telegram 中使用这个 bot
搜索刚刚你设定的 bot 用户名,并启用,你已经可以发送命令远程控制 ASF 了。这个机器人只有你能使用。

常见命令
帮助命令:help

开始命令:start

暂停命令:pause

继续命令:resume

查看挂卡状态命令:status

查看 asf 状态命令:stats

查看版本命令:version

激活 steam 密钥命令:redeem

更多命令,请参官方 WIKI。

挂完卡之后挂时长

Steam[ASF]挂卡(挂游戏时间)纯新手教学

XgImFI.png



评论(416)

查看评论列表
评论头像
Tahesrhiva 2025年07月27日
After testing several casino guides, I discovered the most comprehensive analysis of Netbet casino, highlighting why it's truly the best choice for Greek players. Check out this detailed review on online casino Netbet via the link you'll find below: <a href="https://www.maragocaffe.com/casino-netbet-21/" / rel="nofollow ugc">https://www.maragocaffe.com/casino-netbet-21/</a>
评论头像
hanaflyvn 2025年07月27日
I have read so many content about the blogger lovers but this paragraph is genuinely a fastidious piece of writing, keep it up.
评论头像
19dewa 2025年07月27日
19Dewa adalah tempat ngopi nyaman dengan pilihan kopi terlengkap dan layanan care 24 jam. Kami berkomitmen memberikan pengalaman terbaik bagi para peserta yang ingin menikmati kopi kapan saja dengan suasana hangat dan ramah
评论头像
ดูการ์ตูน 2025年07月27日
We're a group of volunteers and opening a new scheme in our community. Your web site offered us with valuable info to work on. You have done an impressive job and our entire community will be thankful to you.
评论头像
RichardJex 2025年07月27日
<a href="https://mdigadynamics.co.za" rel="nofollow ugc">Мега онион</a>
评论头像
zborakul01 2025年07月27日
I relish, result in I discovered exactly what I used to be looking for. You've ended my four day lengthy hunt! God Bless you man. Have a nice day. Bye my web-site; <a href="http://zborakul01.com" rel="nofollow ugc">zborakul01</a>
评论头像
togel online 2025年07月27日
Appreciate the recommendation. Will try it out.
评论头像
borrow money 2025年07月27日
We have been helping Canadians Borrow Money Against Their Car Title Since March 2009 and are among the very few Completely Online Lenders in Canada. With us you can obtain a Loan Online from anywhere in Canada as long as you have a Fully Paid Off Vehicle that is 8 Years old or newer. We look forward to meeting all your financial needs.
评论头像
situs toto 2025年07月27日
This is a topic which is close to my heart... Cheers! Exactly where are your contact details though?
评论头像
free slots 2025年07月27日
Thankfulness to my father who shared with me regarding this blog, this blog is in fact amazing.
评论头像
RichardJex 2025年07月27日
<a href="https://mdigadynamics.co.za" rel="nofollow ugc">Mega darknet</a>
评论头像
I am not certain the place you're getting your information, but great topic. I needs to spend a while studying much more or understanding more. Thank you for magnificent info I was in search of this information for my mission.
评论头像
parallels desktop破解版 2025年07月27日
Hello there! Do you know if they make any plugins to assist with SEO? I'm trying to get my blog to rank for some targeted keywords but I'm not seeing very good success. If you know of any please share. Many thanks!
评论头像
zborakul01 2025年07月27日
This article is genuinely a nice one it helps new web viewers, who are wishing for blogging. Feel free to visit my blog - <a href="http://zborakul01.com" rel="nofollow ugc">zborakul01</a>
评论头像
NelavedSpene 2025年07月27日
Ищете изготовление металлоконструкций и изделий в Иркутске? Посетите <a href="https://azmk38.ru/" / rel="nofollow ugc">https://azmk38.ru/</a> - мы работаем с конструкциями любой сложности! Ознакомьтесь на сайте с нашими услугами: производство металлоконструкций, проектирование и разработка КМД, сварочные работы, плазменная и лазерная резка, гибка металла и многое другое. У нас выгодные цены! Подробнее на сайте.
评论头像
RichardJex 2025年07月27日
<a href="https://norrlandsjord.se" rel="nofollow ugc">Mega darknet</a>


发表评论

表情 颜文字
插入代码

Welcome

咻咔咻咔咻‘s Blog

咻咔咻咔咻‘s Blog