Skip to content

Commit

Permalink
Merge branch 'master' into fix_install_noded
Browse files Browse the repository at this point in the history
  • Loading branch information
k9ert authored May 15, 2024
2 parents 99d4a8b + 714a8ae commit 4bd4a4c
Show file tree
Hide file tree
Showing 41 changed files with 3,455 additions and 1,525 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pyinstaller/electron/downloadloc.js
pyinstaller/electron/node_modules
pyinstaller/electron/package-lock.json
pyinstaller/electron/dist
pyinstaller/electron/signing_logs
pyinstaller/electron/fonts
pyinstaller/electron/typography.css
pyinstaller/electron/output.css
Expand Down
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
"python.testing.pytestEnabled": true,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
}
8 changes: 5 additions & 3 deletions docs/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ In order to make reasonable assumptions about how stable a specific endpoint is,

The Specter API is using JWT tokens for Authentication. In order to use the API, you need to obtain such a token. Currently, obtaining a token is not possible via the UI but only via a special endpoint, which accepts BasicAuth (as the only endpoint).

NB: The default user and password key-value pair for Specter Desktop is `admin:admin`.

## Curl:

Create the token like this:
```bash
curl -u admin:password --location --request POST 'http://127.0.0.1:25441/api/v1alpha/token' \
curl -u user:password --location --request POST 'http://127.0.0.1:25441/api/v1alpha/token' \
--header 'Content-Type: application/json' \
-d '{
"jwt_token_description": "A free description here to know for what the token is used",
Expand All @@ -35,7 +37,7 @@ As a result, you get a json like this:
The token will only be shown once. However, apart from the token itself, you can still get the details of a specific token like this:

```bash
curl -s -u admin:secret --location --request GET 'http://127.0.0.1:25441/api/v1alpha/token/4969e9fb-2097-41e7-af53-5e2082a3e4d3' | jq .
curl -s -u user:password --location --request GET 'http://127.0.0.1:25441/api/v1alpha/token/4969e9fb-2097-41e7-af53-5e2082a3e4d3' | jq .
```

```json
Expand Down Expand Up @@ -81,7 +83,7 @@ Here is an example of using the API with python. We don't assume that you use Ba

```python
import requests
response = requests.get('http://127.0.0.1:25441/api/v1alpha/token/<token_id>', auth=('admin', 'secret'))
response = requests.get('http://127.0.0.1:25441/api/v1alpha/token/<token_id>', auth=('user', 'password'))
json.loads(response.text)
```

Expand Down
2 changes: 2 additions & 0 deletions pyinstaller/electron/build/entitlements.mac.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.device.camera</key>
Expand Down
37 changes: 17 additions & 20 deletions pyinstaller/electron/error_logs.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
<html>
<link rel="stylesheet" type="text/css" href="./styles.css">
<body style="overflow: auto; height: 100%;">
<div class="card" style="width:90%">
This window shows you the last 700 lines Logs of the specterApp. This also includes
the Logs of specterd which are marked as such. It might give you hints on why specter is not coming up properly.
The best approach is to scroll to the bottom and then search upwards for errors.
You can find the logfile in [yourHomedirectory]/.specter/specterApp.log.
<pre><code id="specterapp-logs"></code></pre>
<br>

</div>
<link rel="stylesheet" type="text/css" href="./output.css" />
<body style="overflow: auto; height: 100%">
<div class="card" style="width: 90%">
This window shows you the last 700 lines Logs of the specterApp. This also includes the Logs of specterd which are
marked as such. It might give you hints on why specter is not coming up properly. The best approach is to scroll to the
bottom and then search upwards for errors. You can find the logfile in [yourHomedirectory]/.specter/specterApp.log.
<pre><code id="specterapp-logs"></code></pre>
<br />
</div>
<script>
const fs = require('fs')
const path = require('path')
const helpers = require('./helpers')
helpers.getSpecterAppLogs( (lines) => {
document.getElementById('specterapp-logs').innerText = lines
})

const fs = require('fs')
const path = require('path')
const helpers = require('./src/helpers')
helpers.getSpecterAppLogs((lines) => {
document.getElementById('specterapp-logs').innerText = lines
})
</script>
</body>
</html>
</body>
</html>
125 changes: 0 additions & 125 deletions pyinstaller/electron/helpers.js

This file was deleted.

Loading

0 comments on commit 4bd4a4c

Please sign in to comment.