Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting ready for 1.4.7 #1541

Merged
merged 223 commits into from
Mar 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
223 commits
Select commit Hold shift + click to select a range
dff4bfa
since shell script using sh, if [[]] is a bash specific syntan. i cha…
xwings Aug 10, 2023
8f02953
Merge pull request #1370 from xwings/dev
xwings Aug 10, 2023
c8508b0
Update saver_tendaac15_httpd.py
xwings Aug 11, 2023
b5e8b53
Merge pull request #1371 from qilingframework/xwings-patch-1
xwings Aug 11, 2023
2137c65
Correctly handle subcommands args
elicn Jul 23, 2023
9c0c512
Styling tweaks to coverage extension
elicn Jul 23, 2023
e16c212
Fix inaccurate base address in DISASM output
elicn Jul 23, 2023
d8be7bc
Fix signed int handling on 32-bit
elicn Jul 23, 2023
0481397
Refine qltool tests
elicn Jul 23, 2023
ec5210a
Extract msq logic from POSIX
elicn Jul 23, 2023
59ebcf8
Extract shm logic from POSIX
elicn Jul 23, 2023
dbe2437
Make multithread tests more robust
elicn Aug 24, 2023
93dcb17
Revamp history tests
elicn Aug 24, 2023
98cc413
Revamp ELF tests
elicn Aug 24, 2023
33ad0d7
Revamp struct tests
elicn Aug 24, 2023
a244b2d
Make multithread tests even more robust
elicn Aug 24, 2023
70557cf
Let the user pick a CPU model
elicn Aug 24, 2023
1dbdcb7
Misc minor fixes
elicn Aug 24, 2023
7fa73e3
Opportunistic styling and PEP8 fixes
elicn Aug 24, 2023
4d374a6
Fix bugged test criteria
elicn Aug 25, 2023
d554941
Revert "Make multithread tests even more robust"
elicn Aug 25, 2023
419a344
Add missing abstract methods to EVM
elicn Aug 25, 2023
8b8b669
Configurable page size
elicn Aug 28, 2023
b611703
Refactor system calls ABI
elicn Aug 28, 2023
1ddb21b
Fix #1379
elicn Sep 12, 2023
45542d3
Introduce EditorConfig to help maintain coding conventions
elicn Sep 12, 2023
96d5bab
Avoid optimizing global logging when using a customized logger
elicn Sep 22, 2023
f4a9f85
Remove redundant var max_addr
elicn Sep 22, 2023
9b37c3b
Merge pull request #1376 from elicn/periodic
xwings Sep 26, 2023
50b3f7c
docs: reword README
mochaaP Sep 23, 2023
bfcb955
Better spec compliance for Windows Registery
elicn Sep 26, 2023
f881308
add EZCOV coverage support
TheZ3ro Sep 19, 2023
763082c
optimize EZCOV coverage
TheZ3ro Sep 27, 2023
dc764ce
fix command show_args crashed if argument is 5
ucgJhe Sep 28, 2023
be1568f
Merge pull request #1391 from ucgJhe/qdb
xwings Oct 2, 2023
97c4437
Merge pull request #1389 from TheZ3ro/dev
xwings Oct 2, 2023
01edf63
add super init in QlOsMcu
Yu3H0 Oct 6, 2023
8897982
Fix save / restore keys inconsistency
elicn Oct 8, 2023
4767bbe
fix(r2): skip ill instruction in disassembler
chinggg Sep 3, 2022
0021e79
test: QL_VERBOSE.DISASM implicitly uses r2.disassembler
chinggg Oct 12, 2023
e3520c1
Merge pull request #1397 from chinggg/fix-r2
xwings Oct 16, 2023
18a56bd
Merge pull request #1395 from Yu3H0/dev_super
xwings Oct 16, 2023
a3c7818
Merge pull request #1388 from mcha-forks/reword-readme
xwings Oct 16, 2023
c4cba36
Replace magic numbers with constants
elicn Oct 18, 2023
740dc69
Use a meaningful variable for a calculation
elicn Oct 18, 2023
99e0cfc
Fix ELF KO loading details
elicn Oct 18, 2023
e11770f
Remove redundant os.elf_entry
elicn Oct 18, 2023
248c69a
fix command `set` report parse error if set register to 0
ucgJhe Oct 20, 2023
96f3025
enhance del_mapinfo/change_mapinfo
HyperSine Oct 29, 2023
bde48c0
Merge pull request #1399 from ucgJhe/qdb
xwings Nov 7, 2023
0454493
qdb improvements: 1. allow multi-breakpoints, 2. both hooks and patch…
ucgJhe Nov 8, 2023
a5e5227
postpone the hooks integrity feature
ucgJhe Nov 9, 2023
6799389
add qdb feature: keep integrity of hooks and patches
ucgJhe Nov 10, 2023
6da99b9
add qdb feature: keep integrity of hooks and patches and show both en…
ucgJhe Nov 10, 2023
6ea2275
add qdb feature: simple filter for command show
ucgJhe Nov 10, 2023
0f3c154
Merge pull request #1407 from ucgJhe/qdb
xwings Nov 12, 2023
edbbbec
fix overflow with wait options
Ninja3047 Nov 24, 2023
61a9dd7
sendto and recvfrom can handle NULL addr arg
elicn Dec 4, 2023
310e32e
fix: fixing AttributeError in IDAPython
0x79H Dec 8, 2023
6bc1a3d
Bugfix: unaligned access in MIPS getdents64
ljucovic Dec 13, 2023
687b02f
Merge pull request #1413 from Ninja3047/fix-wait-overflow
xwings Dec 14, 2023
54e4e39
Merge pull request #1390 from elicn/periodic
xwings Dec 14, 2023
d8479b7
Merge pull request #1417 from 0x79H/bugfix/1362
xwings Dec 14, 2023
45f2ec7
Merge pull request #1419 from tats-gd/bugfix_getdents64_alignment
xwings Dec 14, 2023
3724cee
Merge pull request #1401 from HyperSine/dev
xwings Dec 14, 2023
288b259
Revert "fix: fixing AttributeError in IDAPython"
xwings Dec 14, 2023
4a3bf55
Revert "Bugfix: unaligned access in MIPS getdents64"
xwings Dec 14, 2023
7e61787
Merge pull request #1423 from qilingframework/revert-1419-bugfix_getd…
xwings Dec 14, 2023
69f0019
Merge pull request #1422 from qilingframework/revert-1417-bugfix/1362
xwings Dec 14, 2023
32d7a02
Revert "enhance del_mapinfo/change_mapinfo"
xwings Dec 15, 2023
cf16320
Merge pull request #1424 from qilingframework/revert-1401-dev
xwings Dec 15, 2023
f32fbe9
Fix getattr self.ql.loader default value
dotCirill Dec 25, 2023
ccca877
Add :linux socket option consts
Jan 3, 2024
cf78110
Merge branch 'add_socketopt_const' into add_socketopt_const_dev
Jan 3, 2024
4a6951f
refactor: remove evm extra
mochaaP Jan 8, 2024
af939fe
Merge pull request #1434 from mcha-forks/remove-evm
xwings Jan 8, 2024
93e62f1
deps: migrate to Poetry & pyproject.toml
mochaaP Sep 23, 2023
b45d81e
ci: migrate to Poetry
mochaaP Sep 23, 2023
0dad55c
docker: migrate to Poetry
mochaaP Sep 23, 2023
082b718
Merge pull request #1387 from mcha-forks/dev
xwings Jan 9, 2024
1f3eb48
Fix #1436
elicn Jan 12, 2024
0e79270
Fix #1430
elicn Jan 13, 2024
effe4f4
Fix #1433
elicn Jan 13, 2024
e80fa26
Improve file mapping support
elicn Jan 13, 2024
416b685
Merge pull request #1437 from elicn/dev-win
xwings Jan 14, 2024
0f0f950
Merge pull request #1429 from LiuDoo/add_socketopt_const_dev
xwings Jan 14, 2024
c6de544
Merge pull request #1427 from dotCirill/bugfix/1416
xwings Jan 14, 2024
68558df
Fix POSIX iovec definition
elicn Feb 4, 2024
b8ad3eb
Revamp POSIX syscalls readv / writev
elicn Feb 4, 2024
b212bf8
Keep default top of stack aligned on Linux
elicn Feb 4, 2024
766972d
support FILE_GENERIC_* access modes
matt-phylum Jan 30, 2024
89123fd
fix: project metadata and docker builds
mochaaP Jan 9, 2024
7e7655e
fix: remove Python 2 compat in qltui
mochaaP Jan 9, 2024
c76fcb6
Merge pull request #1445 from elicn/dev-posix
xwings Feb 11, 2024
2525299
Let Unicorn know the invalid insn has been handled
elicn Feb 28, 2024
67ca97c
Introduce hook_insn_invalid to hook invalid instructions
elicn Feb 28, 2024
96ebbc1
Minor changes
elicn Feb 28, 2024
66136d4
Merge pull request #1453 from elicn/dev-core
xwings Mar 11, 2024
778fbf7
Make logger setup more flexible
elicn Mar 6, 2024
8515a27
Adjust existing code
elicn Mar 6, 2024
bc83042
Fix qltool
elicn Mar 6, 2024
a23ad9e
Postone masked interrupts
syl-syn Mar 22, 2024
08a780b
Revamp AFL extension
elicn Mar 13, 2024
287cc9f
Fix and improve AFL linux example
elicn Mar 13, 2024
bdda8e8
Add a utility class to simplify custom AFL fuzzing
elicn Mar 13, 2024
76bb092
add reloc type R_ARM_ABS32,R_ARM_CALL,R_ARM_JUMP24
coc-cyqh Jul 1, 2024
9196ea0
Propagate correct error from path-related POSIX syscalls
elicn Feb 15, 2024
712201a
Propagate correct error from more POSIX syscalls
elicn Feb 15, 2024
ff905af
Detect more error cases
elicn Feb 15, 2024
b9c1b3a
Redefine POSIX file open flags
elicn Feb 15, 2024
46bc215
Fix the POSIX creat syscall
elicn Feb 15, 2024
96bf36c
Final touchups
elicn Feb 15, 2024
9637d16
Improve POSIX read and write syscalls robustness
elicn Feb 15, 2024
a17b5df
Tidy up TENDA test
elicn Feb 15, 2024
7763063
Redefine POSIX socket constants as enums
elicn Feb 16, 2024
e803fb2
Relocate QNX mmap prot flags
elicn Feb 16, 2024
23de927
Adjust imports accordingly
elicn Feb 16, 2024
92822a8
Refine flags resolving
elicn Feb 16, 2024
bb57f6f
Propagate correct error from POSIX socket syscalls
elicn Feb 16, 2024
4bc4f90
Propagate correct error from even more POSIX syscalls
elicn Feb 20, 2024
fef6134
More POSIX syscalls error propagation
elicn Feb 21, 2024
1c90e4a
Introduced 'as_signed' utility method for turning unsigned values int…
elicn Feb 21, 2024
055d474
Support reading and writing signed values through existing accessor m…
elicn Feb 21, 2024
4371215
Fixes related to latest changes
elicn Feb 21, 2024
6d2818b
Handle address in use errors
elicn Jun 27, 2024
04e42e0
Merge pull request #1479 from coc-cyqh/master
xwings Jul 3, 2024
bf061a3
Example fuzzer for RT-N12 httpd
userz Jul 7, 2024
69f21d8
solve a IDAPython relocation issue
Jul 15, 2024
3ee48e4
Begin addressing elicn feedback, arg parser needs reworking
userz Jul 16, 2024
b1d0217
Rework arg parser, address other points
userz Jul 19, 2024
cb1cf68
git...
userz Jul 19, 2024
5bc4834
Fix two remaining points
userz Jul 21, 2024
e89a1ba
fix 20 typos
RoboSchmied Mar 21, 2024
75121cc
Fix for running Qiling inside of IDAPython interpreter.
Jul 10, 2024
a418ace
Catching AttributeError versus redirecting it to UnsupportedOperation
Jul 16, 2024
8c40169
Remove memory accessors
elicn Aug 31, 2022
50447df
Read integer values properly from profile
elicn Sep 8, 2022
6b5dd55
Align memory info with other OS
elicn Sep 11, 2022
195d6e0
Add more typing annotations
elicn Dec 31, 2023
f893d4a
Avoid using obsolete binascii
elicn Dec 31, 2023
78a81f9
Adjust indentation after convertion to spaces
elicn Jan 1, 2024
0ff0097
Improve GetVariable / SetVariable compatibility
elicn Jan 2, 2024
ea5bd58
Manage TSEG properties with struct data
elicn Jan 2, 2024
fdec547
Avoid unrecommended inspect.currentframe
elicn Jan 8, 2024
334fe70
Fine-tune imports and type annotations
elicn Jan 8, 2024
b5477ec
Align UEFI structures with all other OS
elicn Feb 9, 2024
152d51a
Minor enhancements and styling changes
elicn Feb 9, 2024
8c3a5dc
Allow munamp length exceed mapped size
elicn Jul 2, 2024
ea1a17b
Merge pull request #1485 from co-neco/solve_IDAPython_relocation_issue
kabeor Aug 9, 2024
2367449
Fix qilingida problems caused by custom stderr
elicn Sep 26, 2024
3d71cf9
Merge pull request #1489 from elicn/dev-periodic
xwings Oct 8, 2024
ac0743a
solve a IDAPython relocation issue
Jul 15, 2024
1e175c0
Allow loading UEFI PE with the proper sections perms
elicn Sep 26, 2024
6cd5f26
Imports cleanup and annotation fixes
elicn Oct 10, 2024
8db61c1
Be more tolerant to missing regs
elicn Oct 10, 2024
210daf5
Replace deprecated ARM regs with CP regs definitions
elicn Oct 10, 2024
72a5187
Introduce CP regs accessors to ARM/ARM64
elicn Oct 10, 2024
3c5ff2d
Modify ARM code to use new CP regs accessors
elicn Oct 10, 2024
9ee9b3c
Better distinguish x86 registers supported only on 64-bit mode
elicn Oct 10, 2024
20d0bf5
Decorate Uc subclasses as such
elicn Oct 10, 2024
b15e541
Set x86 tests that use SSE to a CPU model that supports it
elicn Oct 10, 2024
4bbe038
Change mmap address to make MIPS programs happy
elicn Oct 10, 2024
2bb0a2e
Use weakrefs in circular references to improve GC
elicn Oct 10, 2024
a027f46
Opportunistic styling and annotation fixes
elicn Oct 10, 2024
a9ae692
Merge pull request #1488 from elicn/dev-uefi
xwings Oct 11, 2024
1a00eb1
fix null byte truncation in __place_input_wrapper
golem9247 Oct 21, 2024
2a7d8f9
__place_input_wrapper : use input_bytes.raw instead of inputs_bytes.v…
golem9247 Oct 23, 2024
2a3c9f1
Fix up arch_convert in utils.py
MuziStudio Oct 29, 2024
7f5cca4
Adjust MIPS regs
elicn Oct 31, 2024
d05ac7b
Improve ELF AUXV compatibility
elicn Oct 31, 2024
8b34114
Fix ARM fcall unwind
elicn Oct 31, 2024
2322729
Update tendaac1518_httpd.py
fripSide Nov 11, 2024
7ec1187
Refactor CC arguments lists
elicn Nov 17, 2024
32984d6
Fix FreeBSD breakage
elicn Nov 17, 2024
6385ac4
Merge pull request #1509 from fripSide/patch-3
xwings Nov 25, 2024
64083f2
Merge pull request #1504 from MuziStudio/master
xwings Nov 25, 2024
f765bcf
Merge pull request #1480 from libumem/master
xwings Nov 25, 2024
a1b38a8
Roll unicorn back to 2.0.1.post1 for the moment to get a green check
xwings Nov 25, 2024
56a08da
Merge pull request #1517 from qilingframework/xwings-patch-1
xwings Nov 25, 2024
40fc012
update Poetry
xwings Nov 25, 2024
e371b61
Merge pull request #1518 from xwings/dev
xwings Nov 25, 2024
53318ba
Merge pull request #1503 from golem9247/patch-1
xwings Nov 25, 2024
fc6aff4
Merge pull request #1493 from elicn/ida-stderr-fix
xwings Nov 25, 2024
bc5a0a8
Update pythonpublish.yml
xwings Nov 25, 2024
6c1d77c
Merge pull request #1520 from qilingframework/xwings-patch-3
xwings Nov 25, 2024
f3f4174
fixed predict function maybe misleading by zero in branch_predictor_a…
ucgJhe Dec 20, 2024
d0cd4ea
added missing parameter
ucgJhe Dec 20, 2024
aa59bce
Merge pull request #1521 from ucgJhe/qdb
xwings Jan 20, 2025
40b1294
Update README.md, remove EVM platform
andelf Jan 29, 2025
65881e6
Remove overlooked MIPS regs
elicn Feb 16, 2025
de3f540
Merge pull request #1533 from andelf/patch-2
xwings Feb 16, 2025
0f9311a
Merge pull request #1465 from sydpy/dev-postpone-interrupts
xwings Feb 16, 2025
c22740e
Bumping up Unicorn dependency
elicn Feb 17, 2025
78f20a5
Revert "Bumping up Unicorn dependency"
elicn Feb 17, 2025
0cef716
Fix stack alignment for MIPS
elicn Feb 17, 2025
b1f999c
Bumping up Unicorn dependency (again)
elicn Feb 17, 2025
057ac44
Merge branch 'dev' into uc2.2-adjustments
elicn Feb 17, 2025
e82ae36
Narrow down import scope
elicn Feb 17, 2025
5e60b04
Adjust count to address MIPS delay slot random breakage
elicn Feb 18, 2025
bd648a2
Enable access to ARM coprocessor regs as properties
elicn Feb 18, 2025
a406907
Save and restore ARM coprocessor register as part of Qiling save and …
elicn Feb 18, 2025
0bc8dec
Insignificant endianess fix
elicn Feb 18, 2025
857addc
Have QDB save and restore arch-specific regs
elicn Feb 20, 2025
b25c910
Fix QDB bug where prophecy target could be None
elicn Feb 20, 2025
0328e26
Fix QDB bug that mistreats prophecy prediction
elicn Feb 20, 2025
76d7e5e
Publish ContextRender, Prophecy and BranchPredictor to allow effectiv…
elicn Feb 20, 2025
ba87678
Housekeeping for QDB
elicn Feb 20, 2025
7929c36
Extract publicly used decorators
elicn Feb 20, 2025
273d79d
Import necessary types
elicn Feb 20, 2025
2a3e205
Fix historical issue with http server tests
elicn Feb 20, 2025
ad97484
Add missin xreg to transform output
elicn Feb 20, 2025
eb86d8c
Add missin xreg to transform output
elicn Feb 20, 2025
02f121b
Enable debug logging on Android tests
elicn Mar 3, 2025
8ac63bc
join threads
wtdcode Mar 7, 2025
853b9e9
join threads correctly
wtdcode Mar 7, 2025
4f9fd30
Unicorn 2.1.3
wtdcode Mar 7, 2025
ad799ff
More timeout
wtdcode Mar 7, 2025
5dbde89
Merge pull request #1499 from elicn/uc2.2-adjustments
xwings Mar 8, 2025
fcd1f81
test python 3.11 and latest ubuntu
xwings Mar 8, 2025
31845be
Merge pull request #1539 from xwings/dev
xwings Mar 8, 2025
901b047
update poetry.lock
xwings Mar 8, 2025
3769af2
Merge pull request #1540 from xwings/dev
xwings Mar 8, 2025
cf325d3
get ready for 1.4.7
xwings Mar 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
!/qiling/
!/poetry.lock
!/pyproject.toml
!/ql*
!/README.md
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://editorconfig.org

