Commit d8ff6396 authored by zicmama's avatar zicmama
Browse files

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"`
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment