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

Restoring main as default branch #88

Merged
merged 51 commits into from
Aug 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
236def2
- updated plugins for new gef api
Feb 4, 2022
b10b649
Merge branch 'master' of github.com:hugsy/gef-extras
Feb 4, 2022
eec0847
Update ARM-M architecture for new supports_gdb_arch() callback
Bobo1239 Feb 14, 2022
6052ae4
Update M68K arch
Bobo1239 Feb 14, 2022
4869692
fix `visualize_heap` command for new gef api
ebubekirtrkr Feb 26, 2022
97ced69
fix incorrect type being passed to gef_print() in `current-stack-fram…
Dylan-Brotherston Mar 3, 2022
75f7267
Merge pull request #50 from Bobo1239/update-arm-m
hugsy Mar 4, 2022
75f9af0
Merge pull request #51 from Bobo1239/fix-m68k
hugsy Mar 4, 2022
a4ce5eb
Merge pull request #52 from ebubekirtrkr/dev
hugsy Mar 4, 2022
2686b56
Merge pull request #53 from Dylan-Brotherston/dev
hugsy Mar 4, 2022
e2aaba1
Fix gdb error "read_memory not defined"
jodojodo Mar 13, 2022
3136d28
Use the gef provided function
jodojodo Mar 16, 2022
79b7b0a
Merge pull request #54 from jodojodo/patch-1
hugsy Mar 21, 2022
031b50e
Fix 'set_gef_setting' is deprecated warning
ChinaNuke Apr 21, 2022
e9ed2e3
Merge pull request #56 from ChinaNuke/patch-1
hugsy Apr 26, 2022
9b09eb0
Fix the broken link for libc argument doc (#60)
lebr0nli May 22, 2022
2d4d069
fix `visualize_heap` for new api
May 22, 2022
c1ee0aa
Merge branch 'master' into dev
May 22, 2022
9a160e8
merge fix
May 22, 2022
c28ab60
Added 3rd party to gef-extras (#61)
hugsy Jun 13, 2022
0cc2269
Get rid of rtfd, use ghpages instead (#63)
hugsy Jun 17, 2022
c3e5c9c
Apply the changes brought by hugsy/gef#839 (#62)
hugsy Jun 19, 2022
57122d5
documented: keep x86 and x86_64 FLAGS Register when calls to mprotect…
therealdreg Jun 20, 2022
a3417fb
`master` -> `main` (#65)
hugsy Jun 20, 2022
3d83535
Update discord-notify.yml
hugsy Jun 20, 2022
4b88c87
Create PULL_REQUEST_TEMPLATE.md
hugsy Jun 24, 2022
c5910ca
Fix: stack-view command Stack bounds retrieval when in frame 0 (#67)
noahboegli Jun 28, 2022
9ca384f
Update PULL_REQUEST_TEMPLATE.md
hugsy Jun 30, 2022
93e06db
Quick fix for `ropper.py` (#73)
hugsy Jun 30, 2022
5b7d7ed
Restored `heap-view` to a working state (#71)
hugsy Jul 2, 2022
4261e38
Add `syscall-args` and `is-syscall` (#74)
hugsy Jul 2, 2022
ab69626
Update run-tests.yml (#78)
hugsy Jul 5, 2022
2744d59
Move `glibc-function-args` to GEF-Extras (#75)
hugsy Jul 5, 2022
35eaf9d
Fix `visualize_heap` (#77)
hugsy Jul 10, 2022
7b7e5f3
Update run-tests.yml
hugsy Jul 10, 2022
4775e13
removing makefile
Oct 10, 2022
98ea0a8
Update skel.py
hugsy Oct 19, 2022
53772d6
Merge branch 'dev' of github.com:hugsy/gef-extras into dev
Oct 19, 2022
4deb705
Update skel.py
hugsy Oct 19, 2022
2180b26
Update skel.py
hugsy Oct 20, 2022
31bfa5f
Merge branch 'dev' of github.com:hugsy/gef-extras into dev
Oct 20, 2022
ccc7fa6
add gitattributes, editorconfig and replaced files with crlf with lf
Oct 21, 2022
8bc02eb
deleted makefile, removed `set-output` directives
Oct 21, 2022
2f997a6
Update architectures (#82)
Bobo1239 Oct 26, 2022
6c31c18
Update requirements.txt
hugsy Nov 8, 2022
f62a009
Merge branch 'dev' of github.com:hugsy/gef-extras into dev
Nov 11, 2022
96c218a
[ropper -> 0.3] fixed bad type in path comparison
Mar 20, 2023
50e96ae
Update ropper.py
hugsy Mar 21, 2023
1fd89ef
missing space index.md (#86)
therealdreg Aug 3, 2023
0a04af6
Missing `pytest-cov` for `tests/requirements.txt`
hugsy Aug 3, 2023
60230a3
[CI] Restore CI (#87)
hugsy Aug 4, 2023
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
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties

root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.py]
indent_style = space
indent_size = 4

[Makefile]
indent_style = tab

[*.yml]
indent_style = space
indent_size = 2
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# https://help.github.com/articles/dealing-with-line-endings/
* text eol=lf
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

github: [hugsy,]

64 changes: 64 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
name: Bug report
about: Help us improve GEF by filling up this report correctly
title: ''
labels: triage
assignees: ''

---
<!--Your issue will be closed unless you confirm the following (insert `x` in the
brackets if done/agreed):-->

* [ ] Did you use the latest version of GEF from `dev` branch?
* [ ] Is your bug specific to GEF (not GDB)? - Try to reproduce it running `gdb -nx`
* [ ] Did you search through the [documentation](https://github.com/hugsy/gef/) first?
* [ ] Did you check [issues](https://github.com/hugsy/gef/issues) (including
the closed ones) - and the [PR](https://github.com/hugsy/gef/pulls)?


### Step 1: Describe your environment

* Operating System / Distribution:
* Architecture:
* GEF version (including the Python library version) run `version` in GEF.


### Step 2: Describe your problem

#### Steps to reproduce

1.

#### Minimalist test case

<!--Adding a test case goes a long way to help reproduce the issue. This can be
done by either attaching a test binary, including a docker file, providing a
binary to run, or including source code, **with** its compilation environment
and options.-->

```c
// compile with gcc -fPIE -pic -o my_issue.out my_issue.c
int main(){ return 0; }
```

#### Observed Results

* What happened? This could be a description, log output, etc.


#### Expected results

* What did you expect to happen?

#### Traces

<!--Feel free to include in this section screenshots or stack traces.

If you enable `gef.debug` (`gef config gef.debug 1`), gef will display a
full stack trace when an exception occurs. It is a good idea to copy/paste it here
(and/or add a screen shot) as it contains useful information that will make it easier
to reproduce.

**The more info is provided, the more likely your issue will be able to be
reproduced and investigated.**
-->
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Feature request
about: Had an idea of a new useful feature for GEF, but can't implement it? Here's
your chance
title: ''
labels: enhancement, new feature
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
31 changes: 31 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

## Description/Motivation/Screenshots

<!-- Describe technically what your patch does. -->
<!-- Why is this change required? What problem does it solve? -->
<!-- Why is this patch will make a better world? -->
<!-- How does this look? Add a screenshot if you can -->


## How Has This Been Tested ?

"Tested" indicates that the PR works *and* the unit test (i.e. `make test`) run passes without issue.

* [ ] x86-32
* [ ] x86-64
* [ ] ARM
* [ ] AARCH64
* [ ] MIPS
* [ ] POWERPC
* [ ] SPARC
* [ ] RISC-V

## Checklist

<!-- N.B.: Your patch won't be reviewed unless fulfilling the following base requirements: -->
<!--- Put an `x` in all the boxes that are complete, or that don't apply -->
- [ ] My PR was done against the `dev` branch, not `main`.
- [ ] My code follows the code style of this project.
- [ ] My change includes a change to the documentation, if required.
- [ ] If my change adds new code, [adequate tests](https://hugsy.github.io/gef/testing) have been added.
- [ ] I have read and agree to the [CONTRIBUTING](https://github.com/hugsy/gef/blob/main/.github/CONTRIBUTING.md) document.
43 changes: 23 additions & 20 deletions .github/workflows/discord-notify.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
name: "Discord Notification"
on: [push, pull_request, issues]


on:
push:
branches:
- main
- dev

pull_request:
branches:
- main
- dev

env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}

Expand All @@ -11,55 +23,46 @@ jobs:
with:
fetch-depth: 0

- name: GEF Push Notification
- name: GEF-Extras Push Notification
if: github.event_name == 'push' && github.repository_owner == 'hugsy'
uses: sarisia/actions-status-discord@v1
with:
nodetail: true
title: "[${{ github.repository }}] ${{ github.actor }} pushed to `${{ github.ref }}`"
description: |
**Commit delta**: `${{ github.event.before }}` → `${{ github.event.after }}`
---
**Changes**: ${{ github.event.compare }}
---
**Commits**:
● ${{ join(github.event.commits.*.message, '
● ') }}

---
**Link**: ${{ github.event.compare }}
color: 0x0000ff
username: ${{ github.actor }} via GithubBot
avatar_url: ${{ github.actor.avatar_url }}

- name: GEF PR Notification
if: github.event_name == 'pull_request' && github.event.action == 'opened' && github.repository_owner == 'hugsy'
- name: GEF-Extras Pull Request Notification
if: github.event_name == 'pull_request' && github.event.action == 'opened'
uses: sarisia/actions-status-discord@v1
with:
nodetail: true
title: "[${{ github.repository }}] ${{ github.actor }} created a new Pull Request (`#${{ github.event.pull_request.number }}`)"
description: |
**${{ github.event.pull_request.title }}**