# top-most EditorConfig file
root = true

[*.py]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
86 changes: 40 additions & 46 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,82 +10,76 @@ jobs:
fail-fast: false
matrix:
#os: [windows-2019, macos-10.15, ubuntu-18.04, ubuntu-20.04]
os: [windows-latest, ubuntu-20.04]
python-version: [3.8, 3.9]
os: [windows-latest, ubuntu-22.04]
python-version: ["3.9", "3.11"]
include:
- os: ubuntu-22.04
python-version: 3.9
container: Docker

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

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Win setup MSVC
if: contains(matrix.os, 'windows')
uses: microsoft/setup-msbuild@v1

- name: Win setup MSVC
if: contains(matrix.os, 'windows')
uses: microsoft/setup-msbuild@v1


- name: Win configure Pagefile
if: contains(matrix.os, 'windows')
uses: al-cheb/[email protected]
with:
- name: Win configure Pagefile
if: contains(matrix.os, 'windows')
uses: al-cheb/[email protected]
with:
minimum-size: 16GB
maximum-size: 16GB
disk-root: "C:"


- name: win run tests
if: contains(matrix.os, 'windows')
shell: bash
run: |
- name: win run tests
if: contains(matrix.os, 'windows')
shell: bash
run: |
powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableArchiveScanning \$true'"
powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableBehaviorMonitoring \$true'"
powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableRealtimeMonitoring \$true'"
powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Add-MpPreference -ExclusionPath $GITHUB_WORKSPACE'"
pip3 install setuptools wheel
pip3 install .
cd examples
rm -rf rootfs
curl -LJk -o master.zip https://github.com/qilingframework/rootfs/archive/refs/heads/master.zip && unzip master.zip
mv rootfs-master rootfs
cd $GITHUB_WORKSPACE
cd "$GITHUB_WORKSPACE"
cmd.exe //C 'examples\scripts\dllscollector.bat'
cd $GITHUB_WORKSPACE/examples/rootfs/x86_windows/bin
cd "$GITHUB_WORKSPACE/examples/rootfs/x86_windows/bin"
unzip -Pinfected wannacry.bin.zip
unzip -Pinfected UselessDisk.bin.zip
unzip -Pinfected GandCrab502.bin.zip
unzip -Pinfected al-khaser.bin.zip
unzip -Pinfected sality.dll.zip
cd $GITHUB_WORKSPACE/tests
cd "$GITHUB_WORKSPACE/tests"
cmd.exe //C '.\test_pe.bat'

