From b1e002ddf768a4a7b618a43b018174ca26f02aea Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Tue, 26 Oct 2021 10:33:37 +0100 Subject: [PATCH] latest --- .gitignore | 1 + .vscode/launch.json | 23 ++++++++++++++++ __pycache__/app.cpython-37.pyc | Bin 330 -> 336 bytes __pycache__/server.cpython-37.pyc | Bin 1127 -> 790 bytes requirements.txt | 22 ++++++++++++++++ server.py | 42 +++++++++++------------------- venv/pyvenv.cfg | 6 ++--- 7 files changed, 64 insertions(+), 30 deletions(-) create mode 100644 .gitignore create mode 100644 .vscode/launch.json create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0647239 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +venv/ diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..2174b9d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,23 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Flask", + "type": "python", + "request": "launch", + "module": "flask", + "env": { + "FLASK_APP": "server.py", + "FLASK_ENV": "development" + }, + "args": [ + "run", + "--no-debugger" + ], + "jinja": true + } + ] +} \ No newline at end of file diff --git a/__pycache__/app.cpython-37.pyc b/__pycache__/app.cpython-37.pyc index 5f997c9b1b1ddc3f73a4808cb008f24745531734..4257a9bb1e84539aa8045c58bdfd66bc46b82e40 100644 GIT binary patch delta 49 zcmX@bbb*P>iIZ0qMpI1_ppA$1#l~EM{ DQd16J delta 43 xcmcb>bc%_~iI%3*G<# diff --git a/__pycache__/server.cpython-37.pyc b/__pycache__/server.cpython-37.pyc index 41192c91f47fc582699f78143c81a267bad2e52a..aebb6774d6c7dfe779599071f01f0fae6ddfcddc 100644 GIT binary patch delta 568 zcmYjOPiqrF6rVS<|B@!K=8|hgu_?KhisMzs6=JblC&`{|UwBna#g zn|D`Rhk@jWEU908d$#-mwS`A^31s01v-<0?R2Q3X(@cG37?5Wz?(X+?`mgjzb+uIe zH!pjSyLw!p&ih8;XN6DBrq&<2{K$2p5g6m>@GN{f(7B%Az}X!6#IA3bu>~`ygbG%` zDPIW*w{QvbwazOY{`p0v^TI1x2_?T2b5V+wFFons^0|;fDcVeiZ8rCcU=_-!^sdZuEMS$QCDitodL~eHLxY)7T-Ly@V zp30RAU(g=;C5sy;exVnb*|ZQO#7es!&yMHKym{VhG-?Fa?$49(n?=ZXe7RjEFm_?9 zFK}?eX+l!kqbch#itjA3dKNsbq?Fn{n-W1q`GWQ;qH^i*(iP=4FMlH7sTxlOJPxlK zPtAC0;925z<5@DE26&eF9pkBs%CW5TIDAZbKS>k%J zI~>G;>m9m>o1OMyCunzqpz~y_!=JjIHyDP}JC(5(9-z8j=muv&5Il3ekvkY{ZnfLf z+UpS)XYPI&38;}}swk_8(jxszqyy;YxZd!GSt|TI_VdY}jCmw{CFF^akMl`k$Cv_x z6%K>28kIP&Y1to&B+342jlzX#tqg`H#}rzk-4>JBb5RFsl#UeSKk#z#FtUIm0zlra-kCZ`ysW`Vu z778%fRW-~``*^z!dFJ?*#2HOj{XA3J-;PJRgH}K0|0zL}83=CPIV~(`w*`W{`R?DS zc)78F+C)^_bX{1lUc4(x`)?24p{7!yhZ$GDSw~`V8v-7Jfvj`-fSk`Q1{T$9MrQPa zowM0oWD+SZoIF(OG?Tn#%?DIE%4AyDNfyN;@L`Z#!^pDIp&rjUTo{)V32hj2AxI(p zD32OS8O=sANd0i-aOD5=8f_i?KIeqn`qUf41lYhgrY#&2dI lkrI=2fk7i-GdyQI&G') -def show_user(username): - #returns the username - return 'Username: %s' % username - -@app.route('/post/') -def show_post(post_id): - #returns the post, the post_id should be an int - return str(post_id) - -@app.route('/user', methods=['GET','POST']) -def get_user(): - username = request.form['username'] - password = request.form['password'] - #login(arg,arg) is a function that tries to log in and returns true or false - status = login(username, password) - return status + str = "56" + hex + "00f0aa" + os.system( + f"gatttool -i hci0 -b b2:3b:03:00:14:d6 --char-write-req -a 0x0009 -n {str}" + ) + return request.query_string diff --git a/venv/pyvenv.cfg b/venv/pyvenv.cfg index f967d3d..1a1986d 100644 --- a/venv/pyvenv.cfg +++ b/venv/pyvenv.cfg @@ -1,3 +1,3 @@ -home = /usr/bin -include-system-site-packages = false -version = 3.7.3 +home = C:\Users\karl.hudgell\.pyenv\pyenv-win\versions\3.7.2 +include-system-site-packages = false +version = 3.7.2