Skip to content

Commit 66bdd13

Browse files
committed
add even more files
1 parent 45d1033 commit 66bdd13

File tree

7 files changed

+392
-1
lines changed

7 files changed

+392
-1
lines changed

CODEOWNERS

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## List of maintainers for the yail library
2+
3+
## This file purpose is to give newcomers to the project the responsible
4+
## developers when submitting a pull request on GitHub, or opening a bug
5+
## report in issues.
6+
7+
## This file will notably establish who is responsible for a specific
8+
## area of yail. Being a maintainer means the following:
9+
## - that person has good knownledge in the area
10+
## - that person is able to enforce consistency in the area
11+
## - that person may be available for giving help in the area
12+
## - that person has push access on the repository
13+
## Being a maintainer does not mean the following:
14+
## - that person is dedicated to the area
15+
## - that person is working full-time on the area/on yail
16+
## - that person is paid
17+
## - that person is always available
18+
19+
20+
# yail core source code
21+
/source @orange-cpp
22+
/include @orange-cpp

CODE_OF_CONDUCT.md

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
# UNIVERSAL DECLARATION OF CODE OF CONDUCT
2+
_Declaration of Community Rights and Responsibilities_
3+
4+
## Preamble
5+
6+
Whereas the Orange++ community is founded on cooperation, mutual respect and support for the development of open-source software;
7+
8+
Whereas it is essential that all participants can contribute and seek assistance in an environment that is safe, inclusive and free from discrimination and harassment;
9+
10+
Whereas the dignity and equality of all participants, regardless of their traits or background, must be respected and protected;
11+
12+
Now, therefore, this Community Code of Conduct is proclaimed as a common standard of behaviour for all members, contributors and participants in projects led by Orange++ and its official communities.
13+
14+
---
15+
16+
## Article 1
17+
18+
This Code of Conduct establishes standards of behaviour intended to:
19+
20+
1. Provide a safe and welcoming environment for all participants.
21+
2. Encourage respectful and constructive collaboration.
22+
3. Prevent harassment, discrimination, and other harmful conduct.
23+
24+
All individuals who participate in Orange++ projects or official communities, whether online or offline, are expected to adhere to this Code of Conduct.
25+
26+
---
27+
28+
## Article 2
29+
30+
All participants are equal in dignity and rights within the community.
31+
32+
No person shall be harassed, attacked, or discriminated against on the basis of protected or personal traits, including but not limited to:
33+
34+
- sex;
35+
- religion or belief;
36+
- race or ethnicity;
37+
- appearance;
38+
- gender or gender identity;
39+
- nationality;
40+
- sexual orientation;
41+
- or any other similar characteristic.
42+
43+
Treating someone as lesser or unworthy because of their knowledge, experience, or level of understanding of an issue is incompatible with this Code.
44+
45+
---
46+
47+
## Article 3
48+
49+
Participants shall treat one another with respect at all times.
50+
51+
Participants shall:
52+
53+
1. Engage in discussion in good faith and assume good intent where reasonable.
54+
2. Provide feedback and criticism in a constructive and considerate manner.
55+
3. Recognize that people have different backgrounds, perspectives, and levels of expertise.
56+
57+
Examples of conduct contrary to this Article include, but are not limited to:
58+
59+
- harassment, bullying, personal attacks or degrading comments;
60+
- inappropriate or offensive jokes or remarks about another person;
61+
- persistent disruption of discussions or activities.
62+
63+
---
64+
65+
## Article 4
66+
67+
Participants shall remain on topic and avoid posting spam or irrelevant material.
68+
69+
Content that is distasteful, deliberately inflammatory, or unrelated to the project or discussion at hand is prohibited.
70+
71+
Examples of prohibited conduct under this Article include:
72+
73+
- posting trolling or inflammatory messages;
74+
- sharing disturbing or inappropriate imagery unrelated to the topic;
75+
- repeatedly derailing conversations away from their intended purpose.
76+
77+
---
78+
79+
## Article 5
80+
81+
The following standards shall guide all participation in Orange++ projects and official communities:
82+
83+
1. Do not harass, attack, or discriminate against any person.
84+
2. Do not go off-topic and do not post spam.
85+
3. Treat all participants with respect.
86+
87+
These standards apply equally to maintainers, contributors, and all other participants, regardless of status or seniority.
88+
89+
---
90+
91+
## Article 6
92+
93+
Enforcement of this Code of Conduct is carried out by Orange++ and/or other core contributors (hereinafter “members”).
94+
95+
Members shall strive to:
96+
97+
1. Act fairly, consistently, and transparently.
98+
2. Consider the context and severity of each incident.
99+
3. Maintain a civil and welcoming environment for the community as a whole.
100+
101+
Where appropriate, members may consult individuals with relevant lived experience, particularly when an incident concerns a marginalized group, while preserving confidentiality as required by this Code.
102+
103+
---
104+
105+
## Article 7
106+
107+
Any participant who believes that a breach of this Code of Conduct has occurred and has not been appropriately addressed may report the incident privately.
108+
109+
Reports may be submitted through any of the following channels:
110+
111+
**E-mail**
112+
113+
- `orange-cpp@yandex.ru`
114+
115+
**Discord**
116+
117+
- `@orange_cpp`
118+
119+
**Telegram**
120+
121+
- `@orange_cpp`
122+
123+
The reporting party’s privacy shall be respected, and reports shall not be shared beyond those responsible for handling them, except where required by law or with the explicit consent of the reporting party.
124+
125+
---
126+
127+
## Article 8
128+
129+
Depending on the nature and severity of the infraction, and taking into account past behaviour, members may apply one or more of the following measures.
130+
131+
**1. Correction / Edit**
132+
133+
Where a message is misleading, poorly worded, or likely to cause misunderstanding, members may:
134+
135+
1. Request that the author clarify or correct the message; or
136+
2. Edit the message where the platform permits and such action is appropriate and transparent.
137+
138+
**2. Warning / Deletion**
139+
140+
Where a message is inappropriate or in breach of the standards, members may:
141+
142+
1. Issue a public or private warning; and/or
143+
2. Delete the message.
144+
145+
**3. Mute / Temporary Ban**
146+
147+
Where a participant is repeatedly violating the standards, or where their behaviour is significantly disruptive, members may:
148+
149+
1. Temporarily mute the participant; or
150+
2. Temporarily suspend or ban the participant from the community.
151+
152+
**4. Permanent Ban**
153+
154+
Where a message is hateful or severely disruptive, or where less serious infractions are repeated despite prior measures, members may permanently ban the participant.
155+
156+
Each case shall be considered individually. The final decision regarding the appropriate measure lies with the members responsible for enforcement.
157+
158+
---
159+
160+
## Article 9
161+
162+
Reports of misconduct and information regarding enforcement actions shall be handled with care and confidentiality.
163+
164+
The personal data of reporters, witnesses, and involved parties shall not be disclosed to third parties, except:
165+
166+
1. Where such disclosure is required by law; or
167+
2. Where explicit consent has been given by the person concerned.
168+
169+
The maintainer guarantees that every report will be treated with discretion and respect.
170+
171+
---
172+
173+
## Article 10
174+
175+
This Code of Conduct applies to:
176+
177+
1. All projects led under the Orange++ name or leadership; and
178+
2. All official communities associated with Orange++ outside of GitHub.
179+
180+
Official communities outside of GitHub may maintain additional rules specific to their platform. In case of overlap, participants are expected to follow:
181+
182+
1. The rules of the platform or community; and
183+
2. This Code of Conduct, insofar as it is applicable.
184+
185+
---
186+
187+
## Article 11
188+
189+
This Code of Conduct shall be interpreted in a manner consistent with its purpose: to promote a safe, respectful and inclusive community.
190+
191+
The maintainer and core contributors may review and revise this Code of Conduct periodically in light of community needs and experience.
192+
193+
Significant changes should be communicated to the community in a timely and clear manner.
194+
195+
---
196+
197+
## Article 12
198+
199+
Nothing in this Community Code of Conduct may be interpreted as granting to any maintainer, member, contributor, or participant any right to engage in any activity or to perform any act that aims at undermining, limiting, or destroying the rights, protections, and standards set forth herein.
200+
201+
No rule, policy, custom, or decision within the Orange++ projects or their official communities may be invoked to justify harassment, discrimination, retaliation, or any other conduct contrary to this Code of Conduct.

CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Contributing to Yail or other Orange's Projects
2+
3+
### Prerequisites
4+
5+
- A working up-to-date yail installation
6+
- C++ knowledge
7+
- Git knowledge
8+
- Ability to ask for help (Feel free to create empty pull-request or PM a maintainer
9+
in [Telegram](https://t.me/orange_cpp))
10+
11+
### Setting up Yail
12+
13+
Please read INSTALL.md file in repository
14+
15+
### Pull requests and Branches
16+
17+
In order to send code back to the official Yail repository, you must first create a copy of Yail on your github
18+
account ([fork](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)) and
19+
then [create a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) back to Yail.
20+
21+
Yail development is performed on multiple branches. Changes are then pull requested into master. By default, changes
22+
merged into master will not roll out to stable build users unless the `main` tag is updated.
23+
24+
### Code-Style
25+
26+
The orange code-style can be found in `.clang-format`.
27+
28+
### Building
29+
30+
Yail has already created the `cmake-build` and `out` directories where cmake/bin files are located. By default, you
31+
can build Yail by running `cmake --build cmake-build/build/windows-release --target yail -j 6` in the source
32+
directory.

CREDITS.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# YAIL CREDITS
2+
3+
Thanks to everyone who made this possible, including:
4+
5+
- forentfraps helping with debugging
6+
7+
And a big hand to everyone else who has contributed over the past!
8+
9+
THANKS! <3
10+
11+
-- Orange++ <orange_github@proton.me>

INSTALL.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Installing yail
2+
3+
## Build and install
4+
5+
```bash
6+
cmake --preset windows-release-vcpkg`
7+
cmake --build cmake-build/build/windows-release-vcpkg` --target install
8+
```
9+
10+
The default install prefix is `cmake-build/install/windows-release-vcpkg`. To change it, pass `-DCMAKE_INSTALL_PREFIX=/your/path` during configure.
11+
12+
## CMake integration
13+
14+
After installing, add yail to your project:
15+
16+
```cmake
17+
find_package(yail CONFIG REQUIRED)
18+
target_link_libraries(my_target PRIVATE yail::yail)
19+
```
20+
21+
If you installed to a non-standard prefix, point CMake to it:
22+
23+
```bash
24+
cmake -DCMAKE_PREFIX_PATH=/your/install/path ..
25+
```

README.md

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,97 @@
11
# yail
2-
Yet Another Injection Library
2+
**Yet Another Injection Library** — a Windows x64 manual-map DLL injection library written in modern C++23.
3+
4+
## Features
5+
6+
- x64 PE manual mapping (no `LoadLibrary` traces)
7+
- Static TLS support
8+
- Exception handling (SEH/VEH compatible)
9+
- Heap validation compatibility with UCRT
10+
- Inject by process ID or process name
11+
- Load from file path or raw bytes in memory
12+
- Returns `std::expected<uintptr_t, std::string>` — no exceptions, clear error messages
13+
14+
## Requirements
15+
16+
- Windows x64
17+
- C++23 compiler (MSVC recommended)
18+
- CMake 3.28+
19+
- vcpkg
20+
21+
## Building
22+
23+
```bash
24+
cmake --preset windows-debug
25+
cmake --build cmake-build/build/windows-debug
26+
```
27+
28+
To also build the examples:
29+
30+
```bash
31+
cmake --preset windows-debug -DYAIL_BUILD_EXAMPLES=ON
32+
cmake --build cmake-build/build/windows-debug
33+
```
34+
35+
## Usage
36+
37+
### Inject into a process by name
38+
39+
```cpp
40+
#include <yail/yail.hpp>
41+
42+
auto result = yail::manual_map_injection_from_file("my.dll", "target.exe");
43+
44+
if (!result)
45+
std::println("Failed: {}", result.error());
46+
else
47+
std::println("Loaded at 0x{:x}", result.value());
48+
```
49+
50+
### Inject into a process by PID
51+
52+
```cpp
53+
auto result = yail::manual_map_injection_from_file("my.dll", GetCurrentProcessId());
54+
```
55+
56+
### Inject from raw bytes
57+
58+
```cpp
59+
std::vector<uint8_t> dll_bytes = /* ... */;
60+
auto result = yail::manual_map_injection_from_raw(dll_bytes, "target.exe");
61+
```
62+
63+
## CMake Integration
64+
65+
After installing, consume yail in your project:
66+
67+
```cmake
68+
find_package(yail CONFIG REQUIRED)
69+
target_link_libraries(my_target PRIVATE yail::yail)
70+
```
71+
72+
## API
73+
74+
```cpp
75+
namespace yail
76+
{
77+
// Inject from a file path
78+
std::expected<uintptr_t, std::string>
79+
manual_map_injection_from_file(std::string_view dll_path, std::uintptr_t process_id);
80+
81+
std::expected<uintptr_t, std::string>
82+
manual_map_injection_from_file(std::string_view dll_path, std::string_view process_name);
83+
84+
// Inject from raw bytes
85+
std::expected<uintptr_t, std::string>
86+
manual_map_injection_from_raw(const std::span<std::uint8_t>& raw_dll, std::uintptr_t process_id);
87+
88+
std::expected<uintptr_t, std::string>
89+
manual_map_injection_from_raw(const std::span<std::uint8_t>& raw_dll, std::string_view process_name);
90+
}
91+
```
92+
93+
On success, returns the base address of the mapped image in the target process. On failure, returns a string describing the error.
94+
95+
## License
96+
97+
[Zlib](LICENSE)

0 commit comments

Comments
 (0)