- name: linux run tests
if: contains(matrix.os, 'ubuntu')
shell: 'script -q -e -c "bash {0}"'
run: |
cd examples
rm -rf rootfs
wget https://github.com/qilingframework/rootfs/archive/refs/heads/master.zip
unzip master.zip && mv rootfs-master rootfs
cd ../qiling
cd ../examples/rootfs/x86_linux/kernel && unzip -P infected m0hamed_rootkit.ko.zip
cd ../../../../
pip3 install -e .[RE]

- name: linux run tests
if: contains(matrix.os, 'ubuntu')
shell: 'script -q -e -c "bash {0}"'
run: |
cd examples
rm -rf rootfs
wget https://github.com/qilingframework/rootfs/archive/refs/heads/master.zip
unzip master.zip && mv rootfs-master rootfs
cd ../qiling
cd ../examples/rootfs/x86_linux/kernel && unzip -P infected m0hamed_rootkit.ko.zip
cd ../../../../
pip3 install -e .[evm,RE]

if [ ${{ matrix.os }} == 'ubuntu-18.04' ] and [ ${{ matrix.python-version }} == '3.9' ]; then
docker run -it --rm -v ${GITHUB_WORKSPACE}:/qiling qilingframework/qiling:dev bash -c "cd tests && ./test_onlinux.sh"
else
pip3 install setuptools wheel
cd tests && ./test_onlinux.sh
fi

