-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
138 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
### Source | ||
https://developer.atlassian.com/cloud/bitbucket/rest/intro | ||
|
||
### Upload file to repository | ||
``` | ||
curl -X POST -H "Authorization: Bearer <apiKey>" -F "<uploadFile>=@./<localFile>" "https://api.bitbucket.org/2.0/repositories/<workspace>/<repository>/src?branch=master" | ||
``` | ||
|
||
### Get meta data of file | ||
``` | ||
curl -H "Authorization: Bearer <apiKey>" "https://api.bitbucket.org/2.0/repositories/<workspace>/<repository>/commits?path=<filePath>" | ||
``` | ||
|
||
### Download file | ||
``` | ||
curl -H "Authorization: Bearer <apiKey>" "https://api.bitbucket.org/2.0/repositories/<workspace>/<repository>/src/master/<filePath>" | ||
``` | ||
|
||
### List files inside repository | ||
``` | ||
curl -H "Authorization: Bearer <apiKey>" "https://api.bitbucket.org/2.0/repositories/<workspace>/<repository>/src/master/" | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
### Source | ||
https://docs.github.com/en/rest | ||
|
||
### Create private repository | ||
``` | ||
curl -X POST -H "Authorization: token <apiKey>" -H "Accept: application/vnd.github+json" https://api.github.com/user/repos -d '{"name": "<repository>", "description": "<description>", "private": true}' | ||
``` | ||
|
||
### Delete repository | ||
``` | ||
curl -X DELETE -H "Authorization: token <apiKey>" -H "Accept: application/vnd.github+json" https://api.github.com/repos/<user>/<repository> | ||
``` | ||
|
||
### List files inside repository | ||
``` | ||
curl -H "Authorization: token <apiKey>" https://api.github.com/repos/<user>/<repository>/contents | ||
``` | ||
|
||
### Upload file to repository | ||
``` | ||
curl -X PUT -H "Authorization: token <apiKey>" https://api.github.com/repos/<user>/<repository>/contents/<filePath> -d "{\"message\":\"<message>\",\"content\":\"<fileContentBase64>\"}" | ||
``` | ||
|
||
### Get commit meta data | ||
``` | ||
curl -H "Authorization: token <apiKey>" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/<user>/<repository>/commits?path=<filePath>" | ||
``` | ||
|
||
### Get file content and meta data | ||
``` | ||
curl -s -H "Authorization: token <apiKey>" https://api.github.com/repos/<user>/<repository>/contents/<filePath> | ||
``` | ||
|
||
### Download file from repository | ||
``` | ||
curl -s -H 'Authorization: token <apiKey>' -H 'Accept: application/vnd.github.v3.raw' -o <outfile> "https://api.github.com/repos/<user>/<repository>/contents/<filePath>" | ||
``` | ||
|
||
### Upload and overwrite file | ||
``` | ||
curl -X PUT -H "Authorization: token <apiKey>" https://api.github.com/repos/<user>/<repository>/contents/<filePath> -d "{\"message\":\"<message>\",\"content\":\"<fileContentBase64>\", \"sha\":\"<shaSum>\"}" | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
### Source | ||
https://docs.malcore.io | ||
|
||
### Run scan for domain | ||
``` | ||
curl -X POST https://api.malcore.io/api/domain -H "apiKey: <apiKey>" -H "X-No-Poll: true" --data "domain=<domain>" | ||
``` | ||
|
||
### Run scan for URL | ||
``` | ||
curl -X POST https://api.malcore.io/api/urlcheck -H "apiKey: <apiKey>" --data "url=https://<url>" | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### Print the kernel ring buffer | ||
``` | ||
dmesg | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
if [ -n "${SUDO_USER:-}" ] | ||
then | ||
homeDir=$(getent passwd "$SUDO_USER" | cut -d: -f6) | ||
else | ||
homeDir="$HOME" | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
### List smb shares | ||
### List shares | ||
``` | ||
Get-SmbShare -name "<rhost>" | ||
``` | ||
|
||
### Create smb share | ||
### Create share (everyone/jeder) | ||
``` | ||
New-SmbShare -Name "<name>" -Path "<path>" -FullAccess "<domain>\<user>" | ||
``` | ||
|
||
### Remove share | ||
``` | ||
Remove-SmbShare -Name "<name>" | ||
``` | ||
|