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

init tldr pages #95

Merged
merged 5 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
![GitHub top language](https://img.shields.io/github/languages/top/cosmic-zip/witchcraft)

<p align="center">
🎉 Welcome to the witchcraft Community!
🎉 Your OPSEC companion. Now with tldr-pages integration! 🎉
</p>

---
Expand Down
4 changes: 2 additions & 2 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: witchcraft-cybersecurity
version: "0.33.700"
summary: Your OPSEC companion!
version: "0.34.10"
summary: Your OPSEC companion. Now with tldr-pages integration!
grade: stable
confinement: strict
base: core24
Expand Down
20 changes: 20 additions & 0 deletions spellbook/archive/pages/android/am.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# am

> Android activity manager.
> More information: <https://developer.android.com/tools/adb#am>.

- Start the activity with a specific component and package [n]ame:

`am start -n {{com.android.settings/.Settings}}`

- Start an intent [a]ction and pass [d]ata to it:

`am start -a {{android.intent.action.VIEW}} -d {{tel:123}}`

- Start an activity matching a specific action and [c]ategory:

`am start -a {{android.intent.action.MAIN}} -c {{android.intent.category.HOME}}`

- Convert an intent to a URI:

`am to-uri -a {{android.intent.action.VIEW}} -d {{tel:123}}`
9 changes: 9 additions & 0 deletions spellbook/archive/pages/android/bugreport.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# bugreport

> Show an Android bug report.
> This command can only be used through `adb shell`.
> More information: <https://cs.android.com/android/platform/superproject/+/main:frameworks/native/cmds/bugreport>.

- Display a complete bug report of an Android device:

`bugreport`
25 changes: 25 additions & 0 deletions spellbook/archive/pages/android/bugreportz.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# bugreportz

> Generate a zipped Android bug report.
> This command can only be used through `adb shell`.
> More information: <https://cs.android.com/android/platform/superproject/+/main:frameworks/native/cmds/bugreportz>.

- Generate a complete zipped bug report of an Android device:

`bugreportz`

- Show the progress of a running `bugreportz` operation:

`bugreportz -p`

- Write the content of an Android bug report to `stdout`:

`bugreportz -s`

- Display help:

`bugreportz -h`

- Display version:

`bugreportz -v`
16 changes: 16 additions & 0 deletions spellbook/archive/pages/android/cmd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# cmd

> Android service manager.
> More information: <https://cs.android.com/android/platform/superproject/+/main:frameworks/native/cmds/cmd/>.

- [l]ist all running services:

`cmd -l`

- Call a specific service:

`cmd {{service}}`

- Call a service with specific arguments:

`cmd {{service}} {{argument1 argument2 ...}}`
8 changes: 8 additions & 0 deletions spellbook/archive/pages/android/dalvikvm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# dalvikvm

> Android Java virtual machine.
> More information: <https://source.android.com/docs/core/runtime>.

- Start a specific Java program:

`dalvikvm -classpath {{path/to/file.jar}} {{classname}}`
29 changes: 29 additions & 0 deletions spellbook/archive/pages/android/dumpsys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# dumpsys

> Get information about Android system services.
> This command can only be used through `adb shell`.
> More information: <https://developer.android.com/tools/dumpsys>.

- Get diagnostic output for all system services:

`dumpsys`

- Get diagnostic output for a specific system service:

`dumpsys {{service}}`

- List all services `dumpsys` can give information about:

`dumpsys -l`

- List service-specific arguments for a service:

`dumpsys {{service}} -h`

- Exclude a specific service from the diagnostic output:

`dumpsys --skip {{service}}`

- Specify a [t]imeout period in seconds (defaults to 10s):

`dumpsys -t {{8}}`
32 changes: 32 additions & 0 deletions spellbook/archive/pages/android/getprop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# getprop

> Show information about Android system properties.
> More information: <https://manned.org/getprop>.

- Display information about Android system properties:

`getprop`

- Display information about a specific property:

`getprop {{property}}`

- Display the SDK API level:

`getprop {{ro.build.version.sdk}}`

- Display the Android version:

`getprop {{ro.build.version.release}}`

- Display the Android device model:

`getprop {{ro.vendor.product.model}}`

- Display the OEM unlock status:

`getprop {{ro.oem_unlock_supported}}`

- Display the MAC address of the Android's Wi-Fi card:

`getprop {{ro.boot.wifimacaddr}}`
25 changes: 25 additions & 0 deletions spellbook/archive/pages/android/input.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# input

> Send event codes or touchscreen gestures to an Android device.
> This command can only be used through `adb shell`.
> More information: <https://developer.android.com/reference/android/view/KeyEvent.html#constants_1>.

- Send an event code for a single character to an Android device:

`input keyevent {{event_code}}`

- Send a text to an Android device (`%s` represents spaces):

`input text "{{text}}"`

- Send a single tap to an Android device:

`input tap {{x_position}} {{y_position}}`

- Send a swipe gesture to an Android device:

`input swipe {{x_start}} {{y_start}} {{x_end}} {{y_end}} {{duration_in_ms}}`

- Send a long press to an Android device using a swipe gesture:

`input swipe {{x_position}} {{y_position}} {{x_position}} {{y_position}} {{duration_in_ms}}`
24 changes: 24 additions & 0 deletions spellbook/archive/pages/android/logcat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# logcat

> Dump a log of system messages, including stack traces when an error occurred, and information messages logged by applications.
> More information: <https://developer.android.com/tools/logcat>.

- Display system logs:

`logcat`

- Write system logs to a [f]ile:

`logcat -f {{path/to/file}}`

- Display lines that match a regular expression:

`logcat --regex {{regular_expression}}`

- Display logs for a specific PID:

`logcat --pid {{pid}}`

- Display logs for the process of a specific package:

`logcat --pid $(pidof -s {{package}})`
24 changes: 24 additions & 0 deletions spellbook/archive/pages/android/pkg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# pkg

> Package management utility for Termux.
> More information: <https://wiki.termux.com/wiki/Package_Management>.

- Upgrade all installed packages:

`pkg upgrade`

- Install a package:

`pkg install {{package}}`

- Uninstall a package:

`pkg uninstall {{package}}`

- Reinstall a package:

`pkg reinstall {{package}}`

- Search for a package:

`pkg search {{package}}`
24 changes: 24 additions & 0 deletions spellbook/archive/pages/android/pm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# pm

> Display information about apps on an Android device.
> More information: <https://developer.android.com/tools/adb#pm>.

- List all installed apps:

`pm list packages`

- List all installed [s]ystem apps:

`pm list packages -s`

- List all installed [3]rd-party apps:

`pm list packages -3`

- List apps matching specific keywords:

`pm list packages {{keyword1 keyword2 ...}}`

- Display a path of the APK of a specific app:

`pm path {{app}}`
9 changes: 9 additions & 0 deletions spellbook/archive/pages/android/screencap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# screencap

> Take a screenshot of a mobile display.
> This command can only be used through `adb shell`.
> More information: <https://developer.android.com/tools/adb#screencap>.

- Take a screenshot:

`screencap {{path/to/file}}`
20 changes: 20 additions & 0 deletions spellbook/archive/pages/android/settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# settings

> Get information about the Android OS.
> More information: <https://adbinstaller.com/commands/adb-shell-settings-5b670d5ee7958178a2955536>.

- List the settings in the `global` namespace:

`settings list {{global}}`

- Get a value of a specific setting:

`settings get {{global}} {{airplane_mode_on}}`

- Set a specific value of a setting:

`settings put {{system}} {{screen_brightness}} {{42}}`

- Delete a specific setting:

`settings delete {{secure}} {{screensaver_enabled}}`
13 changes: 13 additions & 0 deletions spellbook/archive/pages/android/wm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# wm

> Show information about the screen of an Android device.
> This command can only be used through `adb shell`.
> More information: <https://adbinstaller.com/commands/adb-shell-wm-5b672b17e7958178a2955538>.

- Display the physical size of an Android device's screen:

`wm size`

- Display the physical density of an Android device's screen:

`wm density`
36 changes: 36 additions & 0 deletions spellbook/archive/pages/common/!.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Exclamation mark

> Bash builtin to substitute with a command found in history.
> More information: <https://gnu.org/software/bash/manual/bash.html#Event-Designators>.

- Substitute with the previous command and run it with `sudo`:

`sudo !!`

- Substitute with a command based on its line number found with `history`:

`!{{number}}`

- Substitute with a command that was used a specified number of lines back:

`!-{{number}}`

- Substitute with the most recent command that starts with a string:

`!{{string}}`

- Substitute with the arguments of the latest command:

`{{command}} !*`

- Substitute with the last argument of the latest command:

`{{command}} !$`

- Substitute with the last command but without the last argument:

`!:-`

- Print last command that starts with a string without executing it:

`!{{string}}:p`
24 changes: 24 additions & 0 deletions spellbook/archive/pages/common/$.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Dollar sign

> Expand a Bash variable.
> More information: <https://gnu.org/software/bash/manual/bash.html#Shell-Variables>.

- Print a variable:

`echo ${{VARIABLE}}`

- Print the exit status of the previous command:

`echo $?`

- Print a random number between 0 and 32767:

`echo $RANDOM`

- Print one of the prompt strings:

`echo ${{PS0|PS1|PS2|PS3|PS4}}`

- Expand with the output of `command` and run it. Same as enclosing `command` in backtics:

`$({{command}})`
Loading
Loading