if [ ${{ matrix.os }} == 'ubuntu-18.04' ] and [ ${{ matrix.python-version }} == '3.9' ]; then
docker run -it --rm -v ${GITHUB_WORKSPACE}:/qiling qilingframework/qiling:dev bash -c "cd tests && ./test_onlinux.sh"
else
pip3 install poetry
cd tests && ./test_onlinux.sh
fi

# - name: mac run tests
# if: contains(matrix.os, 'macos')
Expand All @@ -97,4 +91,4 @@ jobs:
# cd $GITHUB_WORKSPACE/examples/rootfs/x8664_macos/kext
# unzip -Pinfected SuperRootkit.kext.zip
# cd $GITHUB_WORKSPACE/tests
# ./test_macho.sh
# ./test_macho.sh
2 changes: 1 addition & 1 deletion .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout git repo'
- name: "Checkout git repo"
uses: actions/checkout@v1

- name: Publish to registry
Expand Down
33 changes: 16 additions & 17 deletions .github/workflows/giteesync.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
name: sync to gitee
on:
push:
name: sync to gitee
on:
push:

jobs:
deploy:
runs-on: ubuntu-latest
if: github.repository_owner == 'qilingframework'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: xwings/sync-repo-action@master
with:
run: git config --global --add safe.directory *
ssh_private_key: ${{ secrets.GITEE_KEY }}
target_repo: ssh://[email protected]/qilingframework/qiling.git

