This repository has been archived on 2025-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
group-1-db23/analysis/tester.ipynb
Sebastian Lenzlinger 843ed0a1a3 SYNC COMMIT
2024-01-04 16:18:28 +01:00

189 lines
12 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "initial_id",
"metadata": {
"collapsed": true,
"ExecuteTime": {
"end_time": "2024-01-04T15:06:22.066455620Z",
"start_time": "2024-01-04T15:06:21.950613935Z"
}
},
"outputs": [],
"source": [
"from db_connector import RemoteDB"
]
},
{
"cell_type": "code",
"execution_count": 2,
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2024-01-04 16:06:22,110 - paramiko.transport - DEBUG - starting thread (client mode): 0xd9a91790\n",
"2024-01-04 16:06:22,112 - paramiko.transport - DEBUG - Local version/idstring: SSH-2.0-paramiko_3.4.0\n",
"2024-01-04 16:06:22,151 - paramiko.transport - DEBUG - Remote version/idstring: SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.6\n",
"2024-01-04 16:06:22,152 - paramiko.transport - INFO - Connected (version 2.0, client OpenSSH_8.9p1)\n",
"2024-01-04 16:06:22,188 - paramiko.transport - DEBUG - === Key exchange possibilities ===\n",
"2024-01-04 16:06:22,188 - paramiko.transport - DEBUG - kex algos: curve25519-sha256, curve25519-sha256@libssh.org, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, sntrup761x25519-sha512@openssh.com, diffie-hellman-group-exchange-sha256, diffie-hellman-group16-sha512, diffie-hellman-group18-sha512, diffie-hellman-group14-sha256, kex-strict-s-v00@openssh.com\n",
"2024-01-04 16:06:22,189 - paramiko.transport - DEBUG - server key: rsa-sha2-512, rsa-sha2-256, ecdsa-sha2-nistp256, ssh-ed25519\n",
"2024-01-04 16:06:22,189 - paramiko.transport - DEBUG - client encrypt: chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com\n",
"2024-01-04 16:06:22,190 - paramiko.transport - DEBUG - server encrypt: chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com\n",
"2024-01-04 16:06:22,190 - paramiko.transport - DEBUG - client mac: umac-64-etm@openssh.com, umac-128-etm@openssh.com, hmac-sha2-256-etm@openssh.com, hmac-sha2-512-etm@openssh.com, hmac-sha1-etm@openssh.com, umac-64@openssh.com, umac-128@openssh.com, hmac-sha2-256, hmac-sha2-512, hmac-sha1\n",
"2024-01-04 16:06:22,190 - paramiko.transport - DEBUG - server mac: umac-64-etm@openssh.com, umac-128-etm@openssh.com, hmac-sha2-256-etm@openssh.com, hmac-sha2-512-etm@openssh.com, hmac-sha1-etm@openssh.com, umac-64@openssh.com, umac-128@openssh.com, hmac-sha2-256, hmac-sha2-512, hmac-sha1\n",
"2024-01-04 16:06:22,190 - paramiko.transport - DEBUG - client compress: none, zlib@openssh.com\n",
"2024-01-04 16:06:22,190 - paramiko.transport - DEBUG - server compress: none, zlib@openssh.com\n",
"2024-01-04 16:06:22,191 - paramiko.transport - DEBUG - client lang: <none>\n",
"2024-01-04 16:06:22,191 - paramiko.transport - DEBUG - server lang: <none>\n",
"2024-01-04 16:06:22,191 - paramiko.transport - DEBUG - kex follows: False\n",
"2024-01-04 16:06:22,191 - paramiko.transport - DEBUG - === Key exchange agreements ===\n",
"2024-01-04 16:06:22,192 - paramiko.transport - DEBUG - Strict kex mode: True\n",
"2024-01-04 16:06:22,192 - paramiko.transport - DEBUG - Kex: curve25519-sha256@libssh.org\n",
"2024-01-04 16:06:22,192 - paramiko.transport - DEBUG - HostKey: ssh-ed25519\n",
"2024-01-04 16:06:22,192 - paramiko.transport - DEBUG - Cipher: aes128-ctr\n",
"2024-01-04 16:06:22,193 - paramiko.transport - DEBUG - MAC: hmac-sha2-256\n",
"2024-01-04 16:06:22,193 - paramiko.transport - DEBUG - Compression: none\n",
"2024-01-04 16:06:22,193 - paramiko.transport - DEBUG - === End of kex handshake ===\n",
"2024-01-04 16:06:22,271 - paramiko.transport - DEBUG - Resetting outbound seqno after NEWKEYS due to strict mode\n",
"2024-01-04 16:06:22,271 - paramiko.transport - DEBUG - kex engine KexCurve25519 specified hash_algo <built-in function openssl_sha256>\n",
"2024-01-04 16:06:22,272 - paramiko.transport - DEBUG - Switch to new keys ...\n",
"2024-01-04 16:06:22,272 - paramiko.transport - DEBUG - Resetting inbound seqno after NEWKEYS due to strict mode\n",
"2024-01-04 16:06:22,272 - paramiko.transport - DEBUG - Got EXT_INFO: {'server-sig-algs': b'ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com', 'publickey-hostbound@openssh.com': b'0'}\n",
"2024-01-04 16:06:22,272 - paramiko.transport - DEBUG - Attempting public-key auth...\n",
"2024-01-04 16:06:22,371 - paramiko.transport - DEBUG - userauth is OK\n",
"2024-01-04 16:06:22,417 - paramiko.transport - INFO - Authentication (publickey) failed.\n",
"2024-01-04 16:06:22,450 - paramiko.transport - DEBUG - starting thread (client mode): 0xd9a9af10\n",
"2024-01-04 16:06:22,451 - paramiko.transport - DEBUG - Local version/idstring: SSH-2.0-paramiko_3.4.0\n",
"2024-01-04 16:06:22,488 - paramiko.transport - DEBUG - Remote version/idstring: SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.6\n",
"2024-01-04 16:06:22,488 - paramiko.transport - INFO - Connected (version 2.0, client OpenSSH_8.9p1)\n",
"2024-01-04 16:06:22,512 - paramiko.transport - DEBUG - === Key exchange possibilities ===\n",
"2024-01-04 16:06:22,513 - paramiko.transport - DEBUG - kex algos: curve25519-sha256, curve25519-sha256@libssh.org, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, sntrup761x25519-sha512@openssh.com, diffie-hellman-group-exchange-sha256, diffie-hellman-group16-sha512, diffie-hellman-group18-sha512, diffie-hellman-group14-sha256, kex-strict-s-v00@openssh.com\n",
"2024-01-04 16:06:22,514 - paramiko.transport - DEBUG - server key: rsa-sha2-512, rsa-sha2-256, ecdsa-sha2-nistp256, ssh-ed25519\n",
"2024-01-04 16:06:22,514 - paramiko.transport - DEBUG - client encrypt: chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com\n",
"2024-01-04 16:06:22,514 - paramiko.transport - DEBUG - server encrypt: chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com\n",
"2024-01-04 16:06:22,514 - paramiko.transport - DEBUG - client mac: umac-64-etm@openssh.com, umac-128-etm@openssh.com, hmac-sha2-256-etm@openssh.com, hmac-sha2-512-etm@openssh.com, hmac-sha1-etm@openssh.com, umac-64@openssh.com, umac-128@openssh.com, hmac-sha2-256, hmac-sha2-512, hmac-sha1\n",
"2024-01-04 16:06:22,515 - paramiko.transport - DEBUG - server mac: umac-64-etm@openssh.com, umac-128-etm@openssh.com, hmac-sha2-256-etm@openssh.com, hmac-sha2-512-etm@openssh.com, hmac-sha1-etm@openssh.com, umac-64@openssh.com, umac-128@openssh.com, hmac-sha2-256, hmac-sha2-512, hmac-sha1\n",
"2024-01-04 16:06:22,515 - paramiko.transport - DEBUG - client compress: none, zlib@openssh.com\n",
"2024-01-04 16:06:22,515 - paramiko.transport - DEBUG - server compress: none, zlib@openssh.com\n",
"2024-01-04 16:06:22,516 - paramiko.transport - DEBUG - client lang: <none>\n",
"2024-01-04 16:06:22,516 - paramiko.transport - DEBUG - server lang: <none>\n",
"2024-01-04 16:06:22,517 - paramiko.transport - DEBUG - kex follows: False\n",
"2024-01-04 16:06:22,517 - paramiko.transport - DEBUG - === Key exchange agreements ===\n",
"2024-01-04 16:06:22,517 - paramiko.transport - DEBUG - Strict kex mode: True\n",
"2024-01-04 16:06:22,517 - paramiko.transport - DEBUG - Kex: curve25519-sha256@libssh.org\n",
"2024-01-04 16:06:22,517 - paramiko.transport - DEBUG - HostKey: ssh-ed25519\n",
"2024-01-04 16:06:22,517 - paramiko.transport - DEBUG - Cipher: aes128-ctr\n",
"2024-01-04 16:06:22,517 - paramiko.transport - DEBUG - MAC: hmac-sha2-256\n",
"2024-01-04 16:06:22,517 - paramiko.transport - DEBUG - Compression: none\n",
"2024-01-04 16:06:22,518 - paramiko.transport - DEBUG - === End of kex handshake ===\n",
"2024-01-04 16:06:22,518 - paramiko.transport - DEBUG - EOF in transport thread\n",
"2024-01-04 16:06:22,597 - paramiko.transport - DEBUG - Resetting outbound seqno after NEWKEYS due to strict mode\n",
"2024-01-04 16:06:22,598 - paramiko.transport - DEBUG - kex engine KexCurve25519 specified hash_algo <built-in function openssl_sha256>\n",
"2024-01-04 16:06:22,599 - paramiko.transport - DEBUG - Switch to new keys ...\n",
"2024-01-04 16:06:22,600 - paramiko.transport - DEBUG - Resetting inbound seqno after NEWKEYS due to strict mode\n",
"2024-01-04 16:06:22,601 - paramiko.transport - DEBUG - Got EXT_INFO: {'server-sig-algs': b'ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com', 'publickey-hostbound@openssh.com': b'0'}\n",
"2024-01-04 16:06:22,601 - paramiko.transport - DEBUG - Attempting public-key auth...\n",
"2024-01-04 16:06:22,694 - paramiko.transport - DEBUG - userauth is OK\n",
"2024-01-04 16:06:22,752 - paramiko.transport - INFO - Authentication (publickey) successful!\n"
]
}
],
"source": [
"remote_db = RemoteDB()"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-04T15:06:22.784599466Z",
"start_time": "2024-01-04T15:06:22.066355304Z"
}
},
"id": "62c8f38132d5cd27"
},
{
"cell_type": "code",
"execution_count": 3,
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2024-01-04 16:06:22,785 - paramiko.transport - DEBUG - [chan 0] Max packet in: 32768 bytes\n",
"2024-01-04 16:06:22,810 - paramiko.transport - DEBUG - Received global request \"hostkeys-00@openssh.com\"\n",
"2024-01-04 16:06:22,811 - paramiko.transport - DEBUG - Rejecting \"hostkeys-00@openssh.com\" global request from server.\n",
"2024-01-04 16:06:22,812 - paramiko.transport - DEBUG - Debug msg: b'/home/sebl/.ssh/authorized_keys:4: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding'\n",
"2024-01-04 16:06:22,835 - paramiko.transport - DEBUG - [chan 0] Max packet out: 32768 bytes\n",
"2024-01-04 16:06:22,835 - paramiko.transport - DEBUG - Secsh channel 0 opened.\n",
"2024-01-04 16:06:23,924 - paramiko.transport - DEBUG - [chan 0] EOF sent (0)\n",
"2024-01-04 16:06:23,925 - paramiko.transport - DEBUG - [chan 1] Max packet in: 32768 bytes\n",
"2024-01-04 16:06:23,960 - paramiko.transport - DEBUG - [chan 0] EOF received (0)\n",
"2024-01-04 16:06:24,128 - paramiko.transport - DEBUG - [chan 1] Max packet out: 32768 bytes\n",
"2024-01-04 16:06:24,129 - paramiko.transport - DEBUG - Secsh channel 1 opened.\n"
]
}
],
"source": [
"result = remote_db.execute_query(\"select * from footbikecount where id = 1\")"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-04T15:06:24.838445832Z",
"start_time": "2024-01-04T15:06:22.786527573Z"
}
},
"id": "29b60614b47dbc87"
},
{
"cell_type": "code",
"execution_count": 4,
"outputs": [
{
"data": {
"text/plain": "(1, 1250443, 2678956, '2012-01-01', 0, 0, 0, 0, 0, 'Sunday')"
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"result[0]"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-04T15:06:24.848769980Z",
"start_time": "2024-01-04T15:06:24.846327294Z"
}
},
"id": "cddcbd64b8c52d93"
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}