Skip to content

Commit

Permalink
adding more ioncube options
Browse files Browse the repository at this point in the history
  • Loading branch information
MuriloChianfa committed Oct 22, 2024
1 parent 00313b7 commit c9723d1
Show file tree
Hide file tree
Showing 11 changed files with 290 additions and 31 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,19 @@ jobs:
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.'
stale-issue-message:
'This issue is stale because it has been open 30 days with no
activity. Remove stale label or comment or this will be closed in 5
days.'
stale-pr-message:
'This PR is stale because it has been open 45 days with no activity.
Remove stale label or comment or this will be closed in 10 days.'
close-issue-message:
'This issue was closed because it has been stalled for 5 days with
no activity.'
close-pr-message:
'This PR was closed because it has been stalled for 10 days with no
activity.'
days-before-issue-stale: 30
days-before-pr-stale: 45
days-before-issue-close: 5
Expand Down
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,13 @@ jobs:
_(default: false)_
- **_replace-target_**: Mode to replace target file/directory if not exists.
_(default: false)_
- **_copy_**: Path of files to just copy without encrypt or encode.
_(default: '')_
- **_ignore_**: Path of files to just ignore on ioncube walkthrough.
_(default: '')_
- **_skip_**: Path of files to just skip on ioncube walkthrough.
_(default: '')_
- **_obfuscate_**: Type of PHP entities to obfuscate: all,locals,functions,methods,classes,linenos,none.
_(default: 'none')_
- **_copy_**: Path of files to just copy without encrypt or encode. _(default:
'')_
- **_ignore_**: Path of files to just ignore on ioncube walkthrough. _(default:
'')_
- **_skip_**: Path of files to just skip on ioncube walkthrough. _(default: '')_
- **_obfuscate_**: Type of PHP entities to obfuscate:
all,locals,functions,methods,classes,linenos,none. _(default: 'none')_
- **_obfuscation-key_**: Key to obfuscation method to apply on PHP entities.
_(default: '')_
Expand Down
52 changes: 46 additions & 6 deletions __tests__/main.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,26 @@ describe('action', () => {
17,
'Using callback file in runtime path: NONE'
)
expect(debugMock).toHaveBeenNthCalledWith(18, 'Adding copy path: NONE')
expect(debugMock).toHaveBeenNthCalledWith(19, 'Adding ignore path: NONE')
expect(debugMock).toHaveBeenNthCalledWith(20, 'Adding a path to skip: NONE')
expect(debugMock).toHaveBeenNthCalledWith(
21,
'Input for obfuscate option is not valid!'
)
expect(debugMock).toHaveBeenNthCalledWith(
22,
'Using obfuscate option: none'
)
expect(debugMock).toHaveBeenNthCalledWith(
23,
'Adding obfuscation-key path: NONE'
)

// No errors
expect(debugMock).toHaveBeenNthCalledWith(18, 0)
expect(debugMock).toHaveBeenNthCalledWith(19, '')
expect(debugMock).toHaveBeenNthCalledWith(20, '')
expect(debugMock).toHaveBeenNthCalledWith(24, 0)
expect(debugMock).toHaveBeenNthCalledWith(25, '')
expect(debugMock).toHaveBeenNthCalledWith(26, '')

expect(setOutputMock).toHaveBeenCalledWith(
'status',
Expand Down Expand Up @@ -128,11 +143,36 @@ describe('action', () => {
17,
'Using callback file in runtime path: public/ioncube.php'
)
expect(debugMock).toHaveBeenNthCalledWith(
18,
'Creating target file/directory if not exists'
)
expect(debugMock).toHaveBeenNthCalledWith(
19,
'Replacing target file/directory'
)
expect(debugMock).toHaveBeenNthCalledWith(20, 'Adding copy path: NONE')
expect(debugMock).toHaveBeenNthCalledWith(
21,
'Adding ignore path: */cache/*'
)
expect(debugMock).toHaveBeenNthCalledWith(
22,
'Adding a path to skip: */vendor/*'
)
expect(debugMock).toHaveBeenNthCalledWith(
23,
'Using obfuscate option: classes'
)
expect(debugMock).toHaveBeenNthCalledWith(
24,
'Adding obfuscation-key path: CHANGEME'
)

// No errors
expect(debugMock).toHaveBeenNthCalledWith(18, 0)
expect(debugMock).toHaveBeenNthCalledWith(19, '')
expect(debugMock).toHaveBeenNthCalledWith(20, '')
expect(debugMock).toHaveBeenNthCalledWith(25, 0)
expect(debugMock).toHaveBeenNthCalledWith(26, '')
expect(debugMock).toHaveBeenNthCalledWith(27, '')

expect(setOutputMock).toHaveBeenCalledWith(
'status',
Expand Down
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c9723d1

Please sign in to comment.