jobs:
deploy:
runs-on: ubuntu-latest
if: github.repository_owner == 'qilingframework'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: xwings/sync-repo-action@master
with:
run: git config --global --add safe.directory *
ssh_private_key: ${{ secrets.GITEE_KEY }}
target_repo: ssh://[email protected]/qilingframework/qiling.git
29 changes: 13 additions & 16 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,25 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install setuptools wheel
- name: Build distribution 📦
run: |
pip install .
python setup.py sdist bdist_wheel
- uses: actions/upload-artifact@v2
with:
path: ${{ github.workspace }}/dist/*
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "^3.8"
- name: Install dependencies
run: pipx install poetry
- name: Build distribution 📦
run: poetry build -n
- uses: actions/upload-artifact@v4
with:
path: ${{ github.workspace }}/dist/*

publish:
needs: [build]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
Expand Down
50 changes: 41 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,10 @@
.DS_Store
.vscode
.idea
*.pyc
*.cache
*.cache2
.*.swp
*.raw
.venv

# cache and misc
qiling.egg-info/
__pycache__/
*.py[cod]
build
dist

# test and logs
tests/mac_test_elf.sh
Expand All @@ -38,3 +29,44 @@ core
tests/output.txt
tests/testtest_*

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# Distribution / packaging
build/
develop-eggs/
dist/
eggs/
sdist/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Environments
.env
.venv
venv/

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
poetry.toml

# ruff
.ruff_cache/

# LSP config files
pyrightconfig.json
42 changes: 25 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
FROM python:3.8-slim AS builder
FROM python:3-slim AS base

LABEL maintainer="Kevin Foo <chfl4gs@qiling.io>"
WORKDIR /qiling

# hadolint global ignore=DL3008,DL3013
ENV DEBIAN_FRONTEND=noninteractive
ENV AM_I_IN_A_DOCKER_CONTAINER Yes
ENV AM_I_IN_A_DOCKER_CONTAINER=True

RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get install -y --no-install-recommends cmake build-essential gcc git
RUN apt-get update && apt-get -y upgrade && rm -rf /var/lib/apt/lists/*


FROM base AS builder

COPY . /qiling
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake build-essential gcc git \
&& rm -rf /var/lib/apt/lists/*

RUN cd /qiling \
&& pip wheel . -w wheels
COPY pyproject.toml poetry.lock ./
RUN pip3 install --no-cache-dir poetry \
&& poetry install --no-root --no-directory

FROM python:3.8-slim AS base
COPY . .
RUN poetry install --only main && poetry build --format=wheel

FROM base

LABEL maintainer="Kevin Foo <[email protected]>"

COPY --from=builder /qiling /qiling

WORKDIR /qiling

RUN apt-get update \
&& apt-get install -y --no-install-recommends unzip apt-utils \
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install --no-deps wheels/*.whl \
&& rm -rf wheels

ENV HOME /qiling
&& apt-get install -y --no-install-recommends unzip apt-utils \
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install --no-deps --no-cache-dir dist/*.whl \
&& rm -rf ./dist/

CMD bash
CMD ["bash"]
Loading
Loading