${{ github.event.pull_request.body }}

---
Link: ${{ github.event.pull_request.html_url }}
color: 0xff0000
**Link**: ${{ github.event.pull_request.html_url }}
color: 0x00ff00
username: ${{ github.actor }} via GithubBot
avatar_url: ${{ github.actor.avatar_url }}

- name: GEF Issue Notification
- name: GEF-Extras Issue Notification
if: github.event_name == 'issues' && github.event.action == 'opened' && github.repository_owner == 'hugsy'
uses: sarisia/actions-status-discord@v1
with:
nodetail: true
title: "[${{ github.repository }}] ${{ github.actor }} created a new Issue (`#${{ github.event.issue.number }}`)"
description: |
**${{ github.event.issue.title }}**

${{ github.event.issue.body }}

---
Link: ${{ github.event.issue.html_url }}
color: 0x00ff00
**Link**: ${{ github.event.issue.html_url }}
color: 0xff0000
username: ${{ github.actor }} via GithubBot
avatar_url: ${{ github.actor.avatar_url }}
Binary file added .github/workflows/docs-link-check.yml
Binary file not shown.
26 changes: 26 additions & 0 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Generate GithubPages

on:
push:
branches:
- dev
- main

jobs:
deploy:
runs-on: ubuntu-latest
if: github.event.repository.fork == false
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install pre-requisite
run: |
sudo apt install gdb-multiarch python3 python3-dev python3-wheel -y
version=$(gdb -q -nx -ex 'pi print(f"{sys.version_info.major}.{sys.version_info.minor}", end="")' -ex quit)
python${version} -m pip install --requirement docs/requirements.txt --upgrade
- name: Build and publish the docs
run: |
git config --global user.name "hugsy"
git config --global user.email "hugsy@users.noreply.github.com"
mkdocs gh-deploy --force
120 changes: 120 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: CI Test for GEF-EXTRAS

