Skip to content

Instantly share code, notes, and snippets.

View gzuuus's full-sized avatar

gzuuus

View GitHub Profile
@gzuuus
gzuuus / prompt-injection.md
Last active October 7, 2025 09:54
Prompt injection

Prompt Injection: Practical Overview

Key Points about Prompt Injection

  • Prompt injection is a security attack specific to large language models (LLMs) where an attacker manipulates the input prompt to alter or override the original instructions given to the LLM, forcing it to behave in unintended ways.
  • This attack is dangerous because it exploits the natural language understanding of LLMs and can bypass built-in safeguards, leading to outcomes such as generating harmful content, disclosing sensitive information, or executing unauthorized commands.
  • There are types of prompt injections, including:
    • Direct: User input directly manipulates the prompt.
    • Indirect: External data sources or plugins introduce malicious instructions.
  • Common prompt injection techniques involve embedding instructions that tell the model to "ignore all previous instructions" or to take new behavior that conflicts with the system’s intended role.
@gzuuus
gzuuus / seed.go
Created November 17, 2024 12:08
Relay seeder
package main
import (
"context"
"fmt"
"math/rand"
"strings"
"github.com/nbd-wtf/go-nostr"
)
@gzuuus
gzuuus / main.go
Created November 17, 2024 12:07
Client
package main
import (
"context"
"fmt"
"github.com/fiatjaf/eventstore"
"github.com/fiatjaf/eventstore/slicestore"
"github.com/nbd-wtf/go-nostr"
"github.com/nbd-wtf/go-nostr/nip77"
@gzuuus
gzuuus / main.go
Created November 17, 2024 12:07
Relay
package main
import (
"fmt"
"net/http"
"github.com/fiatjaf/eventstore/badger"
"github.com/fiatjaf/khatru"
)
exiftool IMG_20230427_190907_068.jpg (graphene cam on grapheneOS)
----------------------------------------------------------------
ExifTool Version Number : 12.40
File Name : IMG_20230427_190907_068.jpg
Directory : .
File Size : 2.3 MiB
File Modification Date/Time : 2023:04:27 19:12:10+02:00
File Access Date/Time : 2023:04:27 19:12:31+02:00
File Inode Change Date/Time : 2023:04:27 19:12:14+02:00
File Permissions : -rw-rw-r--
exiftool stock_IMG20230427171218.jpg (after exiftool -all=)
-----------------------------------------------------------
ExifTool Version Number : 12.40
File Name : stock_IMG20230427171218.jpg
Directory : .
File Size : 1589 KiB
File Modification Date/Time : 2023:04:27 17:31:35+02:00
File Access Date/Time : 2023:04:27 17:31:35+02:00
File Inode Change Date/Time : 2023:04:27 17:31:35+02:00
File Permissions : -rw-rw-r--
exiftool stock_IMG20230427171218.jpg (original)
------------------------------------------------
ExifTool Version Number : 12.40
File Name : stock_IMG20230427171218.jpg
Directory : .
File Size : 1846 KiB
File Modification Date/Time : 2023:04:27 17:24:26+02:00
File Access Date/Time : 2023:04:27 17:27:02+02:00
File Inode Change Date/Time : 2023:04:27 17:26:25+02:00
File Permissions : -rw-rw-r--
exiftool graphene_IMG_20230427_171238_0764.jpg
-----------------------------------------------
ExifTool Version Number : 12.40
File Name : graphene_IMG_20230427_171238_0764.jpg
Directory : .
File Size : 2.5 MiB
File Modification Date/Time : 2023:04:27 17:24:44+02:00
File Access Date/Time : 2023:04:27 17:26:53+02:00
File Inode Change Date/Time : 2023:04:27 17:26:34+02:00
File Permissions : -rw-rw-r--
import requests, json, time #import libs
from time import strftime
#Set api endpoints into variables
rfee_url='https://mempool.space/api/v1/fees/recommended'
bheight_url='https://mempool.space/api/blocks/tip/height'
price_url='https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=USD'
api_list=[rfee_url, bheight_url, price_url] #Create a list w the url variables to iterate
def timestamp():
ts = strftime("(%x, %X)")