Commit d8ff6396 authored by zicmama's avatar zicmama

First

parents
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Page Not Found</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
line-height: 1.2;
margin: 0;
}
html {
color: #888;
display: table;
font-family: sans-serif;
height: 100%;
text-align: center;
width: 100%;
}
body {
display: table-cell;
vertical-align: middle;
margin: 2em auto;
}
h1 {
color: #555;
font-size: 2em;
font-weight: 400;
}
p {
margin: 0 auto;
width: 280px;
}
@media only screen and (max-width: 280px) {
body, p {
width: 95%;
}
h1 {
font-size: 1.5em;
margin: 0 0 0.3em;
}
}
</style>
</head>
<body>
<h1>Page Not Found</h1>
<p><img src="https://thecatapi.com/api/images/get?format=src&type=gif"></p>
<p>Sorry, but the page you were trying to view does not exist.</p>
</body>
</html>
<!-- IE needs 512+ bytes: https://blogs.msdn.microsoft.com/ieinternals/2010/08/18/friendly-http-error-pages/ -->
#######################################################################
# G1SMS
# Projet: SMS interface to G1 wallets (monnaie libre)
# Author: Fred (support@qo-op.com)
# Version: 0.2
# License: GPL (http://www.google.com/search?q=GPL)
# Code with Love & Music from https://play.zicmama.com/
#######################################################################
!SERVEUR
RaspberryPi3 & Dongle 3G/USB + Raspbian Lite & gammu, smsd
ex: https://tutoandco.colas-delmas.fr/software/envoyer-sms-gammu-deamon/
Activer 3G: https://nicovddussen.wordpress.com/2014/11/12/setting-up-your-raspberry-pi-to-work-with-a-3g-dongle/
# ######################################################################
# IMPERATIF! Installer dans /root/G1SMS/
# Configurer /etc/gammu-smsdrc
# Configuration file for Gammu SMS Daemon
# Gammu library configuration, see gammurc(5)
[gammu]
device = /dev/serial/by-id/usb-HUAWEI_Technologies_HUAWEI_Mobile-if01-port0
name = Phone on USB serial port HUAWEI_Technology HUAWEI_Mobile
connection = at19200
synchronizetime = yes
gammucoding = utf8
#logformat = textall
# SMSD configuration, see gammu-smsdrc(5)
[smsd]
service = files
logfile = /tmp/smsd.log
DeliveryReport = log
# Increase for debugging information
debuglevel = 0
CommTimeout = 3
PIN = 0000
#CheckSecurity = 0
# Soft reset every hour
ResetFrequency = 3600
# Disable (0), Enable HardReset freq
HardResetFrequency = 0
# Paths where messages are stored
inboxpath = /var/spool/gammu/inbox/
outboxpath = /var/spool/gammu/outbox/
sentsmspath = /var/spool/gammu/sent/
errorsmspath = /var/spool/gammu/error/
RunOnReceive = /root/G1SMS/sms_received.sh
# HELP: https://wammu.eu/docs/manual/smsd/config.html
# ######################################################################
!CODE
Le code de Silkaj inclu a été modifié pour accéder aux données brutes (chercher "# G1SMS::")
https://git.duniter.org/clients/python/silkaj
! Ajouter les dépendances:
apt-get install python3-pip
pip3 install setuptools
pip3 install -r requirements.txt
!LOCALISATION
G1SMS est configuré pour les téléphones français: COUNTRY="+33"
Traduire et changer ce code dans init.sh pour un autre pays!!
!!! Modifier dans init.sh le facteur en cours (G1/DU): DUFACTOR=10.04 !!!
* Mettre vos clefs Provider de service G1SMS dans les fichiers g1sms.priv.key et g1sms.pub.key
# 1 DU = 100 LOVE
# 1 LOVE = 1 CentiDU = 1/DUFACTOR G1
!TODO
* https://cesium.madeinzion.org/api/#/v1/payment/SonqoZEfZXHDBxi4KxdqVKZVygxVFTtpo9ugyDDQ6w3?amount=10
* Backup Sync System & key files
* Add minimum time between Payements (for Blockchain sync)
* Check Hidden Source Phone Number
* Set maximum wallet LOVE amount and automatic transfer to other/member wallet
* Close account & Full transfer to another (phone steal or number change)
* Register as Cesium+ service provider
* Synchronise phone accounts with multiple G1SMS servers.
* ...
#######################################################################
# G1SMS
# Projet: SMS interface to G1 wallets (monnaie libre)
# Author: Fred (support@qo-op.com)
# Version: 0.2
# License: GPL (http://www.google.com/search?q=GPL)
# Code with Love & Music from https://play.zicmama.com/
#######################################################################
!SERVEUR
RaspberryPi3 & Dongle 3G/USB + Raspbian Lite & gammu, smsd
ex: https://tutoandco.colas-delmas.fr/software/envoyer-sms-gammu-deamon/
Activer 3G: https://nicovddussen.wordpress.com/2014/11/12/setting-up-your-raspberry-pi-to-work-with-a-3g-dongle/
# ######################################################################
# IMPERATIF! Installer dans /root/G1SMS/
# Configurer /etc/gammu-smsdrc
# Configuration file for Gammu SMS Daemon
# Gammu library configuration, see gammurc(5)
[gammu]
device = /dev/serial/by-id/usb-HUAWEI_Technologies_HUAWEI_Mobile-if01-port0
name = Phone on USB serial port HUAWEI_Technology HUAWEI_Mobile
connection = at19200
synchronizetime = yes
gammucoding = utf8
#logformat = textall
PIN = 0000
[gammu1]
device = /dev/ttyUSB1
name = Phone on USB serial port HUAWEI_Technology HUAWEI_Mobile
connection = at19200
synchronizetime = yes
gammucoding = utf8
# SMSD configuration, see gammu-smsdrc(5)
[smsd]
service = files
logfile = /tmp/smsd.log
DeliveryReport = log
# Increase for debugging information
debuglevel = 0
CommTimeout = 3
PIN = 0000
#CheckSecurity = 0
# Soft reset every hour
ResetFrequency = 3600
# Disable (0), Enable HardReset freq
HardResetFrequency = 0
# Paths where messages are stored
inboxpath = /var/spool/gammu/inbox/
outboxpath = /var/spool/gammu/outbox/
sentsmspath = /var/spool/gammu/sent/
errorsmspath = /var/spool/gammu/error/
RunOnReceive = /root/G1SMS/sms_received.sh
# HELP: https://wammu.eu/docs/manual/smsd/config.html
# ######################################################################
!CODE
Le code de Silkaj inclu a été modifié pour accéder aux données brutes (chercher "# G1SMS::")
https://git.duniter.org/clients/python/silkaj
! Ajouter les dépendances:
apt-get install python3-pip
pip3 install setuptools
pip3 install -r requirements.txt
!LOCALISATION
G1SMS est configuré pour les téléphones français: COUNTRY="+33"
Traduire et changer ce code dans init.sh pour un autre pays!!
!!! Modifier dans init.sh le facteur en cours (G1/DU): DUFACTOR=10.04 !!!
* Mettre vos clefs Provider de service G1SMS dans les fichiers g1sms.priv.key et g1sms.pub.key
# 1 DU = 100 LOVE
# 1 LOVE = 1 CentiDU = 1/DUFACTOR G1
!TODO
* https://cesium.madeinzion.org/api/#/v1/payment/SonqoZEfZXHDBxi4KxdqVKZVygxVFTtpo9ugyDDQ6w3?amount=10
* Backup Sync System & key files
* Add minimum time between Payements (for Blockchain sync)
* Check Hidden Source Phone Number
* Set maximum wallet LOVE amount and automatic transfer to other/member wallet
* Close account & Full transfer to another (phone steal or number change)
* Register as Cesium+ service provider
* Synchronise phone accounts with multiple G1SMS servers.
* ...
ERROR USB DONGLE !!!! NEED HARD RESET??
https://askubuntu.com/questions/882278/how-do-i-set-ttyusb-boot-time-defaults
vi /etc/udev/rules.d/10-ttyUSB.rules
ACTION=="add", SUBSYSTEMS="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1003", ATTRS{serial}=="3f980000.usb", SYMLINK+="mydongle", RUN+="/bin/stty -F /dev/%k -crtscts"
un 2018/11/18 10:17:08 gammu-smsd[887]: Starting phone communication...
Sun 2018/11/18 10:17:08 gammu-smsd[887]: Error at init connection: Error opening device, it doesn't exist. (DEVICENOTEXIST[4])
Sun 2018/11/18 10:17:08 gammu-smsd[887]: Going to 30 seconds sleep because of too many connection errors
Sun 2018/11/18 10:33:11 gammu-smsd[887]: Starting phone communication...
Sun 2018/11/18 10:33:15 gammu-smsd[887]: Soft reset return code: No error. (NONE[1])
Sun 2018/11/18 10:33:20 gammu-smsd[887]: Error getting SMS status: Error writing to the device. (DEVICEWRITEERROR[11])
CheckSecurity = 0
ResetFrequency = 0
HardResetFrequency = 0
CommTimeout = 5
SendTimeout = 30
ReceiveFrequency = 15
42c3fb5926bc426e339d7c43247ac85d22b5397d906afd52e44c736d96a9dcb0
\ No newline at end of file
#!/bin/bash
source /root/G1SMS/shell/init.sh
source /root/G1SMS/shell/functions.sh
if [ -d "/root/G1SMS" ]
then
cd "/root/G1SMS"
else
exit
fi
TOTAL=0
TOTALG1=0
NB=0
for f in $(ls ./wallets/ -t); do
PHONE="$f"
PIN=$(cat /root/G1SMS/wallets/$PHONE/$PHONE.pin|xargs)
PUBKEY=$(cat /root/G1SMS/wallets/$PHONE/$PHONE.pub|xargs)
AMOUNTG1=$(./silkaj/silkaj amount --auth-scrypt -salt="$PHONE" -password="$PIN")
echo $PHONE / $PUBKEY
echo "Solde ($PHONE) : $AMOUNTG1 G1"
if [[ "$AMOUNTG1" == "0.0" ]]; then echo "EMPTY!!!"; fi
NB=$(bc <<< "$NB + 1")
TOTALG1=$(bc -l <<< "$AMOUNTG1 + $TOTALG1")
AMOUNTLOVE=$(bc <<< "$AMOUNTG1 * 100 / $DUFACTOR")
TOTAL=$(bc -l <<< "$AMOUNTLOVE + $TOTAL")
# Use G1SMS with phone
# export SMS_1_NUMBER="$PHONE"
# export SMS_1_TEXT="N"
# $(/root/G1SMS/sms_received.sh)
# SEND SMS TO phone
#dest="$PHONE"
#mess="[G1SMS] bonjour, vous avez un porte-monnaie Libre ($AMOUNTLOVE LOVE). Envoyez N pour le conserver. 1l0v3. https://qo-op.com"
#gammu-smsd-inject TEXT "$dest" -text "$mess"
#sleep 30
done
echo "Nb Porte-Monnaie Libre $NB"
echo "Solde TOTAL : $TOTAL LOVE"
#!/bin/bash
source /root/G1SMS/shell/init.sh
source /root/G1SMS/shell/functions.sh
if [ -d "/root/G1SMS" ]
then
cd "/root/G1SMS"
else
exit
fi
TOTAL=0
TOTALG1=0
NB=0
for f in $(ls ./wallets/ -t); do
PHONE="$f"
PIN=$(cat /root/G1SMS/wallets/$PHONE/$PHONE.pin|xargs)
PUBKEY=$(cat /root/G1SMS/wallets/$PHONE/$PHONE.pub|xargs)
AMOUNTG1=$(./silkaj/silkaj amount --auth-scrypt -salt="$PHONE" -password="$PIN")
echo $PHONE / $PUBKEY
echo "Solde ($PHONE) : $AMOUNTG1 G1"
NB=$(bc <<< "$NB + 1")
TOTALG1=$(bc -l <<< "$AMOUNTG1 + $TOTALG1")
AMOUNTLOVE=$(bc <<< "$AMOUNTG1 * 100 / $DUFACTOR")
TOTAL=$(bc -l <<< "$AMOUNTLOVE + $TOTAL")
# Use G1SMS with phone
# export SMS_1_NUMBER="$PHONE"
# export SMS_1_TEXT="N"
# $(/root/G1SMS/sms_received.sh)
# SEND SMS TO phone
#dest="$PHONE"
#mess="[G1SMS] bonjour, vous avez un porte-monnaie Libre ($AMOUNTLOVE LOVE). Envoyez N pour le conserver. 1l0v3. https://qo-op.com"
#gammu-smsd-inject TEXT "$dest" -text "$mess"
#sleep 30
done
echo "Solde TOTAL : $TOTAL LOVE"
#!/bin/bash
source /root/G1SMS/shell/init.sh
source /root/G1SMS/shell/functions.sh
if [ -d "/root/G1SMS" ]
then
cd "/root/G1SMS"
else
exit
fi
TOTAL=0
for f in $(ls ./wallets/ -t); do
PHONE="$f"
PIN=$(cat /root/G1SMS/wallets/$PHONE/$PHONE.pin|xargs)
PUBKEY=$(cat /root/G1SMS/keys/$PHONE/$PHONE.pub|xargs)
AMOUNTG1=$(./silkaj/silkaj amount --auth-scrypt -salt="$PHONE" -password="$PIN")
echo $PHONE / $PUBKEY
echo "Solde ($PHONE) : $AMOUNTG1 G1"
if [[ "$AMOUNTG1" == "0.0" ]]; then echo "REMOVE"; rm -f /root/G1SMS/keys/$PHONE.pub; rm -f /root/G1SMS/keys/$PHONE.pin; fi
TOTAL=$(bc -l <<< "$AMOUNTG1 + $TOTAL")
AMOUNTLOVE=$(bc <<< "$AMOUNTG1 * 100 / $DUFACTOR")
# Use G1SMS with phone
# export SMS_1_NUMBER="$PHONE"
# export SMS_1_TEXT="N"
# $(/root/G1SMS/sms_received.sh)
# SEND SMS TO phone
dest="$PHONE"
mess="[G1SMS] bonjour, vous avez un porte-monnaie Libre ($AMOUNTLOVE LOVE). Envoyez N pour le conserver. 1l0v3. https://qo-op.com"
gammu-smsd-inject TEXT "$dest" -text "$mess"
sleep 30
done
echo "Solde TOTAL : $TOTAL G1"
#!/bin/bash
# Handle commands
case "$1" in
amount)
echo 1000
;;
transaction)
echo "OK"
;;
generate_auth_file)
echo "CLEF_PUBLIQUE_$3"
;;
*)
echo "KO"
;;
esac
echo "RUN ./silkaj/silkaj $*" >> /tmp/g1sms.log
\ No newline at end of file
#!/bin/bash
# Handle commands
case "$1" in
amount)
echo 1000
;;
transaction)
echo "OK"
;;
generate_auth_file)
echo "CLEF0PUBLIQUE1DU2PORTE3MONNAIE4LIBRE5"
;;
*)
echo "KO"
;;
esac
echo "RUN ./silkaj/silkaj $*" >> /tmp/g1sms.log
\ No newline at end of file
favicon.ico