env:
BRANCH: dev

on:
push:
branches:
- main
- dev

pull_request:
branches:
- main
- dev

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
name: "Run Unit tests on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v3

- name: Install python and toolchain
run: |
sudo apt-get update
sudo apt-get install -y wget gdb-multiarch python3-dev python3-pip python3-wheel python3-setuptools git cmake gcc g++ pkg-config libglib2.0-dev gdbserver
sudo python3 -m pip install --upgrade pip

- name: Set runtime environment variables
run: |
echo PY_VER=`gdb -q -nx -ex "pi print('.'.join(map(str, sys.version_info[:2])))" -ex quit` >> $GITHUB_ENV
echo NB_CPU=`grep -c ^processor /proc/cpuinfo` >> $GITHUB_ENV
echo GEF_CI_ARCH=`uname --processor` >> $GITHUB_ENV
echo GEF_CACHE_DIR=`python3 -m pip cache dir` >> $GITHUB_ENV
echo GEF_PATH_DIR=${HOME}/gef >> $GITHUB_ENV
echo GEF_PATH="${HOME}/gef/gef.py" >> $GITHUB_ENV

- name: Cache dependencies
uses: actions/cache@v3
id: cache-deps
env:
cache-name: cache-deps
with:
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
path: |
${{ env.GEF_CACHE_DIR }}
restore-keys:
${{ runner.os }}-pip-${{ env.cache-name }}-
${{ runner.os }}-pip-
${{ runner.os }}-${{ env.cache-name }}-
${{ runner.os }}-

