mirror of
				https://github.com/TheLocehiliosan/yadm
				synced 2025-06-13 13:03:58 +00:00 
			
		
		
		
	This is a program which adheres to the pinentry protocol. It always provides the password located in /etc/mock-password.
		
			
				
	
	
		
			13 lines
		
	
	
		
			323 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			323 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash
 | |
| # This program is a custom mock pinentry program
 | |
| # It always uses whatever password is found in the /tmp directory
 | |
| password="$(cat /tmp/mock-password 2>/dev/null)"
 | |
| echo "OK Pleased to meet you"
 | |
| while read -r line; do
 | |
|   if [[ $line =~ GETPIN ]]; then
 | |
|     echo -n "D "
 | |
|     echo "$password"
 | |
|   fi
 | |
|   echo "OK";
 | |
| done
 |