Skip to content

Commit

Permalink
Merge pull request #4 from surfstudio/SPT-1327-obfuscator-release
Browse files Browse the repository at this point in the history
SPT-1327 Подготовка первого релиза
  • Loading branch information
chausovSurfStudio committed Apr 13, 2023
2 parents 6aa4225 + 105ed8c commit 918c9cd
Show file tree
Hide file tree
Showing 9 changed files with 154 additions and 49 deletions.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: chausovSurfStudio

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Library version and device type**
- iOS version: [e.g. 14.0]
- device type: [e.g. iPhone 6+]
- Version [e.g. 1.0.0]

**Additional context**
Add any other context about the problem here.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,34 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE]"
labels: update
assignees: chausovSurfStudio

---

# General description of the problem
**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 [...]

# Playback Steps
**A detailed description of how to reproduce the problem.**
Be sure to specify the settings for the input field - for example, with what parameters the mask for the input field is applied, what is the height policy, etc.
- step 1
- step 2

# Expected behavior
**Describe the expected behavior that you expect to see by reproducing the problem through the indicated steps**

# Actual behavior
**What is really happening and why it seems wrong to you**

**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.
17 changes: 17 additions & 0 deletions .github/pull_request_template.md
@@ -0,0 +1,17 @@
# What is done

- first
- second
- third

# What to look for

- first
- second
- third

# How to check

- first
- second
- third
14 changes: 10 additions & 4 deletions .github/workflows/CIBuild.yml
@@ -1,17 +1,23 @@
name: Swift
name: Build

on:
push:
branches: [ "main" ]
branches:
- main
pull_request:
branches: [ "main" ]
branches:
- '**'
types: [ opened, edited, synchronize, reopened ]

jobs:
build:

runs-on: macos-latest
runs-on: macos-12

steps:
- uses: actions/checkout@v3
- name: Force select Xcode 14
run: |
sudo xcode-select -switch /Applications/Xcode_14.2.app
- name: Build
run: swift build -v
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -7,3 +7,4 @@ DerivedData/
.swiftpm/config/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
Package.resolved
9 changes: 9 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,9 @@
# Changelog

## 1.0.0

First version that included:
- ability to obfuscate and decrypt string literal
- comment addition into the changed file
- addition `import Obfuscator`, `Obfuscator` extension for decryption and `swiftlint:disable line_length` into the changed file
- skip multi-line string literal
21 changes: 21 additions & 0 deletions LICENSE
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Surf

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
39 changes: 30 additions & 9 deletions README.md
@@ -1,14 +1,24 @@
# SwiftObfuscator

Byte Code Obfuscator for Encrypting Strings
Changes a string literal, adds a decryption extension to the file with the encrypted string.
[![GitHubActions Build Status](https://github.com/surfstudio/Surf-SwiftObfuscator/workflows/Build/badge.svg)](https://github.com/surfstudio/Surf-SwiftObfuscator/actions)
[![SPM Compatible](https://img.shields.io/badge/SPM-compatible-blue.svg)](https://github.com/apple/swift-package-manager)

## Setup:
Byte Code Obfuscator for Strings Encrypting.

Just add the package to your project
Or download it separately, you will need to transfer the Obfuscator swift file to your project.
[![SwiftObfuscator](https://i.ibb.co/g9wMLyb/Surf-Obfuscator.png)](https://github.com/surfstudio/SurfPlaybook)

## Usage:
## About

Encrypts a string literal, adds a decryption extension to the file with the encrypted string.

## Installation

#### Swift Package Manager

- Into the Xcode `File > Swift Packages > Add Package Dependency`
- Enter repository URL `https://github.com/surfstudio/Surf-SwiftObfuscator`

## Usage

- Right click on the package and select "Show in Finder"
- Right-click on the folder with the "Surf-SwiftObfuscator" package and select "new terminal by folder adress" from the context menu
Expand All @@ -23,9 +33,9 @@ Parameters:
`-l` or `--line <line>` The line number on which strings should be obfuscated. By default, all lines will be obfuscated.


### Example:
#### Example

To obfuscate all lines in a file in the terminal that opens, type:
To obfuscate all lines in a file in the terminal that opens, type:

```bash
swift run SwiftObfuscator -f ../MyProject/Tokens.swift -s somesalt
Expand All @@ -36,8 +46,9 @@ If you need to obfuscate a specific string then use:
swift run SwiftObfuscator -f ../MyProject/Tokens.swift -s somesalt -l 135
```

### File Changes
#### Result example

<details>
File before change:

```swift
Expand Down Expand Up @@ -94,3 +105,13 @@ fileprivate extension Obfuscator {

}
```

</details>

## Changelog

You can see list of all changes in this [file](./CHANGELOG.md).

## License

[MIT License](./LICENSE)
36 changes: 0 additions & 36 deletions roadmap.md

This file was deleted.

0 comments on commit 918c9cd

Please sign in to comment.