766 Bytes

REPLACE WITH G1SMS PROVIDER WALLET PRIVATE KEY (authfile créé par 'silkaj generate_auth_file --auth-scrypt -salt="$LOGIN" -password="$PASSWD"')!!! Adjust "g1sms.pub.key" accordingly!!!
REPLACE WITH G1SMS PROVIDER WALLET PRIVATE KEY (authfile créé par 'silkaj generate_auth_file --auth-scrypt -salt="$LOGIN" -password="$PASSWD"')!!! Adjust "g1sms.pub.key" accordingly!!!
G1SM_PUBLICKEY
\ No newline at end of file
G1SM_PUBLICKEY
icon.png

3.93 KB

deny from all
DirectoryIndex 404.html
logo.png

13.2 KB

qo-op.png

4.41 KB

# Adapter ces valeurs au contexte spatio-temporel du Service G1SMS
###########################################
COUNTRY="+33"
DUFACTOR=10.04
###########################################
MASTERPHONE=+33666805720
MASTERPUB=`cat "/root/G1SMS/g1sms.pub.key"`
#!/bin/bash
# Adapter ces valeurs au contexte spatio-temporel du Service G1SMS
###########################################
COUNTRY="+33"
DUFACTOR=10.04
###########################################
MASTERPHONE=+33666805720
MASTERPUB=`cat "/root/G1SMS/g1sms.pub.key"`
#
function log() {
}
\ No newline at end of file
This diff is collapsed.
#!/usr/bin/env bash
# Default to 6 word passphrase
WORDCOUNT=${1-4}
# Download the wordlist
# wget -nc -O ~/.diceware-wordlist http://world.std.com/%7Ereinhold/diceware.wordlist.asc 2> /dev/null
# print a list of the diceware words
cat /root/G1SMS/shell/diceware-wordlist.txt |
awk '/[1-6][1-6][1-6][1-6][1-6]/{ print $2 }' |
# randomize the list order
shuf --random-source=/dev/urandom |
# pick the first n words
head -n ${WORDCOUNT} |
# pretty print
tr '\n' ' '
echo
#!/bin/bash
# G1SMS COMMUN FUNCTIONS
# !!!!!!!!!!! COMMENT / UNCOMMENT to activate/desactivate real SMS
#function gammu-smsd-inject () { ###
# echo ">>> sending SMS $4 TO $2 " >> /tmp/g1sms.log ###
#} ###
function security () {
if [ -d "/root/G1SMS" ]
then
cd "/root/G1SMS"
else
echo "G1SMS MUST BE INSTALLED IN HOME ROOT DIRECTORY. SET YOUR WALLET KEYS! chmod 700 ./wallets"
exit
fi
chown -R root:root ./wallets
chmod 700 ./wallets
}
function log () {
# log ($1=text)
if [ "$DOLOG" == "YES" ]
then
echo "$1" >> /tmp/g1sms.log
fi
}
function sms_SEND () {
# sms_SEND ($1=phone, $2=message)
local dest="$1"
local mess="$2"
gammu-smsd-inject TEXT "$dest" -text "$mess"
}
function sms_ERROR () {
# sms_ERROR ($1=phone, $2=message)
local dest="$1"
local mess="[G1SMS] Erreur
$2
Envoyez A pour de l'Aide."
gammu-smsd-inject TEXT "$dest" -text "$mess"
}
function log_history () {
log "history ($1=phone, $2=message)"
PHONE="$1"
HISTFILE="./wallets/$PHONE/$PHONE.hist"
echo "$(date +%Y%m%d-%H:%M:$S)_$2" >> "$HISTFILE"
}
#######################################"
function sms_INIT_ACCOUNT () {
log "sms_INIT_ACCOUNT ($1=phone, $2=NOSMS)"
PHONE="$1"
UNKNOWN=0
PINFILE="./wallets/$PHONE/$PHONE.pin"
PUBKEYFILE="./wallets/$PHONE/$PHONE.pub"
UNITFILE="./wallets/$PHONE/$PHONE.unit"
HISTFILE="./wallets/$PHONE/$PHONE.hist"
# (NO PIN) FirstAccount Create wallet
if [ ! -f "$PINFILE" ]; then
if [[ $2 == "NOSMS" ]]; then UNKNOWN="unknown"; return; fi
mkdir -p "./wallets/$PHONE/"
# Create Account Files (Get back old beta account)
if [ -f "./keys/$PHONE.pin" ]; then ###
mv "./keys/$PHONE.pin" "$PINFILE"; ###
else ###
PIN=$(./shell/diceware.sh | xargs)
PUBKEY=$(./silkaj/silkaj generate_auth_file --auth-scrypt -salt="$PHONE" -password="$PIN")
# Send first G1SMS transaction to activate account (THIRD_PARTY_MANAGER no member wallet)
# log "$MASTERKEYFILE $PUBKEY THIRD_PARTY_MANAGER:$MASTERPUB"
INIT=$(./silkaj/silkaj transaction --auth-file -file="$MASTERKEYFILE" --amount=2 --output=$PUBKEY --comment="THIRD_PARTY_MANAGER:$MASTERPUB" -y)
#log "Transaction1 $INIT"
DOUBLE=$(./silkaj/silkaj transaction --auth-scrypt -salt="$PHONE" -password="$PIN" --amount=1 --output=$MASTERPUB --comment="THIRD_PARTY_MANAGER:$MASTERPUB:ACK" -y)
#log "Transaction2 $DOUBLE"
echo "$PIN" > "$PINFILE"
fi ###
if [ -f "./keys/$PHONE.pub" ]; then ###
mv "./keys/$PHONE.pub" "$PUBKEYFILE"; ###
else ###
echo "$PUBKEY" > "$PUBKEYFILE"
fi ###
echo "LOVE" > "$UNITFILE"
echo "$(date +%Y%m%d-%H:%M): OUVERTURE" >> "$HISTFILE"
fi
# Init caller : GLOBAL VAR SET
PIN=$(cat "$PINFILE" | xargs)
PUBKEY=$(cat "$PUBKEYFILE" | xargs)
UNIT=$(cat "$UNITFILE" | xargs)
HIST=$(tail -n3 "$HISTFILE")
# LOG
log "PHONE: $PHONE"
log "PIN: $PIN"
log "KEY: $PUBKEY"
log "UNIT: $UNIT"
log "HIST: $HIST"
}
#!/bin/bash
# G1SMS COMMUN FUNCTIONS
# !!!!!!!!!!! COMMENT / UNCOMMENT to activate/desactivate real SMS
#function gammu-smsd-inject () { ###
# echo ">>> sending SMS $4 TO $2 " >> /tmp/g1sms.log ###
#} ###
function security () {
if [ -d "/root/G1SMS" ]
then
cd "/root/G1SMS"
else
echo "G1SMS MUST BE INSTALLED IN HOME ROOT DIRECTORY. SET YOUR WALLET KEYS! chmod 700 ./wallets"
exit
fi
chown -R root:root ./wallets
chmod 700 ./wallets
}
function log () {
# log ($1=text)
if [ "$DOLOG" == "YES" ]
then
echo "$1" >> /tmp/g1sms.log
fi
}
function sms_SEND () {
# sms_SEND ($1=phone, $2=message)
local dest="$1"
local mess="$2"
gammu-smsd-inject TEXT "$dest" -text "$mess"
}
function sms_ERROR () {
# sms_ERROR ($1=phone, $2=message)
local dest="$1"
local mess="[G1SMS] Erreur
$2
Envoyez A pour de l'Aide."
gammu-smsd-inject TEXT "$dest" -text "$mess"
}
function log_history () {
log "history ($1=phone, $2=message)"
PHONE="$1"
HISTFILE="./wallets/$PHONE/$PHONE.hist"
echo "$(date +%Y%m%d-%H:%M:$S)_$2" >> "$HISTFILE"
}
#######################################"
function sms_INIT_ACCOUNT () {
log "sms_INIT_ACCOUNT ($1=phone, $2=NOSMS)"
PHONE="$1"
UNKNOWN=0
PINFILE="./wallets/$PHONE/$PHONE.pin"
PUBKEYFILE="./wallets/$PHONE/$PHONE.pub"
UNITFILE="./wallets/$PHONE/$PHONE.unit"
HISTFILE="./wallets/$PHONE/$PHONE.hist"
# (NO PIN) FirstAccount Create wallet
if [ ! -f "$PINFILE" ]; then
if [[ $2 == "NOSMS" ]]; then UNKNOWN="unknown"; return; fi
mkdir "./wallets/$PHONE/"
# Create Account Files (Get back old beta account)
if [ -f "./keys/$PHONE.pin" ]; then ###
mv "./keys/$PHONE.pin" "$PINFILE"; ###
else ###
PIN=$(./shell/diceware.sh | xargs)
PUBKEY=$(./silkaj/silkaj generate_auth_file --auth-scrypt -salt="$PHONE" -password="$PIN")
# Send first G1SMS transaction to activate account (THIRD_PARTY_MANAGER no member wallet)
# log "$MASTERKEYFILE $PUBKEY THIRD_PARTY_MANAGER:$MASTERPUB"
INIT=$(./silkaj/silkaj transaction --auth-file -file="$MASTERKEYFILE" --amount=2 --output=$PUBKEY --comment="THIRD_PARTY_MANAGER:$MASTERPUB" -y)
#log "Transaction1 $INIT"
DOUBLE=$(./silkaj/silkaj transaction --auth-scrypt -salt="$PHONE" -password="$PIN" --amount=1 --output=$MASTERPUB --comment="THIRD_PARTY_MANAGER:$MASTERPUB:ACK" -y)
#log "Transaction2 $DOUBLE"
echo "$PIN" > "$PINFILE"
fi ###
if [ -f "./keys/$PHONE.pub" ]; then ###
mv "./keys/$PHONE.pub" "$PUBKEYFILE"; ###
else ###
echo "$PUBKEY" > "$PUBKEYFILE"
fi ###
echo "LOVE" > "$UNITFILE"
echo "$(date +%Y%m%d-%H:%M): OUVERTURE" >> "$HISTFILE"
fi
# Init caller : GLOBAL VAR SET
PIN=$(cat "$PINFILE" | xargs)
PUBKEY=$(cat "$PUBKEYFILE" | xargs)
UNIT=$(cat "$UNITFILE" | xargs)
HIST=$(tail -n3 "$HISTFILE")
# LOG
log "PHONE: $PHONE"
log "PIN: $PIN"
log "KEY: $PUBKEY"
log "UNIT: $UNIT"
log "HIST: $HIST"
}
#!/bin/bash
# Adapter ces valeurs au contexte spatio-temporel du Service G1SMS
##################################################################
# Acivate logging to /tmp/g1sms.log (YES/NO)
DOLOG="YES"
###############################################################
# Each account is refered to caller phone international writing
COUNTRY="+33"
####################################################################
# DU has a G1 value changed every 6 month! Needs to be ugraded there