- 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.
This file contains hidden or 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
package main | |
import ( | |
"context" | |
"fmt" | |
"math/rand" | |
"strings" | |
"github.com/nbd-wtf/go-nostr" | |
) |
This file contains hidden or 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
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" |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"github.com/fiatjaf/eventstore/badger" | |
"github.com/fiatjaf/khatru" | |
) |
This file contains hidden or 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
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-- |
This file contains hidden or 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
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-- |
This file contains hidden or 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
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-- |
This file contains hidden or 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
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-- |
This file contains hidden or 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
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)") |
NewerOlder