Commit graph

93 commits

Author SHA1 Message Date
berhsi
0c12ce86aa setstatus.py: clear reading status argument and make it pep8 conform
make the part with reading argv resp. interactiv more clear and readable,
remove unused parts from code and make the other pep8 conform.
2019-09-19 09:44:52 +02:00
Berhsi
b053403836 satusd.py: add validity check and else trees
read_config() now only add values, if the key is valid. otherwise ist passes.
if read_loglevel() returns false, loglevel ist set to warning. typos fixed.
2019-09-17 19:07:07 +02:00
Berhsi
22cbb6f6e0 statusd.service: change options user, group and identifier 2019-09-15 00:01:39 +02:00
berhsi
6dc2f04037 setstatus.py, statusd.py: timeouts added, change output messages 2019-09-14 14:01:52 +02:00
berhsi
028f7ae2de add docstrings to print_ciphers() and display_peercert() 2019-09-13 10:29:38 +02:00
berhsi
ee233e65e0 statusd.py: default verbosity value can changed
verbosity value can now changed with a entry in statusd.conf
2019-09-11 21:24:28 +02:00
berhsi
909f02fc1d statusd.py: extend the logging
logs now the common name and serial number from client certificate. display_peercert() new.
2019-09-10 17:29:39 +02:00
berhsi
fef38a278b restrict available ciphers
only EECDH+AESGCM is allowed. now it uses only tls 1.2 and 1.3
2019-09-10 15:33:27 +02:00
berhsi
c8814f322b merge with ssl branch
branch ssl merged into master. new files statusd.conf, statusd.conf.template, statusd.service.
statusd.py conflicts resolved.
2019-09-10 12:38:06 +02:00
berhsi
78151fcafa rename file statusd.template to statusd.conf.template 2019-09-10 10:07:53 +02:00
berhsi
39d6e9acee remove server-clear.py 2019-09-10 09:56:54 +02:00
berhsi
943c060b60 statusd.py now works with json modul, fix bug in set_values()
read and write the api file now uses the json modul. correct a bug in function set_values().
2019-09-10 09:47:53 +02:00
Berhsi
5a6a236ebc statusd.py now works with json modul
the deamon now uses the python modul json to read and write the api file. the
function replace_entry() is removed.
2019-09-08 00:31:19 +02:00
berhsi
0e405f894d statusd.py: set some ssl-options 2019-08-02 14:20:08 +02:00
+++
8755e35584 statusd.template added 2019-07-30 22:59:59 +02:00
+++
fa772012d6 statusd.py: certs_readable() checks if cert is defined 2019-07-30 22:20:45 +02:00
+++
35d46f266a statusd.py: add function certs_readable()
add a function to test at start, if needed certs are readable
2019-07-30 22:06:07 +02:00
+++
7d5753c879 delete server-clear.py 2019-07-30 21:26:43 +02:00
berhsi
c6c0eac5bf add unit for systemd: statusd.service 2019-07-29 18:33:19 +02:00
berhsi
d3534afaa3 statusd.py: add support for ssl
server now speaks tls. new functions strip_argument() and display_peercert()
2019-07-29 18:32:27 +02:00
berhsi
60fccc57d4 setstatus.py: add support for ssl
client now connect to server via tls.
2019-07-29 18:27:53 +02:00
berhsi
84865a37bf statusd.conf: add any variables
TIMEOUT, CLIENT_CERT, API_TEMPLATE added. CERT and KEY changed to SERVER_CERT and SERVER_KEY
2019-07-29 18:23:45 +02:00
berhsi
cd1697a134 statusd.py: fix bug in change_status() 2019-07-27 19:40:16 +02:00
berhsi
01dff18c07 statusd.py: fix typo in change_status() 2019-07-27 19:32:51 +02:00
berhsi
93e1ef8e00 statusd.py: fix bug change_status() 2019-07-27 19:25:23 +02:00
berhsi
6973c1bf21 statusd.py: fix bug change_status() 2019-07-27 19:23:13 +02:00
berhsi
4c77e6b820 statusd.py: add logging messages to change_status() 2019-07-27 19:06:35 +02:00
berhsi
22f3d4e75b statusd.py: add logging message to change_status() 2019-07-27 18:58:51 +02:00
berhsi
6143456d35 setstatus.py: fix bug for setting status variable 2019-07-27 18:14:13 +02:00
berhsi
397ed52696 add file api_template 2019-07-27 17:36:07 +02:00
berhsi
976c9e7ebb statusd.py: add error message in read_api() 2019-07-27 17:31:03 +02:00
berhsi
28e8c93a28 rewrite and renaming from server-clear.py to statusd.py 2019-07-27 16:51:56 +02:00
berhsi
a9b4569dd1 config file for status deamon added 2019-07-27 16:50:19 +02:00
berhsi
777c320ce4 setstatus.py: its possible now to pass a integer to main()
to perform a stresstest its possible now to pass an integer as argument to main()
2019-07-27 16:49:08 +02:00
berhsi
868702eb8d api file added 2019-07-27 02:20:26 +02:00
berhsi
14a6e68fb8 kodierung.py gelöscht 2019-07-27 02:19:46 +02:00
berhsi
0b91b007db client and server works with bytes and nr18.space now
both parts now uses byteorder, int.from_bytes() and data.to_bytes(). to compare values,
raw data are cast to integer. furthermore encode() is nowhere used. at the moment the server
listen at nr18.space at port 10001.
2019-07-27 00:44:53 +02:00
berhsi
5522e04840 client-clear.py: bugs in main() and read_argument() fixed
read_argument(): return now outside from while loop. loop works now until a valid value ist
entered. main(): reads now a return value from server and close the socket.
2019-07-26 22:02:01 +02:00
berhsi
fd49e706f3 server-clear.py: returns now a error code if argument is invalid 2019-07-26 21:57:07 +02:00
berhsi
6574a58e15 kodierung.py added
kodierung.py provides any little functions around encoding or decoding from strings or bytes
2019-07-26 21:35:29 +02:00
berhsi
b830789f0e client-clear.py: initialer commit
initialer commit for a client, who pushs a status of one or zero to the server. if no argument
in cli, the client gives a commandline input to read.
2019-07-26 21:33:40 +02:00
berhsi
4bbd2aed54 server-clear.py: backlog changed and timeout added
the server has now a limit of 5 connections in socket.listen(). added a timeout from 3 seconds
to the connection
2019-07-26 21:30:58 +02:00
berhsi
dc088179f5 initiler commit
initialer commit eines servers, der ein bit aus einem socket liest
2019-07-26 19:43:59 +02:00