- name: Install requirements
run: |
mkdir -p ${{ env.GEF_CACHE_DIR }}
python${{ env.PY_VER }} -m pip install --user --upgrade -r ./requirements.txt -r ./tests/requirements.txt

- name: Checkout GEF
run: |
mkdir -p ${{ env.GEF_PATH_DIR }}
wget -O ${{ env.GEF_PATH }} https://raw.githubusercontent.com/hugsy/gef/${{ env.BRANCH }}/gef.py
echo "source ${{ env.GEF_PATH }}" > ~/.gdbinit
gdb -q -ex 'gef missing' -ex 'gef help' -ex 'gef config' -ex start -ex continue -ex quit /bin/pwd

- name: Build config file
run: |
gdb -q \
-ex "gef config pcustom.struct_path '$(pwd)/structs'" \
-ex "gef config syscall-args.path '$(pwd)/syscall-tables'" \
-ex "gef config context.libc_args True" \
-ex "gef config context.libc_args_path '$(pwd)/glibc-function-args'" \
-ex 'gef save' \
-ex quit

- name: Run Tests
run: |
make -C tests/binaries -j ${{ env.NB_CPU }}
python${{ env.PY_VER }} -m pytest --forked -n ${{ env.NB_CPU }} -v -k "not benchmark" tests/

- name: Run linter
run: |
python${{ env.PY_VER }} -m pylint --rcfile=$(pwd)/.pylintrc gef.py tests/*/*.py

standalone:
runs-on: ubuntu-latest
name: "Verify GEF-Extras install from gef/scripts"
steps:
- name: Install python and toolchain
run: |
sudo apt-get update
sudo apt-get install -y wget gdb-multiarch python3-dev python3-pip python3-wheel python3-setuptools git cmake gcc g++ pkg-config libglib2.0-dev gdbserver
sudo python3 -m pip install --upgrade pip
echo PY_VER=`gdb -q -nx -ex "pi print('.'.join(map(str, sys.version_info[:2])))" -ex quit` >> $GITHUB_ENV
echo NB_CPU=`grep -c ^processor /proc/cpuinfo` >> $GITHUB_ENV
echo GEF_CI_ARCH=`uname --processor` >> $GITHUB_ENV
echo GEF_CACHE_DIR=`python3 -m pip cache dir` >> $GITHUB_ENV
echo GEF_PATH_DIR=${HOME}/gef >> $GITHUB_ENV
echo GEF_EXTRAS_PATH=${HOME}/gef-extras >> $GITHUB_ENV
echo GEF_PATH="${HOME}/gef/gef.py" >> $GITHUB_ENV

- name: Checkout GEF & GEF-Extras
run: |
mkdir -p ${{ env.GEF_PATH_DIR }} ${{ env.GEF_EXTRAS_PATH }}
wget -O ${{ env.GEF_PATH }} https://raw.githubusercontent.com/hugsy/gef/${{ env.BRANCH }}/gef.py
echo "source ${{ env.GEF_PATH }}" > ~/.gdbinit
wget -O ./gef-extras.sh https://github.com/hugsy/gef/raw/${{ env.BRANCH }}/scripts/gef-extras.sh
chmod +x ./gef-extras.sh
./gef-extras.sh -b ${{ env.BRANCH }} -p ${HOME}
gdb -q -ex 'gef missing' -ex quit
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,6 @@ ENV/
.ropeproject

.vscode
.benchmarks
.pytest_cache

Loading