Repository: BeepIsla/csgo-commend-bot
Branch: master
Commit: f2cf1a898654
Files: 18
Total size: 126.4 KB
Directory structure:
gitextract_ou5_ua01/
├── .github/
│ └── ISSUE_TEMPLATE/
│ ├── bug_report.md
│ └── question.md
├── .gitignore
├── .gitmodules
├── CHANGELOG.md
├── LICENSE
├── README.md
├── config.json.example
├── databaseManager.js
├── helpers/
│ ├── Bots.js
│ ├── GameCoordinator.js
│ ├── Helper.js
│ ├── Protos.js
│ ├── Target.js
│ ├── VDF.js
│ └── account.js
├── index.js
└── package.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Detailed bug description**
A clear and concise description of what the bug is.
**Error**
```
A full error log or screenshot.
```
**Config**
```
Your "config.json" - Censor your API Key and account details
```
**Version**
- NodeJS: `vXX.XX.X` (You can find this using `node -v`)
- Script version: `X.X.X` (You can find this in **your** `package.json` file under `version`)
**Additional information**
Add any other potentially useful information about your issue here.
================================================
FILE: .github/ISSUE_TEMPLATE/question.md
================================================
---
name: Question
about: Use this template if you have a question
title: ''
labels: ''
assignees: ''
---
**Detailed question description**
A clear and concise description of your question.
**Config**
```
Your "config.json" - Censor your API Key and account details
```
**Version**
- NodeJS: `vXX.XX.X` (You can find this using `node -v`)
- Script version: `X.X.X` (You can find this in **your** `package.json` file under `version`)
================================================
FILE: .gitignore
================================================
.vscode
node_modules
data
accounts.json
config.json
test*.js
accounts*.sqlite
test*.txt
proxies*
debug
================================================
FILE: .gitmodules
================================================
[submodule "protobufs"]
path = protobufs
url = https://github.com/SteamDatabase/Protobufs.git
================================================
FILE: CHANGELOG.md
================================================
# Changelog
## 2.10.0
- Added optional config option `protocol` to force a specific connection protocol ([#537](https://github.com/BeepIsla/csgo-commend-bot/issues/537))
## 2.9.0
- Potentially fixed commend bot freezing & erroring with "UnhandledPromiseRejection" ([#496](https://github.com/BeepIsla/csgo-commend-bot/issues/496))
- Added option to remove all accounts from the database without removing commend history ([#491](https://github.com/BeepIsla/csgo-commend-bot/issues/491))
- Added report bot option to wait until Valve Matchmaking game has ended before reporting ([#499](https://github.com/BeepIsla/csgo-commend-bot/issues/499))
## 2.8.4
- Fix [#477](https://github.com/BeepIsla/csgo-commend-bot/issues/477)
## 2.8.3
- Small display change to how commends are displayed when using `showCommends`
- Changed preloading to simply commend twice
- Fixes chunk count being wrong sometimes
- Fixes duplicate entries in database
## 2.8.2
- Fix database manager
## 2.8.1
- Preloading now waits much shorter before rejecting when commending/reporting
- Added commend display option
- `showCommends` in your `config.json`, set this to `true` to see commends at the start and end of the process, as well as the difference
- **Enabling this requires a fetcher account**
## 2.8.0
- Re-added ServerID, MatchID and Fetcher
- Updated all libraries to their latest version
- Improved protobuf checker
- Fixed commend bot
- Probably still **does not** work on Competitive/Wingman
- Thanks [inbroso](https://github.com/inbroso)
## 2.7.1
- Increased authorization timeout from 5 to 20 seconds
- Increased deauthorization timeout from 1 to 5 seconds
- More internal code changes
- Better error handling
## 2.7.0
- Removed ServerID
- Removed MatchID
- Removed fetcher
- Updated libraries
- Internal code changes
## 2.6.1
- Fixed commend/report bot
- No longer works on Competitive and Wingman
- More handling and error messages for this will be added soon
- `LOGIN` method might no longer work correctly
- Thanks [PixLSteam](https://github.com/PixLSteam) & [Amerrrrr](https://github.com/Amerrrrr)
- Smaller internal changes
## 2.6.0
- Added automatic server switcher
- **This only works for `LOGIN` method**
## 2.5.3
- Removed abusive voice reports
- Voice and Text abuse is now combined in `abusive` - [Read CSGO's Blog Post for more information](https://blog.counter-strike.net/index.php/2020/02/28450/)
- *While its technically still possible to report for voice abuse it is now unused*
## 2.5.2
- Fixed automatic protobuf downloader not working
## 2.5.1
- Added `databaseManager` option to set operational status
- Use this if an account has been marked as invalid without resetting commend history
## 2.5.0
- Fix automatic protobuf downloading not working
- Lower RAM usage for each worker process
- Should also increase speed a little bit
- Protobufs are now compiled once per worker instead of once per account
- Potentially fix issue with `LOGIN` method - [#206](https://github.com/BeepIsla/csgo-commend-bot/issues/206)
- Add second method for checking for a VAC ban
- Mark game banned accounts as invalid
## 2.4.7
- Added option to skip update checks
- Set `disableUpdateCheck` to `true` in your config to skip update checks
## 2.4.6
- Fixed `Account Disabled` error code not marking account as invalid
## 2.4.5
- Added advanced config error logging to database manager
- Proxies now wrap around (Allowing for 40 commends per 5 minutes with 2 proxies for example)
- Fixed a typo
## 2.4.4
- Fix a maximum call stack size exceeded error
- Ensure match ID is always valid
## 2.4.3
- Improve error logging
- Handle errors which do not happen during login
- Reduce Valve server ID timeout
- Fix process not exiting in some situation
## 2.4.2
- Added Valve server ID fetcher - Thanks [@ZOODEN](http://github.com/ZOODEN)
- [Read More](./README.md#server-id--match-id)
## 2.4.1
- Fix report bot
## 2.4.0
- Added proxy support - Thanks [@UnbreakCode](http://github.com/UnbreakCode)
- [Read More](./README.md#proxies)
## 2.3.0
- Removed check whether or not server is full
- Added report functionality back
- Set `type` in the config to `REPORT`
- Added auto matchID (**Requires fetcher**)
- Set `matchID` to `auto` to use
- Only works on Valve Matchmaking servers
## 2.2.6
- Fix process being stuck on some occasions ([#147](https://github.com/BeepIsla/csgo-commend-bot/issues/147))
## 2.2.5
- Fixed error logging
## 2.2.4
- Do not allow full servers to be used ([#76](https://github.com/BeepIsla/csgo-commend-bot/issues/76))
- Error on VAC banned accounts ([#100](https://github.com/BeepIsla/csgo-commend-bot/issues/100))
## 2.2.3
- Handle response code 2 (Already commended)
## 2.2.2
- Fix logging bug
## 2.2.1
- Fix automatic Server ID finder now working
## 2.2.0
- Changed commending system to use numbers instead of boolean
## 2.1.0
- Added automatic Server ID finder
## 2.0.0
- Commend bot has been rewritten
================================================
FILE: LICENSE
================================================
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
================================================
FILE: README.md
================================================
# CSGO Commend Bot
Allows you to send commends and reports for CSGO, though commend botting is the focus of it and reporting is just a little side thing.
*Note: Even though I have implemented a report bot I still believe they are fixed. - [**Read More**](#why-i-think-report-bots-are-fixed)*
**Please view the [Changelog](./CHANGELOG.md) for a list of changes.**
**Please read the README in its entirety before coming to me asking for help.**
**[Frequently Asked Questions](#frequently-asked-questions)**
---
# Requirements
- [NodeJS **v12**](https://nodejs.org/dist/v12.9.1/) - You will likely need `node-v12.9.1-x64.msi`
- [Little bit of JSON knowledge](https://www.json.org/)
# Installation
1. Download this repository
2. Open a command prompt *inside* the folder
3. Enter `npm ci`
4. Rename `config.json.example` to `config.json` and adjust it ([See below](#config))
5. Add accounts using the [Database Manager](#database-manager)
6. Run `node index.js`
# Updating
Following the installation steps from `1` to `4` and simply override all files. **NEVER DELETE YOUR `accounts.sqlite` IT STORES ALL IMPORTANT INFORMATION - NOT ONLY ACCOUNT DETAILS**
# Config
Some values are not always used:
- Using type `COMMEND` the entire `report` section is ignored
- Using type `REPORT` the entire `commend` section is ignored
- Using `auto` in `serverID` or `matchID` will **require** an account to be entered in the `fetcher` section
- Using method `LOGIN` ignored the entire `report`, `fetcher`, `serverID`, and `matchID` section but will **require** you to enter an account in the `account` section, other way around for using the `SERVER` method
- A `steamWebAPIKey` is **always** required, it doesn't matter which key you use
Explanation of each value:
- commend:
- friendly `Number`: Amount of commends you want to send as friendly
- teaching `Number`: Amount of commends you want to send as teaching
- leader `Number`: Amount of commends you want to send as leader
- report:
- aimbot `Number`: Amount of reports you want to send as aimbotting
- wallhack `Number`: Amount of reports you want to send as wallhacking
- speedhack `Number`: Amount of reports you want to send as other hacking
- abusive `Number`: Amount of reports you want to send as abusive communications or profile
- account:
- username `String`: Username of the account you want to boost
- password `String`: Pasword of the account you want to boost
- sharedSecret `String`: Optional shared secret if the account has two factor authentication
- fetcher:
- username `String`: Username of the account you want to use for automatically fetching `serverID`/`matchID`
- password `String`: Password of the account
- sharedSecret `String`: Optional shared secret of the account
- maxTries `Number`: Maximum amount of tries before cancelling fetching
- tryDelay `Number`: Amount of milliseconds to wait between each try
- askSteamGuard `Boolean`: Set to `true` if you want the script to ask for Steam Guard code, `false` to just error and cancel
- proxy:
- enabled `Boolean`: Whether or not proxies are suppose to be used
- file `String`: The filename you want to load proxies from (With extension like `.txt` or `.json`) - [Read More](#proxies)
- switchProxyEveryXaccounts `Number`: One proxy per X accounts
- type `String`: Define the type - Valid values are `COMMEND` & `REPORT` - [Read More](#botting-type)
- method `String`: Define the method - Valid values: `LOGIN` & `SERVER` - [Read More](#botting-method)
- target `String`: SteamID/VanityURL/ProfileURL of target
- serverID `String`: ServerID, **or** IP, **or** `auto` of the server - [Read More](#server-id-&-match-id)
- matchID `String`: Optional match ID (Use `"0"` if you don't want to use one) - [Read More](#server-id-&-match-id)
- perChunk `Number`: Will chunk all accounts into groups of `perChunk` size
- betweenChunks `Number`: Delay in milliseconds between chunks
- cooldown `Number`: Cooldown in milliseconds to not reuse accounts
- showCommends `Boolean`: Whether or not to print commends at the start and end of commending (**Enabling this requires a fetcher account**)
- autoReportOnMatchEnd `Boolean`: If enabled and target is on a Valve Matchmaking server wait until the match has ended (**Enabling this requires a fetcher account**)
- switchServerAfterChunks `Number`: **When using `LOGIN` method** switch server automatically after this many chunks have been processed
- protocol `String`: Either `Auto`, `TCP`, `WebSocket`, or `WebCompatibility` - Specify the connection protocol to use for Steam. Try changing this if you encounter `Method Not Allowed`
- steamWebAPIKey `String`: Steam Web API key from [here](https://steamcommunity.com/dev/apikey)
- disableUpdateCheck `Boolean`: Whether or not to skip update checks
# Database Manager
- `Export account list`: Export all accounts in a `username:password` format
- `List commends for user`: List **all** accounts which have commended a specific user
- `Reset commends for user`: Delete **all** commend entries from the database of a specific user (*Note: This does **not** remove commends from the target in-game. You will likely **never** have to use this*)
- `Remove account from database`: Delete a specific account from the database including commend history **\***
- `Add account(s) to database`: Add accounts to the database, import from JSON file, import from `username:password` file or manually add accounts
- `List not working accounts`: List **all** accounts which are marked as inoperational by the script
- `Remove all not working accounts`: Remove **all** accounts which have been marked as not working **\***
- `Get last commend target and time`: Retrieve the last target and time at which we commended
- `Reset Database`: Will clear out **all** content of the database, resetting it to the default
- `Exit`: Safely close database before exiting process
Simply run it via `node databaseManager.js`, use the arrow keys & enter to navigate. Read on-screen instructions for more details.
**\*** Commend history is **important**, removing it will cause the script to re-use already used accounts which will result in duplicate commends, which does not work and will therefore do nothing until commend history has been rebuilt.
# Botting Type
You can choose between two types, `COMMEND` and `REPORT`.
There isn't much to it. Commending botting is confirmed to work, report botting **is impossible to prove working** due to many factors which cannot be controlled. I believe report bots haven't worked since 2016 due to how simple it is to prevent them working. Don't try to lecture me, I don't care.
# Botting Method
You can choose between two botting methods, `LOGIN` and `SERVER`.
- `LOGIN` will log into the targets account and automatically grab a server. Fastest, easiest and most lightweight (No need to run CSGO) for personal usage
- Note: Do **not** have CSGO open while using this method
- `SERVER` will commend a target, but the target **has** to be on a valid Valve or Community server - [Read More](#server-id-&-match-id)
- Note: You **cannot** bot someone without them being on a server
# Server ID & Match ID
- The `serverID` field allows for either ServerIP, ServerID or `auto`.
- Server IP is self explanatory
- ServerID can be found by entering `status` into the console ingame.
- On a community server it will look like this: `1.37.0.1/13701 934/7508 secure [A:1:1297634312:12708]` > `[A:1:1297634312:12708]`.
- On a Valve server it will look like this: `Connected to =[A:1:3849827331:12657]:0` > `[A:1:3849827331:12657]`.
- *Make sure to **only** include the stuff between the brackets and the brackets themselves.*
- `auto` will work on any server, community server **require** the target to use `cl_join_advertise` to be `2` or higher
- **Requires** an account filled in the `fetcher` section
- Certain privacy settings may interfer with this, before reporting an issue make sure everything is set to public in your [Steam Privacy Settings](https://steamcommunity.com/my/edit/settings)
- The `matchID` field allows for either MatchID or `auto`.
- MatchID can be found at the start of a match before the accept match popup comes up `match_id=3243320471183730331` > `3243320471183730331`
- `auto` will automatically find the match ID for you
- **Requires** an account filled in the `fetcher` section
# Proxies
Proxies are simple to use, just follow the example config to set them up. Your proxy file will need to be either a JSON array with each element being one HTTP proxy *or* a plain text file with each line being one proxy. One proxy can do ~20 commends, so I recommend leaving `switchProxyEveryXaccounts` at `20`.
**ONLY HTTP proxies are supported**
JSON Example:
```JSON
[
"127.0.0.1:12345",
"127.0.0.1:67890",
"127.0.0.2:12345",
"127.0.0.2:67890"
]
```
Plain text example:
```
127.0.0.1:12345
127.0.0.1:67890
127.0.0.2:12345
127.0.0.2:67890
```
# Frequently Asked Questions
- I am getting timeout errors
- You cannot use this bot on a live Valve Competitive/Wingman match, however it does work at the end of the match when the last round ends. Otherwise just use Community Servers or Valve Casual/Deathmatch/War Games/etc. Offline with bots or local workshop maps do not work.
- Can I get banned for using this?
- Who knows, maybe, maybe not. Its unlikely but you never know. Valve usually *at most* disables the bot accounts.
- I get an error when trying `npm ci`
- As said in the README, make sure to install [**NodeJS version 12**](https://nodejs.org/dist/v12.9.1/). On Windows you will need to download the `node-v12.9.1-x64.msi`.
- How many commends can I send?
- One IP can do ~20 commends per 5 minutes
- There don't seem to be any other way to increase this, I tried modifying several things and nothing ever worked
- Its *possible* there is a server limit as well of ~150 commends. This is unconfirmed and might not be true.
- *Note: This information may be outdated*
- I get a proxy error!
- Your proxy has been banned by Steam. Search for residential proxies, and even then they might be banned.
- I get an "Failed to commend" error
- This is likely an error on your side, if it worked before and you cannot resolve the issue [look through the issue list on Github and open a new one if required](https://github.com/BeepIsla/csgo-commend-bot/issues?utf8=%E2%9C%93&q=is%3Aissue).
- The config is confusing, can you make an interface for it?
- I can but I won't. It doesn't accomplish anything and learning how this works is easy.
- Can I make an automated commend selling service with this?
- This is **not** usable on a big scale, especially when botting several people at once.
- Can you do X for me?
- No, I only work for myself.
- Can you do X for me? I pay!
- No, I don't care about money.
- I found someone who copied this and is selling it/released it without mentioning you.
- Good for them, I don't care. I have still made the accomplishment, not them.
# Why I think report bots are fixed
Lets start by saying: **None of this is confirmed, nobody knows what the truth is so these are just assumptions.**
Aside from [**Valve literally saying they are fixed**](https://www.reddit.com/r/GlobalOffensive/comments/89qk3l/i_emailed_a_valve_employee_about_csgo_and_got_a/dwtqe94/) every match (Competitive, Wingman, Danger Zone, etc) has a list of account IDs which are allowed to join/participate, so when a report gets sent all Valve has to do is check if the sender and receiver are in the same match or not.
Now you could argue why doesn't the same happen when commending or why do they give a fake response? The answer is: Community servers.
Commending must work on community servers so it is not as strict as reporting. Reporting on the other hand is completely irrelevant on community servers, there is no reason why Valve should use them especially considering community servers may give advantages to some players, so reporting simply returns a fake response.
- Is sender and receiver assigned to the same Valve match?
- Yes: Real report
- No: Is the server ID the same for sender and receiver?
- Yes: Send a fake response
- No: Do not respond at all
================================================
FILE: config.json.example
================================================
{
"commend": {
"friendly": 5,
"teaching": 10,
"leader": 15
},
"report": {
"aimbot": 10,
"wallhack": 10,
"speedhack": 10,
"teamharm": 10,
"abusive": 10
},
"account": {
"username": "",
"password": "",
"sharedSecret": ""
},
"fetcher": {
"username": "Account",
"password": "Password",
"sharedSecret": "",
"maxTries": 10,
"tryDelay": 2500,
"askSteamGuard": true
},
"proxy": {
"enabled": false,
"file": "proxies.txt",
"switchProxyEveryXaccounts": 20
},
"type": "COMMEND",
"method": "SERVER",
"target": "https://steamcommunity.com/id/gabelogannewell",
"serverID": "auto",
"matchID": "0",
"perChunk": 20,
"betweenChunks": 300000,
"cooldown": 28800000,
"showCommends": false,
"autoReportOnMatchEnd": false,
"switchServerAfterChunks": 5,
"protocol": "Auto",
"steamWebAPIKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"disableUpdateCheck": false
}
================================================
FILE: databaseManager.js
================================================
const inquirer = require("inquirer");
const sqlite = require("sqlite");
const sqlite3 = require("sqlite3");
const path = require("path");
const fs = require("fs");
const Helper = require("./helpers/Helper.js");
let config = null;
let helper = null;
(async () => {
if (!fs.existsSync("./config.json")) {
console.log("Failed to find \"config.json\". Did you rename the file to \"config.json.json\"? Make sure to Enable Windows File Extensions");
return;
}
try {
config = require(path.resolve("config.json"));
} catch (err) {
let errPosition = err.message.split(": ").pop().trim();
let match = errPosition.match(/^Unexpected (?<type>.*) in JSON at position (?<position>.*)$/i);
if (!match || isNaN(parseInt(match.groups.position))) {
console.error(err);
} else {
let configRaw = fs.readFileSync("./config.json").toString();
let part = configRaw.slice(0, parseInt(match.groups.position));
let lines = part.split("\n").map(l => l.trim()).filter(l => l.length > 0);
console.log("Failed to parse \"config.json\":\nError description: " + errPosition + "\nError on line: " + lines.length + "\nText which caused the error: " + lines.pop());
console.log("Please verify your \"config.json\" and take the \"config.json.example\" file for help")
}
return;
}
helper = new Helper(config.steamWebAPIKey);
console.log("Opening database...");
let db = await sqlite.open({
filename: "./accounts.sqlite",
driver: sqlite3.Database
});
await Promise.all([
db.run("CREATE TABLE IF NOT EXISTS \"accounts\" (\"username\" TEXT NOT NULL UNIQUE, \"password\" TEXT NOT NULL, \"sharedSecret\" TEXT, \"lastCommend\" INTEGER NOT NULL DEFAULT -1, \"operational\" NUMERIC NOT NULL DEFAULT 1, PRIMARY KEY(\"username\"))"),
db.run("CREATE TABLE IF NOT EXISTS \"commended\" (\"username\" TEXT NOT NULL REFERENCES accounts(username), \"commended\" INTEGER NOT NULL, \"timestamp\" INTEGER NOT NULL)")
]);
(async function askInput() {
console.log("");
let r = await inquirer.prompt({
type: "list",
name: "response",
message: "What would you like to do?",
pageSize: 11,
choices: [
"Export account list",
"List commends for user",
"Reset commends for user",
"Remove account from database",
"Add account(s) to database",
"List not working accounts",
"Remove all not working accounts",
"Get last commend target and time",
"Set account operational",
"Remove all accounts - No history reset",
"Reset Database",
"Exit"
]
});
switch (r.response) {
case "Remove all accounts - No history reset": {
let confirm = await inquirer.prompt({
type: "confirm",
name: "confirm",
message: "Are you sure you want to remove ALL accounts from the database? Commend history will NOT be removed"
});
if (!confirm.confirm) {
break;
}
let data = await db.run("DELETE FROM accounts");
console.log("Successfully dropped " + data[0].changes + " account entries");
break;
}
case "Set account operational": {
let input = await inquirer.prompt({
type: "input",
name: "username",
message: "Enter username you want to set as operational"
});
let data = await db.run("UPDATE accounts SET operational = 1 WHERE username = ?", input.username).catch(() => { });
if (data.changes <= 0) {
console.log("Failed to set operational status of \"" + input.username + "\" to True - Username not found.");
} else {
console.log("Successfully set operational status of \"" + input.username + "\" to True");
}
break;
}
case "Get last commend target and time": {
let lastCommend = await db.get("SELECT username,lastCommend FROM accounts ORDER BY lastCommend DESC LIMIT 1");
console.log("The latest commend has been sent by account " + lastCommend.username + " at " + new Date(lastCommend.lastCommend).toLocaleString());
break;
}
case "Remove all not working accounts": {
let _export = await inquirer.prompt({
type: "list",
name: "response",
message: "Do you want to export all not working accounts to a file called \"notworking.txt\" as well?",
choices: [
"Yes",
"No",
]
});
if (_export.response === "Yes") {
let data = await db.all("SELECT username, password FROM accounts WHERE operational = 0");
fs.writeFileSync("notworking.txt", data.map(s => s.username + ":" + s.password).join("\n"));
}
await db.run("DELETE FROM accounts WHERE operational = 0");
// We keep the "commended" list, if the account start working again for some reason we don't want to have the list wiped
console.log("Successfully removed all not working accounts");
break;
}
case "Reset Database": {
let confirm = await inquirer.prompt({
type: "confirm",
name: "confirm",
message: "Are you sure you want to remove ALL entries in the database?"
});
if (!confirm.confirm) {
break;
}
let data = await Promise.all([
db.run("DELETE FROM commended"),
db.run("DELETE FROM accounts")
]);
console.log("Successfully dropped " + data[0].changes + " commend history entries and " + data[1].changes + " account entries");
break;
}
case "List not working accounts": {
let data = await db.all("SELECT username FROM accounts WHERE operational = 0");
if (data.length <= 0) {
console.log("All accounts are working!");
} else {
console.log("Got " + data.length + " account" + (data.length === 1 ? "" : "s") + "\n" + data.map(d => d.username).join(", "));
}
break;
}
case "Add account(s) to database": {
let selection = await inquirer.prompt({
type: "list",
name: "selection",
message: "What would you like to do?",
choices: [
"Import from JSON file",
"Import from username:password file",
"Manually add account"
]
});
let list = [];
if (selection.selection !== "Manually add account") {
let file = await inquirer.prompt({
type: "input",
name: "file",
message: "Enter the name of the file you want to import"
});
let filePath = selection.selection === "Import from JSON file" ? (path.join(__dirname, file.file.endsWith(".json") ? file.file : (file.file + ".json"))) : (path.join(__dirname, file.file.endsWith(".txt") ? file.file : (file.file + ".txt")));
if (!fs.existsSync(filePath)) {
console.log("Failed to find file at \"" + filePath + "\"");
break;
}
switch (selection.selection) {
case "Import from JSON file": {
list = JSON.parse(fs.readFileSync(filePath));
break;
}
case "Import from username:password file": {
list = fs.readFileSync(filePath).toString().trim().split("\n").map(s => s.trim());
break;
}
}
} else {
let input = await inquirer.prompt({
type: "input",
name: "input",
message: "Enter username and password separated by a \":\" - \"username:password\""
});
list.push(input.input);
}
if (typeof list[0] === "string") {
list = list.map((s) => {
let parts = s.split(":");
let username = parts.shift();
let password = parts.join(":");
return {
username: username.trim(),
password: password.trim(),
sharedSecret: ""
}
});
}
if (list.length <= 0) {
console.log("Cannot insert zero accounts");
break;
}
let chunks = helper.chunkArray(list, 100);
let changes = 0;
for (let chunk of chunks) {
let data = await db.run("INSERT OR IGNORE INTO accounts (\"username\", \"password\", \"sharedSecret\") VALUES " + chunk.map(s => "(?, ?, ?)").join(", "), ...chunk.map(s => [ s.username, s.password, s.sharedSecret ]).flat());
changes += data.changes;
}
console.log("Successfully added " + changes + " account" + (changes === 1 ? "" : "s") + ". Duplicates have been ignored.");
break;
}
case "Remove account from database": {
let input = await inquirer.prompt({
type: "input",
name: "input",
message: "Enter username you want to remove"
});
let data = await Promise.all([
db.run("DELETE FROM commended WHERE username = ?", input.input),
db.run("DELETE FROM accounts WHERE username = ?", input.input)
]);
console.log("Successfully removed " + data[0].changes + " entr" + (data[0].changes === 1 ? "y" : "ies") + " from the commend history and " + data[1].changes + " account" + (data[1].changes === 1 ? "" : "s"));
break;
}
case "Reset commends for user": {
let input = await inquirer.prompt({
type: "input",
name: "input",
message: "Enter the SteamID or profile URL you want to reset commend history of"
});
let sid = await helper.parseSteamID(input.input).catch(() => {});
if (!sid) {
console.log("Failed to find SteamID of input");
break;
}
let data = await db.run("DELETE FROM commended WHERE commended = ?", sid.accountid);
console.log("Removed " + data.changes + " entr" + (data.changes === 1 ? "y" : "ies") + " from the commend history");
break;
}
case "List commends for user": {
let input = await inquirer.prompt({
type: "input",
name: "input",
message: "Enter the SteamID or profile URL you want to list the commend history of"
});
let sid = await helper.parseSteamID(input.input).catch(() => {});
if (!sid) {
console.log("Failed to find SteamID of input");
break;
}
let data = await db.all("SELECT * FROM commended WHERE commended = ?", sid.accountid);
if (data.length <= 0) {
console.log("This user is not in the commend history");
break;
}
let highest = Math.max(data.map(s => s.username.length));
console.log("User has been commended " + data.length + " time" + (data.length === 1 ? "" : "s") + "\n" + data.map(s => " ".repeat(highest - s.username.length) + s.username + " - " + new Date(s.timestamp).toString()));
break;
}
case "Exit": {
console.log("Safely closing database...");
await db.close();
return;
}
case "Export account list": {
let _export = await inquirer.prompt({
type: "list",
name: "response",
message: "Do you want to export all accounts or only working ones?",
choices: [
"Export all accounts",
"Exports only working accounts",
]
});
let query = "SELECT username, password FROM accounts";
if (_export.response === "Exports only working accounts") {
query += " WHERE operational = 1";
}
let input = await inquirer.prompt({
type: "input",
name: "input",
message: "What do you want to name the output file?"
});
let filePath = path.join(__dirname, input.input.includes(".") ? input.input : (input.input + ".txt"));
if (fs.existsSync(filePath)) {
console.log("File already exists.");
break;
}
let data = await db.all(query);
if (data.length <= 0) {
console.log("No data to export");
break;
}
fs.writeFileSync(filePath, data.map(s => s.username + ":" + s.password).join("\n"));
console.log("Successfully exported " + data.length + " accounts to \"" + filePath + "\"");
}
}
askInput();
})();
})();
================================================
FILE: helpers/Bots.js
================================================
const serializeError = require("serialize-error");
const Account = require("./account.js");
let started = false;
(async () => {
process.send({
type: "ready"
});
// Keep alive
while (!started) {
await new Promise(r => setTimeout(r, 1000));
}
})();
process.on("message", async (msg) => {
started = true;
const chunk = msg.chunk;
const target = msg.target;
const serverSteamID = msg.serverSteamID;
const isReport = msg.isReport;
const isCommend = msg.isCommend;
const matchID = msg.matchID;
const protocol = msg.protocol;
try {
let done = 0;
for (let acc of chunk) {
process.send({
type: "logging",
username: acc.username
});
const a = new Account(false, acc.proxy, protocol);
a.on("error", (err) => {
process.send({
type: "halfwayError",
username: a.username,
error: serializeError(err)
});
done += 1;
a.logOff();
});
a.login(acc.username, acc.password, acc.sharedSecret).then(async (hello) => {
process.send({
type: "loggedOn",
username: a.username,
hello: hello
});
let auth = await a.authenticate(serverSteamID).catch((err) => {
process.send({
type: "authError",
username: a.username,
error: serializeError(err)
});
a.removeAllListeners("error");
a.logOff();
done += 1;
});
if (!auth) {
return;
}
process.send({
type: "auth",
username: a.username,
crc: auth
});
let args = [
serverSteamID,
target,
matchID,
(isCommend ? [
acc.commend.friendly,
acc.commend.teaching,
acc.commend.leader
] : [
acc.report.rpt_aimbot,
acc.report.rpt_wallhack,
acc.report.rpt_speedhack,
acc.report.rpt_teamharm,
acc.report.rpt_textabuse
]),
5000
].flat();
await a[isCommend ? "commendPlayer" : "reportPlayer"](...args).then((response) => {
process.send({
type: isCommend ? "commended" : "reported",
username: a.username,
response: response,
confirmation: isReport ? response.confirmation_id.toString() : undefined
});
}).catch((err) => {
// Failed? Try again! (Still scuffed as fuck)
return a[isCommend ? "commendPlayer" : "reportPlayer"](...args).then((response) => {
process.send({
type: isCommend ? "commended" : "reported",
username: a.username,
response: response,
confirmation: isReport ? response.confirmation_id.toString() : undefined
});
}).catch((err) => {
process.send({
type: isCommend ? "commendErr" : "reportErr",
username: a.username,
error: serializeError(err)
});
});
}).finally(() => {
a.removeAllListeners("error");
});
a.logOff();
done += 1;
}).catch((err) => {
a.removeAllListeners("error");
process.send({
type: "failLogin",
username: a.username,
error: serializeError(err)
});
a.logOff();
done += 1;
});
}
while (done < chunk.length) {
await new Promise(p => setTimeout(p, 500));
}
// The process should automatically exit once all bots have disconnected from Steam but it doesn't
setTimeout(process.exit, 5000, 1).unref();
} catch (err) {
process.send({
type: "error",
username: a.username,
error: serializeError(err)
});
// The process should automatically exit once all bots have disconnected from Steam but it doesn't
setTimeout(process.exit, 5000, 1).unref();
}
});
================================================
FILE: helpers/GameCoordinator.js
================================================
const Events = require("events");
const ByteBuffer = require("bytebuffer");
const Protos = require("./Protos.js");
let compiledProtos = undefined;
module.exports = class Coordinator extends Events {
constructor(steamUser, appID) {
super();
this.appID = appID;
this.steamUser = steamUser;
this.Protos = compiledProtos ? compiledProtos : Protos([
{
name: "csgo",
protos: [
__dirname + "/../protobufs/csgo/gcsystemmsgs.proto",
__dirname + "/../protobufs/csgo/gcsdk_gcmessages.proto",
__dirname + "/../protobufs/csgo/cstrike15_gcmessages.proto"
]
},
{
name: "steam",
protos: [
__dirname + "/../protobufs/steam/enums_clientserver.proto",
__dirname + "/../protobufs/steam/steammessages_base.proto",
__dirname + "/../protobufs/steam/steammessages_clientserver.proto",
__dirname + "/../protobufs/steam/steammessages_clientserver_2.proto"
]
}
]);
compiledProtos = this.Protos;
steamUser.on("receivedFromGC", (appid, msgType, payload) => {
if (appid !== this.appID) {
return;
}
this.emit("receivedFromGC", msgType, payload);
});
let _handleMessage = this.steamUser._handleMessage;
this.steamUser._handleMessage = (header, body) => {
_handleMessage.call(this.steamUser, header, body);
this.emit("receivedFromSteam", header, body);
}
}
/**
* Send a message and get the response from it if needed
* @param {Number|undefined} appid AppID where to send the GC message to - Pass "undefined" for customized proto
* @param {Number} header The identifier of the message we are sending
* @param {Object} proto Header proto
* @param {Constructor|undefined} protobuf Constructor to create the buffer with settings. If "undefined" then "settings" HAS to be a buffer
* @param {Object} settings Settings to combine with the protobuf to construct the buffer
* @param {Number|undefined} responseHeader The response header to our request
* @param {Object|undefined} responseProtobuf Will automatically append ".decode()": Function which will be used to decode the protobuf. If "undefined" will not decode response and resolve with the raw buffer of the response
* @param {Number} timeout Max number of milliseconds before we give up on waiting for our response
* @returns {Promise} Promise which resolves in the object of our response, or undefined if "responseHeader" is undefined or rejects in a timeout error
*/
sendMessage(appid, header, proto, protobuf, settings, responseHeader, responseProtobuf, timeout = 30000) {
return new Promise((resolve, reject) => {
if (!appid) {
let encoded = settings;
if (protobuf) {
let message = protobuf.create(settings);
encoded = protobuf.encode(message);
}
this.steamUser._send({
msg: header,
proto: proto
}, protobuf ? encoded.finish() : encoded);
if (!responseHeader) {
resolve();
return;
}
let sendTimeout = setTimeout(() => {
this.removeListener("receivedFromSteam", sendMessageResponse);
reject(new Error("Failed to send message: Timeout"));
}, timeout);
this.on("receivedFromSteam", sendMessageResponse);
function sendMessageResponse(header, payload) {
if (header.msg !== responseHeader) {
return;
}
clearTimeout(sendTimeout);
this.removeListener("receivedFromSteam", sendMessageResponse);
if (!responseProtobuf) {
resolve(payload);
return;
}
if (payload instanceof Buffer || ByteBuffer.isByteBuffer(payload)) {
let msg = responseProtobuf.decode(ByteBuffer.isByteBuffer(payload) ? payload.toBuffer() : payload);
msg = responseProtobuf.toObject(msg, { defaults: true });
resolve(msg);
} else {
resolve(payload);
}
}
return;
}
let encoded = settings;
if (protobuf) {
let message = protobuf.create(settings);
encoded = protobuf.encode(message);
}
this.steamUser.sendToGC(appid, header, proto, protobuf ? encoded.finish() : encoded);
if (!responseHeader) {
resolve();
return;
}
let sendTimeout = setTimeout(() => {
this.removeListener("receivedFromGC", sendMessageResponse);
reject(new Error("Failed to send message: Timeout"));
}, timeout);
this.on("receivedFromGC", sendMessageResponse);
function sendMessageResponse(msgType, payload) {
if (msgType !== responseHeader) {
return;
}
clearTimeout(sendTimeout);
this.removeListener("receivedFromGC", sendMessageResponse);
if (!responseProtobuf) {
resolve(payload);
return;
}
let msg = responseProtobuf.decode(payload);
msg = responseProtobuf.toObject(msg, { defaults: true });
resolve(msg);
}
});
}
}
================================================
FILE: helpers/Helper.js
================================================
const request = require("request");
const SteamID = require("steamid");
const SteamUser = require("steam-user");
const unzipper = require("unzipper");
const path = require("path");
const fs = require("fs");
const GameCoordinator = require("./GameCoordinator.js");
module.exports = class Helper {
constructor(apiKey) {
this.apiKey = apiKey;
}
downloadProtobufs(dir) {
return new Promise(async (resolve, reject) => {
let deletes = ["Protobufs-master", "protobufs"];
await Promise.all(deletes.map(d => {
let p = path.join(dir, d);
return fs.existsSync(p) ? this.deleteRecursive(p) : Promise.resolve();
}));
let newProDir = path.join(dir, "Protobufs-master");
let proDir = path.join(dir, "protobufs");
// Yes I know the ones I download here are technically not the same as the ones in the submodule
// but that doesn't really matter, I doubt Valve will do any major changes with the protobufs I use here anyways
request({
uri: "https://github.com/SteamDatabase/Protobufs/archive/master.zip",
encoding: null
}, async (err, res, body) => {
if (err) {
reject(err);
return;
}
let zip = await unzipper.Open.buffer(body);
await zip.extract({
path: dir
});
fs.rename(newProDir, proDir, (err) => {
if (err) {
reject(err);
return;
}
resolve();
});
});
});
}
verifyProtobufs() {
let user = new SteamUser();
let gc = new GameCoordinator(user);
try {
return typeof gc.Protos.csgo.EGCBaseClientMsg.k_EMsgGCClientHello === "number" &&
typeof gc.Protos.steam.EMsg.k_EMsgClientAuthListAck === "number" &&
typeof gc.Protos.steam.EMsg.k_EMsgClientAuthList === "number"
;
} catch (e) {
return false;
}
}
deleteRecursive(dir) {
return new Promise((resolve, reject) => {
fs.readdir(dir, async (err, files) => {
if (err) {
reject(err);
return;
}
for (let file of files) {
let filePath = path.join(dir, file);
let stat = fs.statSync(filePath);
if (stat.isDirectory()) {
await this.deleteRecursive(filePath);
} else {
await new Promise((res, rej) => {
fs.unlink(filePath, (err) => {
if (err) {
rej(err);
return;
}
res();
});
});
}
}
fs.rmdir(dir, (err) => {
if (err) {
reject(err);
return;
}
resolve();
});
});
});
}
GetLatestVersion() {
return new Promise(async (resolve, reject) => {
let json = await this.GetJSON("https://raw.githubusercontent.com/BeepIsla/csgo-commend-bot/master/package.json");
if (!json.version) {
reject(json);
return;
}
resolve(json.version);
});
}
GetCurrentVersion(appid) {
return new Promise(async (resolve, reject) => {
let json = await this.GetJSON("https://api.steampowered.com/ISteamApps/UpToDateCheck/v1/?format=json&appid=" + appid + "&version=0");
if (!json.response) {
reject(json);
return;
}
resolve(json.response.required_version);
});
}
parseSteamID(input) {
return new Promise((resolve, reject) => {
let parsed = input.match(/^(((http(s){0,1}:\/\/){0,1}(www\.){0,1})steamcommunity\.com\/(id|profiles)\/){0,1}(?<parsed>[A-Z0-9-_]+)(\/{0,1}.{0,})$/i);
if (!parsed) {
reject(new Error("Failed to parse SteamID"));
return;
}
let sid = undefined;
try {
sid = new SteamID(parsed.groups.parsed);
if (sid.isValid() && sid.instance === 1 && sid.type === 1 && sid.universe === 1) {
resolve(sid);
}
} catch (e) { }
// If all of this is true the above one resolved
if (sid && sid.isValid() && sid.instance === 1 && sid.type === 1 && sid.universe === 1) {
return;
}
this.vanityURL(parsed.groups.parsed).then((res) => {
if (!res.steamid) {
reject(new Error("Invalid Vanity URL"));
return;
}
resolve(new SteamID(res.steamid));
}).catch((err) => {
reject(err);
});
});
}
GetActiveServer() {
return doRequest.call(this, "IGameServersService/GetServerList", "v1", {
limit: 1,
filter: "\\appid\\730\\noplayers\\1\\"
}, [
"response",
"servers"
], Array.isArray);
}
vanityURL(url) {
return doRequest.call(this, "ISteamUser/ResolveVanityURL", "v1", {
vanityurl: url
}, [
"response"
], null);
}
parseServerID(id) {
return new Promise((resolve, reject) => {
let sid = undefined;
try {
sid = new SteamID(id);
} catch (e) { }
if (sid && sid.isValid() && [3, 4].includes(sid.type) && sid.universe === 1) {
resolve(sid.getSteamID64());
return;
}
doRequest.call(this, "IGameServersService/GetServerList", "v1", {
limit: 1,
filter: "\\gameaddr\\" + id
}, [
"response",
"servers"
], Array.isArray).then((res) => {
if (!res[0].steamid) {
reject(new Error("Invalid Server IP"));
return;
}
resolve(res[0].steamid);
}).catch((err) => {
reject(err);
});
});
}
GetJSON(options) {
return new Promise((resolve, reject) => {
request(options, (err, res, body) => {
if (err) {
reject(err);
return;
}
if (res.statusCode !== 200) {
reject(new Error("Invalid Status Code: " + res.statusCode + " - Visit https://httpstatuses.com/" + res.statusCode));
return;
}
let json = undefined;
try {
json = JSON.parse(body);
} catch (e) { };
if (!json) {
reject(body);
return;
}
resolve(json);
});
});
}
chunkArray(ary, chunkSize) {
let tempArray = [];
for (let index = 0; index < ary.length; index += chunkSize) {
let myChunk = ary.slice(index, index + chunkSize);
tempArray.push(myChunk);
}
return tempArray;
}
static intToString(ipInt) {
// Copied from https://github.com/DoctorMcKay/node-stdlib/blob/3a65f4116116fb8a0a82239a9cc0db35c44558d9/components/ipv4.js
let buf = Buffer.alloc(4);
buf.writeUInt32BE(ipInt >>> 0, 0);
return Array.prototype.join.call(buf, ".");
}
}
function doRequest(method, version, qsParams = {}, responsePath = [], validator) {
return new Promise(async (resolve, reject) => {
qs = qsParams;
if (!qs.key) {
qs.key = this.apiKey;
}
request({
uri: "https://api.steampowered.com/" + method + "/" + version + "/",
qs: qs
}, (err, res, body) => {
if (err) {
reject(err);
return;
}
if (res.statusCode !== 200) {
if (res.statusCode === 403) {
reject({
type: "FORBIDDEN",
key: qs.key
});
return;
}
reject(new Error("Invalid Status Code: " + res.statusCode));
return;
}
let json = undefined;
try {
json = JSON.parse(body);
} catch (e) { };
if (!json) {
reject(body);
return;
}
// Validate the response
if (responsePath.length > 0) {
let valid = check(json, responsePath, 0, validator);
if (!valid) {
reject(json);
return;
}
resolve(valid);
return;
}
resolve(json);
});
});
}
function check(json, verifyPath, i, validator) {
if (i >= verifyPath.length) {
if (validator && !validator(json)) {
return false;
}
return json;
}
if (typeof json[verifyPath[i]] !== "object") {
return false;
}
return check(json[verifyPath[i]], verifyPath, i + 1, validator);
}
================================================
FILE: helpers/Protos.js
================================================
const Protobuf = require("protobufjs");
const fs = require("fs");
const path = require("path");
module.exports = Protos;
/**
* @typedef protosObject
* @type {Object}
* @property {String} name Name ot use in the output
* @property {Array.<String>|String} protos Array of protobuf file paths to load OR directory path to load all
*/
/**
* Parse an array of protobuf files
* @param {Array.<protosObject>} protos Array of objets to parse
* @param {Boolean} ignoreErrors Should we ignore errors or not
* @returns {Object}
*/
function Protos(protos, ignoreErrors = true) {
const protobufs = {};
for (let proto of protos) {
let root = new Protobuf.Root();
let files = Array.isArray(proto.protos) ? proto.protos : fs.readdirSync(proto.protos).map(file => path.join(proto.protos, file));
for (let file of files) {
if (!file.endsWith(".proto") || !fs.existsSync(file)) {
continue;
}
try {
root = root.loadSync(file, {
keepCase: true
});
} catch (err) {
if (!ignoreErrors) {
throw err;
}
};
}
protobufs[proto.name] = root;
}
return protobufs;
}
================================================
FILE: helpers/Target.js
================================================
const Account = require("./account.js");
let previous = null;
module.exports = class Target {
constructor(protocol) {
this.acc = new Account(true, undefined, protocol);
}
get accountid() {
return this.acc.steamUser.steamID.accountid;
}
login(username, password, sharedSecret) {
return this.acc.login(username, password, sharedSecret);
}
logOff() {
this.acc.unauthenticate().catch(() => { });
return this.acc.logOff();
}
setGamesPlayed(serverID) {
return new Promise(async (resolve, reject) => {
this.acc.setGamesPlayed(serverID);
if (previous) {
let deauth = await this.acc.unauthenticate().catch(reject);
if (!deauth) {
return;
}
}
this.acc.authenticate(serverID).then((res) => {
previous = res;
resolve(res);
}).catch(reject);
});
}
}
================================================
FILE: helpers/VDF.js
================================================
const ByteBuffer = require("bytebuffer");
const Type = {
None: 0,
String: 1,
Int32: 2,
Float32: 3,
Pointer: 4,
WideString: 5,
Color: 6,
UInt64: 7,
End: 8,
};
module.exports = class VDF {
static decode(buffer, customDecodeFields = {}) {
if (buffer.toString("hex").startsWith("0000")) {
buffer = Buffer.from(buffer.toString("hex").substring(4), "hex");
}
let object = {};
if (typeof buffer.readUint8 !== "function") {
buffer = ByteBuffer.wrap(buffer);
}
if (buffer.offset !== buffer.limit) {
while (true) {
let type = buffer.readUint8();
if (type === Type.End) {
break;
}
let name = buffer.readCString();
if (typeof customDecodeFields[name] === "function") {
object[name] = customDecodeFields[name](buffer);
continue;
}
switch (type) {
case Type.None: {
object[name] = this.decode(buffer);
break;
}
case Type.String: {
object[name] = buffer.readCString();
break;
}
case Type.Int32:
case Type.Color:
case Type.Pointer: {
object[name] = buffer.readInt32();
break;
}
case Type.UInt64: {
object[name] = buffer.readUint64();
break;
}
case Type.Float32: {
object[name] = buffer.readFloat();
break;
}
}
}
}
return object;
}
static encode(_object, prefix = [0x00, 0x00], suffix = [], customEncodeFields = {}) {
// Create a copy of the input object so we do not modify it
let object = { ..._object };
let buffer = new ByteBuffer();
for (let pre of prefix) {
buffer.writeByte(pre);
}
for (let item in object) {
if (object.hasOwnProperty(item) === false) {
continue;
}
if (typeof customEncodeFields[item] === "function") {
object[item] = customEncodeFields[item](object[item]);
}
_encode(object[item], buffer, item);
}
for (let suf of suffix) {
buffer.writeByte(suf);
}
buffer.writeByte(Type.End);
buffer.flip();
return buffer;
}
}
function _encode(object, buffer, name) {
if (object instanceof Buffer) {
buffer.writeByte(Type.String);
buffer.writeCString(name);
let parts = object.toString("hex").toUpperCase().match(/.{1,2}/g);
for (let part of parts) {
buffer.writeByte(parseInt("0x" + part));
}
//buffer.writeByte(0x00);
} else {
switch (typeof object) {
case "object": {
buffer.writeByte(Type.None);
buffer.writeCString(name);
for (let index in object) {
_encode(object[index], buffer, index);
}
buffer.writeByte(Type.End);
break;
}
case "string": {
buffer.writeByte(Type.String);
buffer.writeCString(name);
buffer.writeCString(object ? object : "");
break;
}
case "number": {
buffer.writeByte(Type.String);
buffer.writeCString(name);
buffer.writeCString(object.toString());
break;
}
}
}
}
================================================
FILE: helpers/account.js
================================================
const Events = require("events");
const SteamUser = require("steam-user");
const SteamTotp = require("steam-totp");
const SteamID = require("steamid");
const StdLib = require("@doctormckay/stdlib");
const GameCoordinator = require("./GameCoordinator.js");
const Helper = require("./Helper.js");
const VDF = require("./VDF.js");
const protocols = {
"AUTO": 0,
"TCP": 1,
"WEBSOCKET": 2,
"WEBCOMPATIBILITY": 2
};
module.exports = class Account extends Events {
constructor(isTarget = false, proxy = undefined, protocol = undefined) {
super();
this.steamUser = new SteamUser({
autoRelogin: false,
enablePicsCache: false,
picsCacheAll: false,
httpProxy: proxy,
protocol: protocols[String(protocol).toUpperCase()] || 0,
webCompatibilityMode: String(protocol).toUpperCase() === "WEBCOMPATIBILITY"
});
this.csgoUser = new GameCoordinator(this.steamUser, 730);
this.loginTimeout = null;
this.isTarget = isTarget;
this.errored = false;
this.gamesPlayedInterval = null;
this.helper = new Helper(""); // No API key needed for this single usage
}
_steamErrorHandler(err) {
if (this.errored) {
return;
}
this.errored = true;
this.emit("error", err);
}
/**
* Log into an account
* @param {String} username Steam Username
* @param {String} password Steam Password
* @param {String|undefined} sharedSecret Optional shared secret for 2FA
* @param {Number} timeout Timeout before rejecting promise
* @returns {Promise.<Object>}
*/
login(username, password, sharedSecret = undefined, timeout = 60000) {
this.username = username;
return new Promise((resolve, reject) => {
this.loginTimeout = setTimeout(() => {
this.steamUser.logOff();
this.steamUser.removeListener("error", error);
this.steamUser.removeListener("loggedOn", loggedOn);
reject(new Error("Failed to log in within given " + timeout + "ms"));
}, timeout);
let logonSettings = {
accountName: username,
password: password,
twoFactorCode: (typeof sharedSecret === "string" && sharedSecret.length > 5) ? SteamTotp.getAuthCode(sharedSecret) : undefined
};
this.steamUser.logOn(logonSettings);
let error = (err) => {
clearTimeout(this.loginTimeout);
this.loginTimeout = null;
this.steamUser.logOff();
this.steamUser.removeListener("error", error);
this.steamUser.removeListener("loggedOn", loggedOn);
this.steamUser.removeListener("steamGuard", steamGuard);
reject(err);
};
let msTimeVacNoResponse = 0;
let loggedOn = async () => {
clearTimeout(this.loginTimeout);
this.loginTimeout = null;
this.steamUser.removeListener("error", error);
this.steamUser.removeListener("loggedOn", loggedOn);
this.steamUser.removeListener("steamGuard", steamGuard);
while (!this.steamUser.vac) {
// No response for 2 seconds, assume no bans
if (msTimeVacNoResponse > 2000) {
this.steamUser.vac = {
appids: []
};
break;
}
msTimeVacNoResponse++;
await new Promise(p => setTimeout(p, 1));
}
if (this.steamUser.vac.appids.includes(730)) {
this.steamUser.logOff();
reject(new Error("VAC Banned"));
return;
}
await this.steamUser.requestFreeLicense(730).catch(() => { });
this.steamUser.on("error", this._steamErrorHandler);
this.steamUser.setPersona(SteamUser.EPersonaState.Online);
this.steamUser.gamesPlayed(730);
let welcome = undefined;
let fails = 0;
while (!welcome) {
welcome = await this.csgoUser.sendMessage(
730,
this.csgoUser.Protos.csgo.EGCBaseClientMsg.k_EMsgGCClientHello,
{},
this.csgoUser.Protos.csgo.CMsgClientHello,
{},
this.csgoUser.Protos.csgo.EGCBaseClientMsg.k_EMsgGCClientWelcome,
this.csgoUser.Protos.csgo.CMsgClientWelcome,
5000
).catch(() => { });
if (!welcome) {
if (++fails <= 10) {
continue;
}
this.steamUser.logOff();
reject(new Error("GC connection timeout - Hello"));
return;
}
}
this.csgoUser.sendMessage(
730,
this.csgoUser.Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_MatchmakingClient2GCHello,
{},
this.csgoUser.Protos.csgo.CMsgGCCStrike15_v2_MatchmakingClient2GCHello,
{},
this.csgoUser.Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_MatchmakingGC2ClientHello,
this.csgoUser.Protos.csgo.CMsgGCCStrike15_v2_MatchmakingGC2ClientHello,
10000
).then((mmHello) => {
if (mmHello.vac_banned) {
this.steamUser.logOff();
reject(new Error("VAC Banned"));
return;
}
/*
8: This account is permanently Untrusted
10: Convicted by Overwatch - Majorly Disruptive
11: Convicted by Overwatch - Minorly Disruptive
14: This account is permanently Untrusted
15: Global Cooldown
19: A server using your game server login token has been banned. Your account is now permanently banned from operating game servers, and you have a cooldown from connecting to game servers.
*/
if ([8, 10, 11, 14, 15, 19].includes(mmHello.penalty_reason)) {
this.steamUser.logOff();
reject(new Error("Game Banned"));
return;
}
resolve(welcome);
}).catch((err) => {
this.steamUser.logOff();
reject(new Error("GC connection timeout - MMHello"));
});
};
let steamGuard = () => {
clearTimeout(this.loginTimeout);
this.loginTimeout = null;
this.steamUser.logOff();
this.steamUser.removeListener("error", error);
this.steamUser.removeListener("loggedOn", loggedOn);
this.steamUser.removeListener("steamGuard", steamGuard);
reject(new Error("Steam Guard required"));
}
this.steamUser.on("error", error);
this.steamUser.on("loggedOn", loggedOn);
if (!this.isTarget) {
this.steamUser.on("steamGuard", steamGuard);
}
});
}
/**
* Set games played with server ID
* @param {String} serverID ServerID
* @returns {undefined}
*/
setGamesPlayed(serverID) {
if (this.errored) {
return;
}
if (this.gamesPlayedInterval) {
clearInterval(this.gamesPlayedInterval);
this.gamesPlayedInterval = null;
}
if (this.isTarget) {
this.gamesPlayedInterval = setInterval(() => {
if (!this.steamUser || !this.steamUser.steamID) {
clearInterval(this.gamesPlayedInterval);
this.gamesPlayedInterval = null;
return;
}
this.steamUser.gamesPlayed({
game_id: 730,
steam_id_gs: serverID
});
}, 5 * 60 * 1000);
this.gamesPlayedInterval.unref();
}
this.steamUser.gamesPlayed({
game_id: 730,
steam_id_gs: serverID
});
}
authenticate(serverID) {
return new Promise(async (resolve, reject) => {
let authTicket = await this.steamUser.getAuthSessionTicket(730).catch(reject);
if (!authTicket) {
return;
}
let ticketCrc = StdLib.Hashing.crc32(authTicket.appTicket);
this.csgoUser.sendMessage(
undefined,
this.csgoUser.Protos.steam.EMsg.k_EMsgClientAuthList,
{},
undefined, // this.csgoUser.Protos.steam.CMsgClientAuthList - (Steam-User automatically encodes this for us)
// TODO: Change sendMessage() to make this more consistent
{
tokens_left: this.steamUser._gcTokens.length,
last_request_seq: this.steamUser._authSeqMe,
last_request_seq_from_server: this.steamUser._authSeqThem,
tickets: [
{
estate: 2,
eresult: 0,
steamid: serverID,
gameid: 730,
h_steam_pipe: this.steamUser._hSteamPipe,
ticket_crc: ticketCrc,
ticket: authTicket.appTicket
}
],
app_ids: [730],
message_sequence: ++this.steamUser._authSeqMe
},
this.csgoUser.Protos.steam.EMsg.k_EMsgClientAuthListAck,
this.csgoUser.Protos.steam.CMsgClientAuthListAck,
5000
).then((ticketRes) => {
if (!ticketRes.ticket_crc || ticketRes.ticket_crc.length <= 0 || ticketRes.ticket_crc[0] !== ticketCrc) {
reject(new Error("Received authlist for ticket " + ticketRes.ticket_crc[0] + " but expected " + ticketCrc));
return;
}
resolve(ticketCrc);
}).catch(reject);
});
}
unauthenticate() {
return new Promise(async (resolve, reject) => {
this.csgoUser.sendMessage(
undefined,
this.csgoUser.Protos.steam.EMsg.k_EMsgClientAuthList,
{},
undefined, //this.csgoUser.Protos.steam.CMsgClientAuthList,
{
tokens_left: this.steamUser._gcTokens.length,
last_request_seq: this.steamUser._authSeqMe,
last_request_seq_from_server: this.steamUser._authSeqThem,
app_ids: [730],
message_sequence: ++this.steamUser._authSeqMe
},
this.csgoUser.Protos.steam.EMsg.k_EMsgClientAuthListAck,
this.csgoUser.Protos.steam.CMsgClientAuthListAck,
1000
).then((ticketRes) => {
if (ticketRes.ticket_crc && ticketRes.ticket_crc.length >= 1) {
reject(new Error("Failed to unauthorize tickets"));
return;
}
resolve(true);
}).catch(reject);
});
}
/**
* Commend a player
* @param {String} serverID ServerID of our target
* @param {Number} accountID AccountID of our target
* @param {String} matchID Optional MatchID
* @param {Boolean|Number} cmd_friendly Do we want to commend as friendly?
* @param {Boolean|Number} cmd_teaching Do we want to commend as teaching?
* @param {Boolean|Number} cmd_leader Do we want to commend as leader?
* @param {Number} timeout Maximum amount of time to wait before rejecting in milliseconds
* @returns {Promise.<Object>}
*/
commendPlayer(serverID, accountID, matchID, cmd_friendly, cmd_teaching, cmd_leader, timeout) {
return new Promise(async (resolve, reject) => {
this.setGamesPlayed(serverID);
// Wait for the ServerID to set
await new Promise(p => setTimeout(p, 50));
if (this.errored) {
return;
}
if (typeof matchID === "number") {
matchID = String(matchID);
}
if (typeof matchID === "string" && (matchID.toUpperCase() === "AUTO" || matchID.length <= 0 || !/^\d+$/.test(matchID))) {
matchID = "0";
}
this.csgoUser.sendMessage(
730,
this.csgoUser.Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_ClientCommendPlayer,
{},
this.csgoUser.Protos.csgo.CMsgGCCStrike15_v2_ClientCommendPlayer,
{
account_id: accountID,
match_id: matchID,
commendation: {
cmd_friendly: cmd_friendly ? 1 : 0,
cmd_teaching: cmd_teaching ? 1 : 0,
cmd_leader: cmd_leader ? 1 : 0
}
},
this.csgoUser.Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_ClientReportResponse,
this.csgoUser.Protos.csgo.CMsgGCCStrike15_v2_ClientReportResponse,
timeout
).then(resolve).catch(reject);
});
}
/**
* Report a player
* @param {String} serverID ServerID of our target
* @param {Number} accountID AccountID of our target
* @param {String} matchID Optional MatchID
* @param {Boolean|Number} rpt_aimbot Do we want to report as aimbotting?
* @param {Boolean|Number} rpt_wallhack Do we want to report as wallhacking?
* @param {Boolean|Number} rpt_speedhack Do we want to report as other hacking?
* @param {Boolean|Number} rpt_teamharm Do we want to report as griefing?
* @param {Boolean|Number} rpt_textabuse Do we want to report as text abusing?
* @param {Number} timeout Maximum amount of time to wait before rejecting in milliseconds
* @returns {Promise.<Object>}
*/
reportPlayer(serverID, accountID, matchID, rpt_aimbot, rpt_wallhack, rpt_speedhack, rpt_teamharm, rpt_textabuse, timeout) {
return new Promise(async (resolve, reject) => {
this.setGamesPlayed(serverID);
// Wait for the ServerID to set
await new Promise(p => setTimeout(p, 50));
if (this.errored) {
return;
}
this.csgoUser.sendMessage(
730,
this.csgoUser.Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_ClientReportPlayer,
{},
this.csgoUser.Protos.csgo.CMsgGCCStrike15_v2_ClientReportPlayer,
{
account_id: accountID,
match_id: matchID,
rpt_aimbot: rpt_aimbot ? 1 : 0,
rpt_wallhack: rpt_wallhack ? 1 : 0,
rpt_speedhack: rpt_speedhack ? 1 : 0,
rpt_teamharm: rpt_teamharm ? 1 : 0,
rpt_textabuse: rpt_textabuse ? 1 : 0,
rpt_voiceabuse: 0,
report_from_demo: false
},
this.csgoUser.Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_ClientReportResponse,
this.csgoUser.Protos.csgo.CMsgGCCStrike15_v2_ClientReportResponse,
timeout
).then(resolve).catch(reject);
});
}
/**
* Get the server our target is on
* @param {Number} accountid Target account ID
* @return {Promise.<Object>}
*/
getTargetServer(accountid) {
return new Promise((resolve, reject) => {
if (this.errored) {
return;
}
this.csgoUser.sendMessage(
undefined,
7502,
{
routing_appid: 730
},
this.csgoUser.Protos.steam.CMsgClientRichPresenceRequest,
{
steamid_request: [
SteamID.fromIndividualAccountID(accountid).getSteamID64()
]
},
7503,
this.csgoUser.Protos.steam.CMsgClientRichPresenceInfo,
5000
).then((info) => {
if (info.rich_presence.length <= 0) {
reject(new Error("Got no Steam rich presence data"));
return;
}
if (!info.rich_presence[0].rich_presence_kv) {
reject(new Error("Got no Steam rich presence data"));
return;
}
let decoded = undefined;
try {
decoded = VDF.decode(info.rich_presence[0].rich_presence_kv);
} catch { }
if (!decoded || !decoded.RP) {
reject(new Error("Failed to decode Steam rich presence keyvalues"));
return;
}
if (!decoded.RP.connect) {
reject(new Error("Target is likely not in a server or in a full server // Failed to find connect bytes"));
return;
}
// Parse tokens
let conBuf = Buffer.from(decoded.RP.connect.replace(/^\+gcconnect/, "").replace(/^G/, ""), "hex");
if (conBuf.length !== 12) {
reject(new Error("Target is likely in a lobby and not on a server // Requiring connect string of 12 bytes but received " + conBuf.length));
return;
}
let joinToken = conBuf.readInt32BE(0);
let accountID = conBuf.readInt32BE(4);
let joinIpp = conBuf.readInt32BE(8);
this.csgoUser.sendMessage(
730,
this.csgoUser.Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_ClientRequestJoinFriendData,
{},
this.csgoUser.Protos.csgo.CMsgGCCStrike15_v2_ClientRequestJoinFriendData,
{
version: 0,
account_id: accountID,
join_token: joinToken,
join_ipp: joinIpp
},
this.csgoUser.Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_ClientRequestJoinFriendData,
this.csgoUser.Protos.csgo.CMsgGCCStrike15_v2_ClientRequestJoinFriendData,
5000
).then((data) => {
if (data.errormsg) {
reject(new Error("Received join error for community server: " + data.errormsg));
return;
}
if (!data.res || !data.res.serverid) {
reject(new Error("Failed to get community server join data"));
return;
}
resolve({
serverID: data.res.serverid,
isValve: data.res.reservation && data.res.reservation.game_type,
serverIP: data.res.server_address
});
}).catch(reject);
}).catch(reject);
});
}
getTargetServerValve(accountid) {
return new Promise((resolve, reject) => {
if (this.errored) {
return;
}
this.csgoUser.sendMessage(
730,
this.csgoUser.Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_ClientRequestWatchInfoFriends2,
{},
this.csgoUser.Protos.csgo.CMsgGCCStrike15_v2_ClientRequestWatchInfoFriends,
{
account_ids: [
accountid
]
},
this.csgoUser.Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_GCToClientSteamdatagramTicket,
this.csgoUser.Protos.csgo.CMsgGCToClientSteamDatagramTicket,
5000
).then((info) => {
if (!info.serialized_ticket) {
reject(new Error("Got no CSGO response data for Valve Server"));
return;
}
let serverID = info.serialized_ticket.readBigUInt64LE(72);
let matchID = info.serialized_ticket.readBigUInt64LE(93);
resolve({
// This used to be the real servers IP and ID but it no longer seems to be
serverID: serverID.toString(),
isValve: true,
matchID: matchID.toString()
});
}).catch((err) => {
reject(new Error("Failed to receive Valve CSGO Server information"));
});
});
}
getCurrentCommendCount(accountID) {
return new Promise((resolve, reject) => {
if (this.errored) {
return;
}
this.csgoUser.sendMessage(
730,
this.csgoUser.Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_ClientRequestPlayersProfile,
{},
this.csgoUser.Protos.csgo.CMsgGCCStrike15_v2_ClientRequestPlayersProfile,
{
account_id: accountID,
request_level: 32
},
this.csgoUser.Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_PlayersProfile,
this.csgoUser.Protos.csgo.CMsgGCCStrike15_v2_PlayersProfile,
20000
).then((data) => {
let commends = undefined;
if (data.account_profiles && data.account_profiles[0] && data.account_profiles[0].commendation) {
commends = data.account_profiles[0].commendation;
} else {
commends = {
cmd_friendly: 0,
cmd_teaching: 0,
cmd_leader: 0
};
}
resolve({
friendly: commends.cmd_friendly,
teaching: commends.cmd_teaching,
leader: commends.cmd_leader
});
}).catch(reject);
});
}
getTargetQueuedMatch(accountid) {
return new Promise(async (resolve, reject) => {
if (this.errored) {
return;
}
if (!this.version) {
this.version = await this.helper.GetCurrentVersion(730).catch(reject);
if (!this.version) {
// Steam broke
return;
}
}
this.csgoUser.sendMessage(
730,
this.csgoUser.Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_MatchmakingStart,
{},
this.csgoUser.Protos.csgo.CMsgGCCStrike15_v2_MatchmakingStart,
{
account_ids: [
accountid
],
client_version: this.version
},
this.csgoUser.Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_MatchmakingGC2ClientUpdate,
this.csgoUser.Protos.csgo.CMsgGCCStrike15_v2_MatchmakingGC2ClientUpdate,
1000
).then((info) => {
// This should always respond even when we send invalid data
resolve(info.ongoingmatch_account_id_sessions && Array.isArray(info.ongoingmatch_account_id_sessions) && info.ongoingmatch_account_id_sessions.includes(accountid));
}).catch(reject);
});
}
/**
* Log out from the account
*/
logOff() {
this.steamUser.removeListener("error", this._steamErrorHandler);
this.steamUser.logOff();
}
}
================================================
FILE: index.js
================================================
const sqlite = require("sqlite");
const sqlite3 = require("sqlite3");
const ChildProcess = require("child_process");
const path = require("path");
const SteamUser = require("steam-user");
const fs = require("fs");
const URL = require("url");
const Target = require("./helpers/Target.js");
const Helper = require("./helpers/Helper.js");
const Account = require("./helpers/account.js");
let config = null;
process.on("unhandledRejection", console.error);
process.on("uncaughtException", console.error);
const colors = {
reset: "\x1b[0m",
black: "\x1b[30m",
red: "\x1b[31m",
green: "\x1b[32m",
yellow: "\x1b[33m",
blue: "\x1b[34m",
magenta: "\x1b[35m",
cyan: "\x1b[36m",
white: "\x1b[37m"
};
let helper = null;
let totalNeeded = 0;
let proxies = undefined;
let db = undefined;
let isNewVersion = false;
let totalSuccess = 0;
let totalFail = 0;
let _consolelog = console.log;
console.log = (color, ...args) => {
args.unshift(colors[color] ? colors[color] : color);
args.push(colors.reset);
_consolelog(...args);
}
(async () => {
if (!fs.existsSync("./config.json")) {
console.log("red", "Failed to find \"config.json\". Did you rename the file to \"config.json.json\"? Make sure to Enable Windows File Extensions");
return;
}
try {
config = require(path.resolve("config.json"));
} catch (err) {
let errPosition = err.message.split(": ").pop().trim();
let match = errPosition.match(/^Unexpected (?<type>.*) in JSON at position (?<position>.*)$/i);
if (!match || isNaN(parseInt(match.groups.position))) {
console.error(err);
} else {
let configRaw = fs.readFileSync("./config.json").toString();
let part = configRaw.slice(0, parseInt(match.groups.position));
let lines = part.split("\n").map(l => l.trim()).filter(l => l.length > 0);
console.log("red", "Failed to parse \"config.json\":\nError description: " + errPosition + "\nError on line: " + lines.length + "\nText which caused the error: " + lines.pop());
console.log("red", "Please verify your \"config.json\" and take the \"config.json.example\" file for help")
}
return;
}
helper = new Helper(config.steamWebAPIKey);
if (config.type && config.type.toUpperCase() === "REPORT") {
totalNeeded = Math.max(config.report.aimbot, config.report.wallhack, config.report.speedhack, config.report.teamharm, config.report.abusive);
} else {
totalNeeded = Math.max(config.commend.friendly, config.commend.teaching, config.commend.leader);
}
if (typeof config.type === "undefined") {
config.type = "COMMEND";
}
if (!["LOGIN", "SERVER"].includes(config.method.toUpperCase())) {
console.log("red", "The \"method\" option only allows for \"LOGIN\" or \"SERVER\" value. Please refer to the README for more information.");
return;
}
if (!["REPORT", "COMMEND"].includes(config.type.toUpperCase())) {
console.log("red", "The \"type\" option only allows for \"REPORT\" or \"COMMEND\" value. Please refer to the README for more information.");
return;
}
if (config.method.toUpperCase() === "LOGIN" && config.type.toUpperCase() === "REPORT") {
console.log("red", "You cannot use the \"REPORT\" type and \"LOGIN\" method at the same time. You wouldn't want to report yourself?");
return;
}
if (!config.disableUpdateCheck) {
console.log("white", "Checking for new update...");
try {
let package = require("./package.json");
if (!fs.existsSync("./data/dev")) {
if (fs.existsSync("./data/version")) {
let version = fs.readFileSync("./data/version").toString();
isNewVersion = version !== package.version;
}
if (!fs.existsSync("./data")) {
fs.mkdirSync("./data");
}
fs.writeFileSync("./data/version", package.version);
}
let res = await helper.GetLatestVersion().catch(console.error);
if (package.version !== res) {
let repoURL = package.repository.url.split(".");
repoURL.pop();
console.log("red", "A new version is available on Github @ " + repoURL.join("."));
console.log("red", "Downloading is optional but recommended. Make sure to check if there are any new values to be added in your old \"config.json\"");
await new Promise(p => setTimeout(p, 5000));
} else {
console.log("green", "Up to date!");
}
} catch (err) {
console.error(err);
console.log("red", "Failed to check for updates");
}
} else {
console.log("white", "Update check skipped");
}
console.log("white", "Checking protobufs...");
let foundProtobufs = helper.verifyProtobufs();
if (foundProtobufs && !isNewVersion) {
console.log("green", "Found protobufs");
} else {
console.log("red", isNewVersion ? "New version detected, updating protobufs..." : "Failed to find protobufs, downloading and extracting...");
await helper.downloadProtobufs(__dirname);
}
if (config.proxy && config.proxy.file && config.proxy.switchProxyEveryXaccounts && config.proxy.enabled) {
console.log("white", "Loading proxies...");
let proxyFilePath = path.resolve(config.proxy.file);
if (!fs.existsSync(proxyFilePath)) {
console.log("red", "Could not find proxy file \"" + config.proxy.file + "\" (" + proxyFilePath + ")");
return;
}
let proxiesRaw = fs.readFileSync(proxyFilePath).toString();
try {
proxies = JSON.parse(proxiesRaw);
} catch {
proxies = proxiesRaw.split("\n").map((l) => {
l = l.trim();
return l;
}).filter((l) => {
return l.length > 0;
});
}
proxies = proxies.map((proxy) => {
try {
let url = new URL.URL(proxy);
url.protocol = "http:"; // Force HTTP protcol
return url.href;
} catch {
if (!proxy.startsWith("http://")) {
proxy = "http://" + proxy;
}
return proxy;
}
});
console.log("green", "Got " + proxies.length + " prox" + (proxies.length === 1 ? "y" : "ies"));
} else {
proxies = [];
}
console.log("white", "Opening database...");
db = await sqlite.open({
filename: "./accounts.sqlite",
driver: sqlite3.Database
});
await Promise.all([
db.run("CREATE TABLE IF NOT EXISTS \"accounts\" (\"username\" TEXT NOT NULL UNIQUE, \"password\" TEXT NOT NULL, \"sharedSecret\" TEXT, \"lastCommend\" INTEGER NOT NULL DEFAULT -1, \"operational\" NUMERIC NOT NULL DEFAULT 1, PRIMARY KEY(\"username\"))"),
db.run("CREATE TABLE IF NOT EXISTS \"commended\" (\"username\" TEXT NOT NULL REFERENCES accounts(username), \"commended\" INTEGER NOT NULL, \"timestamp\" INTEGER NOT NULL)")
]);
let amount = await db.get("SELECT COUNT(*) FROM accounts WHERE operational = 1;");
console.log("white", "There are a total of " + amount["COUNT(*)"] + " operational accounts");
if (amount["COUNT(*)"] < totalNeeded) {
console.log("red", "Not enough accounts available, got " + amount["COUNT(*)"] + "/" + totalNeeded);
return;
}
let targetAcc = undefined;
let serverToUse = undefined;
let matchID = config.matchID;
if (config.method.toUpperCase() === "LOGIN") {
console.log("white", "Logging into target account");
targetAcc = new Target(config.protocol);
await targetAcc.login(config.account.username, config.account.password, config.account.sharedSecret);
} else if (config.method.toUpperCase() === "SERVER") {
console.log("white", "Parsing target account...");
targetAcc = (await helper.parseSteamID(config.target)).accountid;
}
let accountsToUse = await db.all("SELECT accounts.username, accounts.password, accounts.sharedSecret FROM accounts LEFT JOIN commended ON commended.username = accounts.username WHERE accounts.username NOT IN (SELECT username FROM commended WHERE commended = " + (typeof targetAcc === "object" ? targetAcc.accountid : targetAcc) + " OR commended.username IS NULL) AND (" + Date.now() + " - accounts.lastCommend) >= " + config.cooldown + " AND accounts.operational = 1 GROUP BY accounts.username LIMIT " + totalNeeded);
if (accountsToUse.length < totalNeeded) {
console.log("red", "Not enough accounts available, got " + accountsToUse.length + "/" + totalNeeded);
if (targetAcc instanceof Target) {
targetAcc.logOff();
}
await db.close();
// Force exit the process if it doesn't happen automatically within 15 seconds
setTimeout(process.exit, 15000, 1).unref();
return;
}
// Inject what to commend with in our accounts
let proxySwitch = 0;
if (config.type.toUpperCase() === "REPORT") {
for (let i = 0; i < accountsToUse.length; i++) {
let chosen = accountsToUse.filter(a => typeof a.report === "object").length;
if (i > 0 && (i % config.proxy.switchProxyEveryXaccounts) === 0 && config.proxy && config.proxy.enabled) {
proxySwitch++;
if (proxySwitch >= proxies.length) {
proxySwitch = 0;
}
}
accountsToUse[i].proxy = proxies[proxySwitch];
accountsToUse[i].report = {
rpt_aimbot: config.report.aimbot > chosen ? true : false,
rpt_wallhack: config.report.wallhack > chosen ? true : false,
rpt_speedhack: config.report.speedhack > chosen ? true : false,
rpt_teamharm: config.report.teamharm > chosen ? true : false,
rpt_textabuse: config.report.abusive > chosen ? true : false
}
}
} else {
for (let i = 0; i < accountsToUse.length; i++) {
let chosen = accountsToUse.filter(a => typeof a.commend === "object").length;
if (i > 0 && (i % config.proxy.switchProxyEveryXaccounts) === 0 && config.proxy && config.proxy.enabled) {
proxySwitch++;
}
accountsToUse[i].proxy = proxies[proxySwitch];
accountsToUse[i].commend = {
friendly: config.commend.friendly > chosen ? true : false,
teaching: config.commend.teaching > chosen ? true : false,
leader: config.commend.leader > chosen ? true : false
}
}
}
console.log("white", "Chunking " + accountsToUse.length + " account" + (accountsToUse.length === 1 ? "" : "s") + " into groups of " + config.perChunk + "...");
let chunks = helper.chunkArray(accountsToUse, config.perChunk);
if (config.method.toUpperCase() === "LOGIN") {
console.log("white", "Getting an available server");
serverToUse = (await helper.GetActiveServer()).shift().steamid;
console.log("white", "Selected available server " + serverToUse);
targetAcc.setGamesPlayed(serverToUse).catch(() => { });
} else if (config.method.toUpperCase() === "SERVER") {
console.log("white", "Parsing server input");
if (config.serverID.toUpperCase() !== "AUTO") {
serverToUse = await helper.parseServerID(config.serverID).catch(console.error);
if (!serverToUse) {
console.log("red", "Could not find online server for " + config.serverID);
if (targetAcc instanceof Target) {
targetAcc.logOff();
}
await db.close();
// Force exit the process if it doesn't happen automatically within 15 seconds
setTimeout(process.exit, 15000, 1).unref();
return;
}
console.log("white", "Parsed server input to " + serverToUse);
}
if (config.serverID.toUpperCase() === "AUTO" || config.matchID.toUpperCase() === "AUTO") {
matchID = config.matchID.toUpperCase() === "AUTO" ? null : config.matchID;
let serverID = config.serverID.toUpperCase() === "AUTO" ? null : config.serverID;
console.log("blue", "Logging into fetcher account...");
let fetcher = new Account(config.fetcher.askSteamGuard, undefined, config.protocol);
await fetcher.login(config.fetcher.username, config.fetcher.password, config.fetcher.sharedSecret);
console.log("blue", "Trying to fetch target " + config.fetcher.maxTries + " time" + (config.fetcher.maxTries === 1 ? "" : "s") + " with a delay of " + config.fetcher.tryDelay + "ms");
let tries = 0;
while (!serverToUse) {
tries++;
if (tries > config.fetcher.maxTries) {
console.log("red", "Failed to find server after " + tries + " tr" + (tries === 1 ? "y" : "ies"));
break;
}
// Community Server
serverToUse = await fetcher.getTargetServer(targetAcc).catch((err) => {
if (err.message) {
console.log("red", err.message);
} else {
console.error(err);
}
});
if (!serverToUse) {
// Valve Server
serverToUse = await fetcher.getTargetServerValve(targetAcc).catch((err) => {
if (err.message) {
console.log("red", err.message);
} else {
console.error(err);
}
});
if (!serverToUse) {
await new Promise(p => setTimeout(p, config.fetcher.tryDelay));
}
}
}
if (!serverToUse) {
await db.close();
// Force exit the process if it doesn't happen automatically within 15 seconds
setTimeout(process.exit, 15000, 1).unref();
return;
}
serverID = serverID === null ? (serverToUse.serverID || "0") : serverID;
matchID = matchID === null ? (serverToUse.matchID || "0") : matchID;
console.log("green", "Found target on " + (serverToUse.isValve ? "Valve" : "Community") + " server " + serverID + " after " + tries + " tr" + (tries === 1 ? "y" : "ies") + " " + (matchID === "0" ? "" : ("(" + matchID + ")")));
if (config.autoReportOnMatchEnd && serverToUse.isValve && config.type.toUpperCase() === "REPORT") {
console.log("cyan", "Waiting until match is over before reporting...");
let inMatch = true;
while (inMatch) {
inMatch = await fetcher.getTargetQueuedMatch(targetAcc).catch(() => {
// This should never error
inMatch = true;
});
if (inMatch) {
await new Promise(p => setTimeout(p, 500));
}
}
console.log("green", "Match has ended, starting report bot...");
}
serverToUse = serverID;
fetcher.logOff();
}
}
// Get current commend count
let startCommends = {
friendly: 0,
teaching: 0,
leader: 0
};
if (config.showCommends && config.type.toUpperCase() === "COMMEND") {
console.log("blue", "Logging into fetcher account for commend count...");
let fetcher = new Account(config.fetcher.askSteamGuard, undefined, config.protocol);
await fetcher.login(config.fetcher.username, config.fetcher.password, config.fetcher.sharedSecret);
startCommends = await fetcher.getCurrentCommendCount(targetAcc instanceof Target ? targetAcc.accountid : targetAcc);
console.log("yellow", "Current target commends: F" + startCommends.friendly + " T" + startCommends.teaching + " L" + startCommends.leader);
fetcher.logOff();
}
// Start commending
for (let i = 0; i < chunks.length; i++) {
if (i !== 0 && i % (config.switchServerAfterChunks || Number.MAX_SAFE_INTEGER) === 0 && config.method.toUpperCase() === "LOGIN") {
console.log("white", "Getting an available server after " + config.switchServerAfterChunks + " chunk" + (config.switchServerAfterChunks === 1 ? "" : "s"));
try {
let oldServer = serverToUse;
while (oldServer === serverToUse || !serverToUse) {
serverToUse = await helper.GetActiveServer().shift().steamid;
if (serverToUse === oldServer) {
console.log("red", "Old and new server are the same, retrying...");
}
}
console.log("white", "Selected available server " + serverToUse);
} catch {
console.log("red", "Failed to fetch new server, continuing with old server " + serverToUse);
}
targetAcc.setGamesPlayed(serverToUse).catch(() => { });
}
console.log("white", "Logging in on chunk " + (i + 1) + "/" + chunks.length);
// Do commends
let result = await handleChunk(chunks[i], (targetAcc instanceof Target ? targetAcc.accountid : targetAcc), serverToUse, matchID);
totalSuccess += result.success.length;
totalFail += result.error.length;
console.log("white", "Chunk " + (i + 1) + "/" + chunks.length + " finished with " + result.success.length + " successful " + (config.type.toUpperCase() === "REPORT" ? "report" : "commend") + (result.success.length === 1 ? "" : "s") + " and " + result.error.length + " failed " + (config.type.toUpperCase() === "REPORT" ? "report" : "commend") + (result.error.length === 1 ? "" : "s"));
// Wait a little bit and relog target if needed
if ((i + 1) < chunks.length) {
console.log("yellow", "Waiting " + config.betweenChunks + "ms...");
await new Promise(r => setTimeout(r, config.betweenChunks));
}
}
// We are done here!
if (config.showCommends && config.type.toUpperCase() === "COMMEND") {
console.log("blue", "Logging into fetcher account for commend count...");
let fetcher = new Account(config.fetcher.askSteamGuard, undefined, config.protocol);
await fetcher.login(config.fetcher.username, config.fetcher.password, config.fetcher.sharedSecret);
let commends = await fetcher.getCurrentCommendCount(targetAcc instanceof Target ? targetAcc.accountid : targetAcc);
console.log("yellow", "Current target commends: F" + commends.friendly + " T" + commends.teaching + " L" + commends.leader);
let diffCommends = {
friendly: commends.friendly - startCommends.friendly,
teaching: commends.teaching - startCommends.teaching,
leader: commends.leader - startCommends.leader
};
console.log("yellow", "Change:");
console.log("yellow", "- F " + (diffCommends.friendly >= 0 ? ("+" + diffCommends.friendly) : diffCommends.friendly));
console.log("yellow", "- T " + (diffCommends.teaching >= 0 ? ("+" + diffCommends.teaching) : diffCommends.teaching));
console.log("yellow", "- L " + (diffCommends.leader >= 0 ? ("+" + diffCommends.leader) : diffCommends.leader));
fetcher.logOff();
}
if (targetAcc instanceof Target) {
targetAcc.logOff();
}
await db.close();
console.log("magenta", "Finished all chunks with a total of " + totalSuccess + " successful and " + totalFail + " failed " + (config.type.toUpperCase() === "REPORT" ? "report" : "commend") + (totalFail === 1 ? "" : "s"));
// Force exit the process if it doesn't happen automatically within 15 seconds
setTimeout(process.exit, 15000, 1).unref();
})();
function handleChunk(chunk, target, serverSteamID, matchID) {
return new Promise(async (resolve, reject) => {
let child = ChildProcess.fork("./Bots.js", [], {
cwd: path.join(__dirname, "helpers"),
execArgv: process.execArgv.join(" ").includes("--inspect") ? ["--inspect=0"] : []
});
child.on("error", console.error);
let res = {
success: [],
error: []
};
child.on("message", async (msg) => {
switch (msg.type) {
case "ready": {
child.send({
isCommend: config.type.toUpperCase() === "COMMEND",
isReport: config.type.toUpperCase() === "REPORT",
protocol: config.protocol,
chunk: chunk,
target: target,
serverSteamID: serverSteamID,
matchID: matchID
});
break;
}
case "error": {
console.error("The child has exited due to an error", msg.error);
break;
}
case "logging": {
console.log("yellow", "[" + msg.username + "] Logging into Steam");
break;
}
case "loggedOn": {
console.log("cyan", "[" + msg.username + "] Logged onto Steam - GC Time: " + new Date(msg.hello.rtime32_gc_welcome_timestamp * 1000).toLocaleString());
break;
}
case "authError": {
console.log("red", "[" + msg.username + "] Failed to authenticate to target server");
res.error.push({
account: msg.username,
error: msg.error
});
break;
}
case "auth": {
console.log("magenta", "[" + msg.username + "] Authenticated with target server with ticket " + msg.crc);
break;
}
case "commended":
case "reported": {
await db.run("UPDATE accounts SET lastCommend = ? WHERE username = ?", Date.now(), msg.username).catch(() => { });
if (msg.response.response_result === 2 && msg.type === "commended") {
// Already commended
res.error.push({
account: msg.username,
error: msg.response
});
console.log("red", "[" + msg.username + "] Got response code " + msg.response.response_result + ", already commended target (" + (res.error.length + res.success.length) + "/" + chunk.length + ")");
await db.run("INSERT INTO commended (username, commended, timestamp) VALUES (?, ?, ?)", msg.username, target, Date.now()).catch(() => { });
break;
}
if (msg.response.response_result === 1) {
// Success commend
res.success.push({
account: msg.username,
response: msg.response
});
if (msg.type === "commended") {
console.log("green", "[" + msg.username + "] Successfully sent a commend with response code " + msg.response.response_result + " - Remaining Commends: " + msg.response.tokens + " (" + (res.error.length + res.success.length) + "/" + chunk.length + ")");
} else {
console.log("green", "[" + msg.username + "] Successfully sent a report with response code " + msg.response.response_result + " - " + msg.confirmation + " (" + (res.error.length + res.success.length) + "/" + chunk.length + ")");
}
await db.run("INSERT INTO commended (username, commended, timestamp) VALUES (?, ?, ?)", msg.username, target, Date.now()).catch(() => { });
break;
}
// Unknown response code
res.error.push({
account: msg.username,
error: msg.response
});
console.log("red", "[" + msg.username + "] " + (config.type.toUpperCase() === "REPORT" ? "Reported" : "Commended") + " but got invalid success code " + msg.response.response_result + " (" + (res.error.length + res.success.length) + "/" + chunk.length + ")");
break;
}
case "commendErr":
case "reportErr": {
res.error.push({
account: msg.username,
error: msg.error
});
console.log("red", "[" + msg.username + "] Failed to " + (config.type.toUpperCase() === "REPORT" ? "report" : "commend") + " (" + (res.error.length + res.success.length) + "/" + chunk.length + ")", msg.error);
await db.run("UPDATE accounts SET lastCommend = ? WHERE username = ?", Date.now(), msg.username).catch(() => { });
break;
}
case "halfwayError": {
console.log("red", "[" + msg.username + "] Fatal error after logging in and has been marked as invalid (" + (res.error.length + res.success.length) + "/" + chunk.length + ")", msg.error);
await db.run("UPDATE accounts SET operational = 0 WHERE username = ?", msg.username);
break;
}
case "failLogin": {
res.error.push({
account: msg.username,
error: msg.error
});
let ignoreCodes = [
SteamUser.EResult.Fail,
SteamUser.EResult.InvalidPassword,
SteamUser.EResult.AccessDenied,
SteamUser.EResult.Banned,
SteamUser.EResult.AccountNotFound,
SteamUser.EResult.Suspended,
SteamUser.EResult.AccountLockedDown,
SteamUser.EResult.IPBanned,
SteamUser.EResult.AccountDisabled
];
if (typeof msg.error.eresult === "number" && !ignoreCodes.includes(msg.error.eresult)) {
console.log("red", "[" + msg.username + "] Failed to login (" + (res.error.length + res.success.length) + "/" + chunk.length + ")", msg.error);
} else if (msg.error && msg.error.message === "Steam Guard required") {
console.log("red", "[" + msg.username + "] Requires a Steam Guard code and has been marked as invalid (" + (res.error.length + res.success.length) + "/" + chunk.length + ")", msg.error);
await db.run("UPDATE accounts SET operational = 0 WHERE username = ?", msg.username);
} else if (msg.error && msg.error.message === "VAC Banned") {
console.log("red", "[" + msg.username + "] Has been VAC banned in CSGO and has been marked as invalid (" + (res.error.length + res.success.length) + "/" + chunk.length + ")", msg.error);
await db.run("UPDATE accounts SET operational = 0 WHERE username = ?", msg.username);
} else if (msg.error && msg.error.message === "Game Banned") {
console.log("red", "[" + msg.username + "] Has been Game banned in CSGO and has been marked as invalid (" + (res.error.length + res.success.length) + "/" + chunk.length + ")", msg.error);
await db.run("UPDATE accounts SET operational = 0 WHERE username = ?", msg.username);
} else {
// Add more possible errors which occur if proxies are not working correctly
if (((typeof msg.error.message === "string" && /^HTTP CONNECT \d+.*$/i.test(msg.error.message)) || ["Failed to log in within given 60000ms", "Proxy connection timed out"].includes(msg.error.message) || ["ETIMEDOUT"].includes(msg.error.code)) && config.proxy.enabled) {
console.log("red", "[" + msg.username + "] Failed to login and due to proxy timeout (" + (res.error.length + res.success.length) + "/" + chunk.length + ")", msg.error);
} else {
console.log("red", "[" + msg.username + "] Failed to login and has been marked as invalid (" + (res.error.length + res.success.length) + "/" + chunk.length + ")", msg.error);
await db.run("UPDATE accounts SET operational = 0 WHERE username = ?", msg.username);
}
}
break;
}
}
});
child.on("exit", () => {
resolve(res);
});
});
}
================================================
FILE: package.json
================================================
{
"name": "csgo-commend-bot",
"version": "2.10.0",
"description": "CSGO Commend Bot Rewrite",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "github.com/BeepIsla",
"license": "AGPL-3.0",
"repository": {
"type": "git",
"url": "https://github.com/BeepIsla/csgo-commend-bot.git"
},
"dependencies": {
"@doctormckay/stdlib": "^1.10.2",
"bytebuffer": "^5.0.1",
"inquirer": "^6.3.1",
"protobufjs": "^6.9.0",
"request": "^2.88.2",
"serialize-error": "^4.1.0",
"sqlite": "^4.0.11",
"sqlite3": "^4.2.0",
"steam-totp": "^2.1.0",
"steam-user": "^4.16.2",
"steamid": "^1.1.0",
"unquirer": "^1.0.0",
"unzipper": "^0.10.11"
}
}
gitextract_ou5_ua01/ ├── .github/ │ └── ISSUE_TEMPLATE/ │ ├── bug_report.md │ └── question.md ├── .gitignore ├── .gitmodules ├── CHANGELOG.md ├── LICENSE ├── README.md ├── config.json.example ├── databaseManager.js ├── helpers/ │ ├── Bots.js │ ├── GameCoordinator.js │ ├── Helper.js │ ├── Protos.js │ ├── Target.js │ ├── VDF.js │ └── account.js ├── index.js └── package.json
SYMBOL INDEX (42 symbols across 7 files)
FILE: helpers/GameCoordinator.js
method constructor (line 7) | constructor(steamUser, appID) {
method sendMessage (line 61) | sendMessage(appid, header, proto, protobuf, settings, responseHeader, re...
FILE: helpers/Helper.js
method constructor (line 10) | constructor(apiKey) {
method downloadProtobufs (line 14) | downloadProtobufs(dir) {
method verifyProtobufs (line 53) | verifyProtobufs() {
method deleteRecursive (line 67) | deleteRecursive(dir) {
method GetLatestVersion (line 107) | GetLatestVersion() {
method GetCurrentVersion (line 120) | GetCurrentVersion(appid) {
method parseSteamID (line 132) | parseSteamID(input) {
method GetActiveServer (line 166) | GetActiveServer() {
method vanityURL (line 176) | vanityURL(url) {
method parseServerID (line 184) | parseServerID(id) {
method GetJSON (line 215) | GetJSON(options) {
method chunkArray (line 243) | chunkArray(ary, chunkSize) {
method intToString (line 254) | static intToString(ipInt) {
function doRequest (line 262) | function doRequest(method, version, qsParams = {}, responsePath = [], va...
function check (line 319) | function check(json, verifyPath, i, validator) {
FILE: helpers/Protos.js
function Protos (line 20) | function Protos(protos, ignoreErrors = true) {
FILE: helpers/Target.js
method constructor (line 5) | constructor(protocol) {
method accountid (line 9) | get accountid() {
method login (line 13) | login(username, password, sharedSecret) {
method logOff (line 17) | logOff() {
method setGamesPlayed (line 22) | setGamesPlayed(serverID) {
FILE: helpers/VDF.js
method decode (line 16) | static decode(buffer, customDecodeFields = {}) {
method encode (line 71) | static encode(_object, prefix = [0x00, 0x00], suffix = [], customEncodeF...
function _encode (line 104) | function _encode(object, buffer, name) {
FILE: helpers/account.js
constant VDF (line 8) | const VDF = require("./VDF.js");
method constructor (line 18) | constructor(isTarget = false, proxy = undefined, protocol = undefined) {
method _steamErrorHandler (line 37) | _steamErrorHandler(err) {
method login (line 54) | login(username, password, sharedSecret = undefined, timeout = 60000) {
method setGamesPlayed (line 208) | setGamesPlayed(serverID) {
method authenticate (line 240) | authenticate(serverID) {
method unauthenticate (line 286) | unauthenticate() {
method commendPlayer (line 325) | commendPlayer(serverID, accountID, matchID, cmd_friendly, cmd_teaching, ...
method reportPlayer (line 378) | reportPlayer(serverID, accountID, matchID, rpt_aimbot, rpt_wallhack, rpt...
method getTargetServer (line 417) | getTargetServer(accountid) {
method getTargetServerValve (line 510) | getTargetServerValve(accountid) {
method getCurrentCommendCount (line 550) | getCurrentCommendCount(accountID) {
method getTargetQueuedMatch (line 589) | getTargetQueuedMatch(accountid) {
method logOff (line 627) | logOff() {
FILE: index.js
constant URL (line 7) | const URL = require("url");
function handleChunk (line 464) | function handleChunk(chunk, target, serverSteamID, matchID) {
Condensed preview — 18 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (143K chars).
[
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 577,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Detailed bug d"
},
{
"path": ".github/ISSUE_TEMPLATE/question.md",
"chars": 437,
"preview": "---\nname: Question\nabout: Use this template if you have a question\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Detailed q"
},
{
"path": ".gitignore",
"chars": 103,
"preview": ".vscode\nnode_modules\ndata\naccounts.json\nconfig.json\ntest*.js\naccounts*.sqlite\ntest*.txt\nproxies*\ndebug\n"
},
{
"path": ".gitmodules",
"chars": 96,
"preview": "[submodule \"protobufs\"]\n\tpath = protobufs\n\turl = https://github.com/SteamDatabase/Protobufs.git\n"
},
{
"path": "CHANGELOG.md",
"chars": 4983,
"preview": "# Changelog\n\n## 2.10.0\n- Added optional config option `protocol` to force a specific connection protocol ([#537](https:/"
},
{
"path": "LICENSE",
"chars": 34502,
"preview": "GNU AFFERO GENERAL PUBLIC LICENSE\n Version 3, 19 November 2007\n\n Copyright (C) 2007 Free Software "
},
{
"path": "README.md",
"chars": 12281,
"preview": "# CSGO Commend Bot\nAllows you to send commends and reports for CSGO, though commend botting is the focus of it and repor"
},
{
"path": "config.json.example",
"chars": 897,
"preview": "{\n\t\"commend\": {\n\t\t\"friendly\": 5,\n\t\t\"teaching\": 10,\n\t\t\"leader\": 15\n\t},\n\t\"report\": {\n\t\t\"aimbot\": 10,\n\t\t\"wallhack\": 10,\n\t\t\""
},
{
"path": "databaseManager.js",
"chars": 11299,
"preview": "const inquirer = require(\"inquirer\");\nconst sqlite = require(\"sqlite\");\nconst sqlite3 = require(\"sqlite3\");\nconst path ="
},
{
"path": "helpers/Bots.js",
"chars": 3504,
"preview": "const serializeError = require(\"serialize-error\");\nconst Account = require(\"./account.js\");\n\nlet started = false;\n\n(asyn"
},
{
"path": "helpers/GameCoordinator.js",
"chars": 4719,
"preview": "const Events = require(\"events\");\nconst ByteBuffer = require(\"bytebuffer\");\nconst Protos = require(\"./Protos.js\");\nlet c"
},
{
"path": "helpers/Helper.js",
"chars": 7264,
"preview": "const request = require(\"request\");\nconst SteamID = require(\"steamid\");\nconst SteamUser = require(\"steam-user\");\nconst u"
},
{
"path": "helpers/Protos.js",
"chars": 1116,
"preview": "const Protobuf = require(\"protobufjs\");\nconst fs = require(\"fs\");\nconst path = require(\"path\");\n\nmodule.exports = Protos"
},
{
"path": "helpers/Target.js",
"chars": 808,
"preview": "const Account = require(\"./account.js\");\nlet previous = null;\n\nmodule.exports = class Target {\n\tconstructor(protocol) {\n"
},
{
"path": "helpers/VDF.js",
"chars": 2865,
"preview": "const ByteBuffer = require(\"bytebuffer\");\n\nconst Type = {\n\tNone: 0,\n\tString: 1,\n\tInt32: 2,\n\tFloat32: 3,\n\tPointer: 4,\n\tWi"
},
{
"path": "helpers/account.js",
"chars": 18524,
"preview": "const Events = require(\"events\");\nconst SteamUser = require(\"steam-user\");\nconst SteamTotp = require(\"steam-totp\");\ncons"
},
{
"path": "index.js",
"chars": 24703,
"preview": "const sqlite = require(\"sqlite\");\nconst sqlite3 = require(\"sqlite3\");\nconst ChildProcess = require(\"child_process\");\ncon"
},
{
"path": "package.json",
"chars": 772,
"preview": "{\n \"name\": \"csgo-commend-bot\",\n \"version\": \"2.10.0\",\n \"description\": \"CSGO Commend Bot Rewrite\",\n \"main\": \"index.js\""
}
]
About this extraction
This page contains the full source code of the BeepIsla/csgo-commend-bot GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 18 files (126.4 KB), approximately 33.3k tokens, and a symbol index with 42 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.