Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:

jobs:
build:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -17,12 +19,12 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-name: '3.x'
python-version: '3.x'

- name: Install Linux Dependencies
if: matrix.os == 'ubuntu-latest'
Expand All @@ -49,21 +51,21 @@ jobs:

- name: Upload Artifact (Windows)
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: CryptPHP-Windows
path: build/Release/CryptPHP.exe

- name: Upload Artifact (macOS)
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: CryptPHP-macOS
path: build/CryptPHP

- name: Upload Artifact (Linux)
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: CryptPHP-Linux
path: build/CryptPHP
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

**CryptPHP** is a high-performance, cross-platform PHP obfuscator and encoder designed to secure your source code. It combines granular file selection with multi-layer protection to safeguard your intellectual property.

![tab-1](https://raw.githubusercontent.com/Mohit-Hasan/crypt-php/refs/heads/main/assets/tab-1.png)

---

## Key Features
Expand Down Expand Up @@ -46,6 +48,8 @@ make -j$(sysctl -n hw.ncpu)
4. **Package**: Configure your **Seed Folder** and click **Build & Orchestrate**.
5. **Deploy**: Find your protected ZIP files in the `dist/` directory.

![tab-2](https://raw.githubusercontent.com/Mohit-Hasan/crypt-php/refs/heads/main/assets/tab-2.png)

---

## Credits & Licensing
Expand Down
Binary file added assets/tab-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/tab-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions scripts/package_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def package_directory(src_dir, header_file):
f.write("\nstatic const EmbeddedFile g_EmbeddedFiles[] = {\n")
for i, (rel_path, abs_path) in enumerate(files):
size = os.path.getsize(abs_path)
rel_path = rel_path.replace("\\", "/")
f.write(f' {{ "{rel_path}", {size}, g_FileData_{i} }},\n')
f.write("};\n\n")
f.write(f"static const size_t g_EmbeddedFilesCount = {len(files)};\n")
Expand Down
6 changes: 6 additions & 0 deletions src/FileUtil.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
#include "FileUtil.h"
#include <array>
#include <cstdio>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>

#ifdef _WIN32
#define popen _popen
#define pclose _pclose
#endif
using namespace std;
namespace fs = std::filesystem;

Expand Down
13 changes: 5 additions & 8 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,6 @@ void SetupModernStyle() {
c[ImGuiCol_TextDisabled] = {0.50f, 0.55f, 0.60f, 1.f};
}

#ifdef _WIN32
#define NOMINMAX
#include <shellapi.h>
#include <windows.h>
#endif

// helpers
static void OpenURL(const char *url) {
#ifdef __APPLE__
Expand All @@ -157,7 +151,10 @@ static void OpenURL(const char *url) {
cmd += "\"";
system(cmd.c_str());
#elif defined(_WIN32)
ShellExecuteA(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL);
string cmd = "start \"\" \"";
cmd += url;
cmd += "\"";
system(cmd.c_str());
#else
string cmd = "xdg-open \"";
cmd += url;
Expand Down Expand Up @@ -863,7 +860,7 @@ int main(int, char **) {
ImGui::Text("CryptPHP - Obfuscator for php");
ImGui::PopStyleColor();
ImGui::PopFont();
ImGui::TextDisabled("v%s | Professional PHP Protection Suite",
ImGui::TextDisabled("%s | Professional PHP Protection Suite",
BRAND_VERSION);
ImGui::Separator();
ImGui::Spacing();
Expand Down
Loading