Skip to content

Commit 11d1542

Browse files
YuriSizukudevseed
authored andcommitted
make project structure simple
1 parent 621e223 commit 11d1542

16 files changed

Lines changed: 23 additions & 26 deletions
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
uses: microsoft/setup-msbuild@v1.1
1919

2020
- name: build target
21-
run: .\project\winexe_winmemdll\release_msvc.bat
21+
run: script/build_winmemdll.bat
2222

2323
- name: upload release
2424
uses: ncipollo/release-action@v1
2525
if: github.event_name == 'push'
2626
with:
27-
artifacts: "./project/winexe_winmemdll/build/winmemdll32.exe,./project/winexe_winmemdll/build/winmemdll64.exe"
27+
artifacts: "build/winmemdll32.exe,build/winmemdll64.exe"
2828
allowUpdates: "true"
2929
token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
.vscode
1414
__pycache__
1515

16-
project/**/build/*
16+
build/*

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "depend/reversetool"]
2-
path = depend/reversetool
3-
url = https://github.com/YuriSizuku/ReverseTool.git
1+
[submodule "depend/winreverse"]
2+
path = depend/winreverse
3+
url = https://github.com/YuriSizuku/toolkit-WinReverse.git
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
# build example, tested in linux 10.0.0-3, gcc 12, wine-9.0
2-
# make winmemdll_shellcode CC=x86_64-w64-mingw32-gcc BUILD_TYPE=32
3-
# make winmemdll_shellcode CC=i686-w64-mingw32-clang BUILD_TYPE=32
4-
# make winmemdll_shellcode CC=x86_64-w64-mingw32-clang BUILD_TYPE=64
2+
# make winmemdll_shellcode CC=x86_64-w64-mingw32-clang
53
# make winmemdll winmemdll_test CC=i686-w64-mingw32-gcc BUILD_TYPE=32d
64
# make winmemdll winmemdll_test CC=x86_64-w64-mingw32-gcc BUILD_TYPE=64d
75

86
# general config
97
CC:=gcc # clang (llvm-mingw), gcc (mingw-w64), tcc (x86 stdcall name has problem)
108
BUILD_TYPE:=32# 32, 32d, 64, 64d
119
BUILD_DIR:=build
12-
INCS:=-I../../depend/reversetool/src
10+
INCS:=-Idepend/winreverse/src
1311
LIBS:=-luser32 -lgdi32 -lpsapi
1412
CFLAGS:=-fPIC -std=c99 \
1513
-fvisibility=hidden \
@@ -58,7 +56,7 @@ winmemdll_test: src/winmemdll_test.c
5856

5957
# only support llvm-mingw (tested 18.1), for building coff format
6058
# sometimes nested force inline function might cause problems
61-
winmemdll_shellcode: ../../depend/reversetool/project/windll_winpe/src/libwinpe.c
59+
winmemdll_shellcode: depend/winreverse/project/windll_winpe/src/libwinpe.c
6260
@echo "## $@"
6361
# use -mno-sse for not making string as constant, sse makes array assign with ds:
6462
$(CC) -c -O3 -m32 -mno-sse $< -o $(BUILD_DIR)/$@32.o \

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MemoryModule
22

3-
![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/yurisizuku/memorymodule?color=green&label=MemoryModule)![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/MemoryModule/build_wintools.yml?label=build_wintools)
3+
![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/yurisizuku/win-MemoryModule?color=green&label=MemoryModule)![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/win-MemoryModule/build.yml?label=build)
44

55
☘️ A flexible PE loader, loading module in memory.
66
Most of the functions can be inline, compatible for shellcode.
@@ -22,8 +22,7 @@ Here's a example for using `llvm-mingw`
2222

2323
```shell
2424
git clone https://github.com/YuriSizuku/MemoryModule.git --recursive
25-
cd MemoryModule/project/win_memdll
26-
make winmemdll_shellcode # only if you want to generate shellcode
25+
make winmemdll_shellcode CC=x86_64-w64-mingw32-clang # only if you want to generate shellcode
2726
make winmemdll CC=i686-w64-mingw32-gcc BUILD_TYPE=32d # x86 debug
2827
```
2928

depend/reversetool

Lines changed: 0 additions & 1 deletion
This file was deleted.

depend/winreverse

Submodule winreverse added at 8f0a175

project/winexe_winmemdll/release_msvc.bat

Lines changed: 0 additions & 2 deletions
This file was deleted.

script/build_winmemdll.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
msbuild winmemdll.sln -t:winmemdll:rebuild -p:configuration=release -p:Platform=x86
2+
msbuild winmemdll.sln -t:winmemdll:rebuild -p:configuration=release -p:Platform=x64

0 commit comments

Comments
 (0)