Workshop given at the MakeZurich hackathon to get the people started with MicroPython and the LoPy board from pycom. Code: https://github.com/adnexo-GmbH/lopy_ws
This document provides an introduction to using web application firewalls (WAFs) and demonstrates how to configure a WAF using ModSecurity on Apache. It discusses how a WAF works by intercepting HTTP traffic before it reaches the web server. The document shows how to install and configure ModSecurity and the Apache modules it requires. It also demonstrates how to test for and block common vulnerabilities like SQL injection and cross-site scripting using ModSecurity rule sets. Hands-on labs are provided to allow configuring ModSecurity logging and rules manipulation.
The document discusses file transfer protocols FTP and TFTP. It provides an overview of FTP, including the connections needed, commands, responses, and file transfer process. TFTP is introduced as a simpler file transfer protocol than FTP that uses UDP instead of TCP and lacks sophisticated features. Examples of file transfers using FTP and TFTP are presented along with message formats and error codes.
SSL is an acronym for Secure Sockets Layer. It is a protocol used for authenticating and encrypting web traffic. For web traffic to be authenticated means that your browser is able to verify the identity of the remote server.
Overview of UDP protocol.
UDP (User Datagram Protocol) is a simple extension of the Internet Protocol services. It basically provides simple packet transport service without any quality of service functions.
Unlike TCP, UDP is connection-less and packet-based. Application PDUs (application packets) sent over a UDP socket are delivered to the receiving host application as is without fragmentation.
UDP is mostly used by applications with simple request-response communication patterns like DNS, DHCP, RADIUS, RIP or RPC.
Since UDP does provide any error recovery such as retransmission of lost packets, the application protocols have to take care of these situations.
Security+ Guide to Network Security Fundamentals, 3rd Edition, by Mark Ciampa
Knowledge and skills required for Network Administrators and Information Technology professionals to be aware of security vulnerabilities, to implement security measures, to analyze an existing network environment in consideration of known security threats or risks, to defend against attacks or viruses, and to ensure data privacy and integrity. Terminology and procedures for implementation and configuration of security, including access control, authorization, encryption, packet filters, firewalls, and Virtual Private Networks (VPNs).
CNIT 120: Network Security
http://samsclass.info/120/120_S09.shtml#lecture
Policy: http://samsclass.info/policy_use.htm
Many thanks to Sam Bowne for allowing to publish these presentations.
FTP (File Transfer Protocol) allows users to transfer files between hosts over a TCP network like the Internet. It works by downloading files from remote computers to a local computer, or uploading files from a local computer to a remote computer. Anonymous FTP sites allow public access without logging in, using a username of "anonymous". FTP has security weaknesses that more secure variants like FTPS address through additions like TLS/SSL encryption. To use FTP for a website, one would get server space from a provider, buy storage, register a domain, and access the FTP settings in the administrator control panel to manage files.
This document discusses various protocols for securing network communications, including SSL/TLS, HTTPS, and SSH. It provides details on how SSL/TLS uses encryption and authentication to provide secure connections between a client and server. It also explains how HTTPS combines HTTP and SSL/TLS to securely transmit web traffic, and how SSH establishes secure channels for remote login and forwarding of network traffic.
- Access control lists (ACLs) allow or deny network traffic passing through a router based on source and destination IP addresses, protocols, and port numbers.
- There are two main types of ACLs: standard ACLs which filter based on source IP addresses, and extended ACLs which filter on source/destination IP addresses, protocols, and port numbers.
- ACLs can be numbered or named, with named ACLs allowing selective editing of statements not possible with numbered ACLs.
This document provides an introduction to using web application firewalls (WAFs) and demonstrates how to configure a WAF using ModSecurity on Apache. It discusses how a WAF works by intercepting HTTP traffic before it reaches the web server. The document shows how to install and configure ModSecurity and the Apache modules it requires. It also demonstrates how to test for and block common vulnerabilities like SQL injection and cross-site scripting using ModSecurity rule sets. Hands-on labs are provided to allow configuring ModSecurity logging and rules manipulation.
The document discusses file transfer protocols FTP and TFTP. It provides an overview of FTP, including the connections needed, commands, responses, and file transfer process. TFTP is introduced as a simpler file transfer protocol than FTP that uses UDP instead of TCP and lacks sophisticated features. Examples of file transfers using FTP and TFTP are presented along with message formats and error codes.
SSL is an acronym for Secure Sockets Layer. It is a protocol used for authenticating and encrypting web traffic. For web traffic to be authenticated means that your browser is able to verify the identity of the remote server.
Overview of UDP protocol.
UDP (User Datagram Protocol) is a simple extension of the Internet Protocol services. It basically provides simple packet transport service without any quality of service functions.
Unlike TCP, UDP is connection-less and packet-based. Application PDUs (application packets) sent over a UDP socket are delivered to the receiving host application as is without fragmentation.
UDP is mostly used by applications with simple request-response communication patterns like DNS, DHCP, RADIUS, RIP or RPC.
Since UDP does provide any error recovery such as retransmission of lost packets, the application protocols have to take care of these situations.
Security+ Guide to Network Security Fundamentals, 3rd Edition, by Mark Ciampa
Knowledge and skills required for Network Administrators and Information Technology professionals to be aware of security vulnerabilities, to implement security measures, to analyze an existing network environment in consideration of known security threats or risks, to defend against attacks or viruses, and to ensure data privacy and integrity. Terminology and procedures for implementation and configuration of security, including access control, authorization, encryption, packet filters, firewalls, and Virtual Private Networks (VPNs).
CNIT 120: Network Security
http://samsclass.info/120/120_S09.shtml#lecture
Policy: http://samsclass.info/policy_use.htm
Many thanks to Sam Bowne for allowing to publish these presentations.
FTP (File Transfer Protocol) allows users to transfer files between hosts over a TCP network like the Internet. It works by downloading files from remote computers to a local computer, or uploading files from a local computer to a remote computer. Anonymous FTP sites allow public access without logging in, using a username of "anonymous". FTP has security weaknesses that more secure variants like FTPS address through additions like TLS/SSL encryption. To use FTP for a website, one would get server space from a provider, buy storage, register a domain, and access the FTP settings in the administrator control panel to manage files.
This document discusses various protocols for securing network communications, including SSL/TLS, HTTPS, and SSH. It provides details on how SSL/TLS uses encryption and authentication to provide secure connections between a client and server. It also explains how HTTPS combines HTTP and SSL/TLS to securely transmit web traffic, and how SSH establishes secure channels for remote login and forwarding of network traffic.
- Access control lists (ACLs) allow or deny network traffic passing through a router based on source and destination IP addresses, protocols, and port numbers.
- There are two main types of ACLs: standard ACLs which filter based on source IP addresses, and extended ACLs which filter on source/destination IP addresses, protocols, and port numbers.
- ACLs can be numbered or named, with named ACLs allowing selective editing of statements not possible with numbered ACLs.
Network security involves implementing physical and software measures to protect a network from unauthorized access and enable authorized access. It aims to maintain confidentiality of data, integrity of data, availability of resources, and privacy of personal data. Key aspects of network security include encryption to scramble data, firewalls to control access to networks, and securing wireless networks through standards like WPA2. Common security processes also involve backing up data regularly, using access controls like passwords, and encrypting data during storage and transmission.
Token Passing in Data Communication DC25koolkampus
The document contains copyright information for figures from a 1998 McGraw-Hill textbook regarding token passing, token ring frames, data frame fields, token ring network diagrams, token ring switches, MAUs, FDDI examples, encoding, layers, frames, rings, and ring failure with nodes. The figures relate to network communication protocols and topologies without further context or explanation provided.
Next generation firewall(ngfw)feature and benefitsAnthony Daniel
Cyberoam NGFWs offer actionable intelligence and controls to enterprises that allow complete security controls over L2-L8 for their future-ready security. The next-generation security features in Cyberoam NGFWs protect networks against newly-evolving threats.
IPsec provides the capability to secure communications across a LAN, across private and public WANs, and across the Internet. Examples of its use include:
Secure branch office connectivity over the Internet
Secure remote access over the Internet
Establishing extranet and intranet connectivity with partners
Enhancing electronic commerce security
TLS (Transport Layer Security) is a cryptographic protocol that provides encryption and security for data sent over the internet. It is used by HTTPS to encrypt communication between web browsers and servers. TLS 1.2, the previous standard, had security flaws in how it exchanged encryption keys. TLS 1.3 improves security by using Diffie-Hellman key exchange so keys are not sent directly over the network. To upgrade a website from HTTP to HTTPS, an SSL certificate must be purchased and installed, all links on the site must be changed to HTTPS, and HTTP traffic should be redirected to HTTPS.
This document discusses the TCP/IP and UDP protocols. It begins with an introduction comparing the TCP/IP model to the OSI model. The TCP/IP model has four layers compared to seven in the OSI model. It then describes the two main host-to-host layer protocols in TCP/IP - TCP and UDP. TCP is connection-oriented and provides reliable, ordered delivery. It uses segments with a header containing fields like sequence numbers. UDP is connectionless and provides fast but unreliable delivery. It uses simpler segments with fewer header fields. The document concludes by explaining the end-to-end delivery process for packets using these protocols as they are transmitted between hosts via routers.
Short Presentation (2 Hrs) on SSL and TLS Protocol and its reference standard. Good for intermediate participant or technical who want to understand secure protocol an
SSL/TLS is a protocol that provides encryption and authentication for web requests. It evolved from earlier SSL versions into the current TLS standard. During a TLS handshake, the client and server agree on encryption parameters and verify certificates from a certificate authority to establish a secure connection. TLS allows for session resumption to reuse encryption settings for subsequent connections via session identifiers or tickets. However, TLS is still vulnerable to man-in-the-middle and DNS hijacking attacks if certificate authorities are compromised.
TCP is a connection-oriented protocol that is widely used for data transmission over the internet. It provides process-to-process communication using port numbers and assigns sequence numbers to each transmitted data segment. TCP establishes connections using a three-way handshake between a client and server, allowing for full-duplex communication and reliable data transfer through acknowledgement numbers and retransmission of lost packets. Connections are terminated when either party closes the connection.
This document summarizes a seminar presentation on BitTorrent peer-to-peer file sharing. It discusses how BitTorrent works by dividing files into pieces that are downloaded simultaneously from multiple peers. This allows much faster download speeds than traditional client-server systems, which can become overloaded. BitTorrent uses trackers to coordinate peer-to-peer connections and optimize piece selection, such as prioritizing rare pieces. Its decentralized architecture makes it scalable and robust.
The document discusses access control lists (ACLs) including:
1. Common port numbers for protocols like SMTP, POP3, IMAP, HTTP, HTTPS, DNS, FTP, TFTP, SNMP, and NTP.
2. The basics of packet filtering using ACLs including allowing or denying based on source/destination IP addresses and ports.
3. Numbering, naming, and applying standard and extended ACLs to interfaces for inbound and outbound traffic.
After your successful ClearPass deployment, how will you know if it's still performing properly? In this session, you'll leran how to use our built-in dashboard, logging and trending tools to identify problem areas, and reasonable threshold levels related to authentications, as well as overall appliance performance numbers. See how to turn on and use proactive notifications before problems occur that can keep users from connecting. Hear about best-practices for operationalizing ClearPass as the growth of devices, authentications, and collected data increases.
Quality of service aims to provide different levels of priority to different applications, users, or data flows. It is achieved through techniques like scheduling, traffic shaping, resource reservation, and admission control. Scheduling methods include FIFO queuing, priority queuing, and weighted fair queuing. Traffic shaping uses leaky bucket and token bucket algorithms. Resource reservation reserves buffer space, bandwidth, and other resources beforehand. Admission control restricts packet admission based on specifications. Models for QoS include the Integrated Services Model, which requires resource reservation in advance using RSVP, and the Differentiated Services Model, which differentiates traffic into classes.
The CCNA Exam v1.0 (200-301) is a 120-minute exam that tests a candidate's knowledge of network fundamentals, network access, IP connectivity, IP services, security fundamentals, and automation and programmability. The exam covers topics like network components, IP addressing, routing protocols, network security concepts, and controller-based networking architectures. The Implementing and Administering Cisco Solutions (CCNA) course helps candidates prepare for this exam.
This document provides an overview of Kerberos, an authentication protocol used to securely identify clients within a non-secure network. It discusses Kerberos' design which includes clients, a Key Distribution Center (KDC) consisting of an authentication and ticket granting server, and services. It also defines common Kerberos terms and describes how Kerberos works by having the KDC issue tickets to allow clients access to services. Key features of Kerberos include centralized credential management and reduced protocol weaknesses. A limitation is that compromising the KDC puts the entire infrastructure at risk.
SSL is a secure protocol that runs above TCP/IP and allows users to encrypt data and authenticate server and client identities securely. It uses public key encryption to generate a shared secret and establish an encrypted connection. The SSL handshake process verifies the server's identity and allows the client and server to agree on encryption algorithms before exchanging data. This helps prevent man-in-the-middle attacks by authenticating servers and encrypting the connection.
Configuring Wired 802.1x Authentication on Windows Server 2012.pdfdjameleddine2015
802.1x authentication adds an additional layer of security by requiring devices to authenticate before accessing the network. The document discusses how 802.1x uses RADIUS authentication and EAP protocols to authenticate supplicants, describes the components involved and their roles, and provides instructions for configuring 802.1x on a switch including enabling periodic reauthentication, setting timeout values, and assigning VLANs.
The document discusses virtual private networks (VPNs) and virtual private routed networks (VPRNs). It defines VPNs as private networks constructed within a public network infrastructure like the internet. VPRNs are IP-based layer 3 VPNs that emulate multi-site wide area routed networks over IP facilities. The document outlines requirements for VPNs and VPRNs like opaque transport, data security, QoS guarantees, and tunneling mechanisms. It also discusses different VPN categories and implementation issues for building VPRNs.
Difference between Routing & Routed ProtocolNetwax Lab
A routing protocol is different and is only used
between routers. It makes possible for routers to
build and maintain routing tables.
A routed protocol is a protocol by which data can
be routed.
The document discusses network security and provides an overview of five security services: message confidentiality, message integrity, message authentication, message nonrepudiation, and entity authentication. It describes how each of these services can be achieved using techniques like symmetric and asymmetric encryption, hashing, digital signatures, challenge-response authentication, and key management protocols.
LCA2018 Open Hardware MiniConference: LoliBot SoftwareAndy Gelme
This document provides an overview of the hardware and software for the LoliBot robot platform. The key points are:
- The LoliBot uses an ESP32 microcontroller running MicroPython with WiFi/Bluetooth connectivity and inputs/outputs to control hardware.
- The hardware includes RGB LEDs, DC motors, a servo motor, reflectance sensor, and IMU. The software controls these using MicroPython libraries.
- The software is organized into modules for configuration, drivers, and core functionality. It initializes hardware, connects to WiFi and MQTT, and responds to commands over MQTT.
Network security involves implementing physical and software measures to protect a network from unauthorized access and enable authorized access. It aims to maintain confidentiality of data, integrity of data, availability of resources, and privacy of personal data. Key aspects of network security include encryption to scramble data, firewalls to control access to networks, and securing wireless networks through standards like WPA2. Common security processes also involve backing up data regularly, using access controls like passwords, and encrypting data during storage and transmission.
Token Passing in Data Communication DC25koolkampus
The document contains copyright information for figures from a 1998 McGraw-Hill textbook regarding token passing, token ring frames, data frame fields, token ring network diagrams, token ring switches, MAUs, FDDI examples, encoding, layers, frames, rings, and ring failure with nodes. The figures relate to network communication protocols and topologies without further context or explanation provided.
Next generation firewall(ngfw)feature and benefitsAnthony Daniel
Cyberoam NGFWs offer actionable intelligence and controls to enterprises that allow complete security controls over L2-L8 for their future-ready security. The next-generation security features in Cyberoam NGFWs protect networks against newly-evolving threats.
IPsec provides the capability to secure communications across a LAN, across private and public WANs, and across the Internet. Examples of its use include:
Secure branch office connectivity over the Internet
Secure remote access over the Internet
Establishing extranet and intranet connectivity with partners
Enhancing electronic commerce security
TLS (Transport Layer Security) is a cryptographic protocol that provides encryption and security for data sent over the internet. It is used by HTTPS to encrypt communication between web browsers and servers. TLS 1.2, the previous standard, had security flaws in how it exchanged encryption keys. TLS 1.3 improves security by using Diffie-Hellman key exchange so keys are not sent directly over the network. To upgrade a website from HTTP to HTTPS, an SSL certificate must be purchased and installed, all links on the site must be changed to HTTPS, and HTTP traffic should be redirected to HTTPS.
This document discusses the TCP/IP and UDP protocols. It begins with an introduction comparing the TCP/IP model to the OSI model. The TCP/IP model has four layers compared to seven in the OSI model. It then describes the two main host-to-host layer protocols in TCP/IP - TCP and UDP. TCP is connection-oriented and provides reliable, ordered delivery. It uses segments with a header containing fields like sequence numbers. UDP is connectionless and provides fast but unreliable delivery. It uses simpler segments with fewer header fields. The document concludes by explaining the end-to-end delivery process for packets using these protocols as they are transmitted between hosts via routers.
Short Presentation (2 Hrs) on SSL and TLS Protocol and its reference standard. Good for intermediate participant or technical who want to understand secure protocol an
SSL/TLS is a protocol that provides encryption and authentication for web requests. It evolved from earlier SSL versions into the current TLS standard. During a TLS handshake, the client and server agree on encryption parameters and verify certificates from a certificate authority to establish a secure connection. TLS allows for session resumption to reuse encryption settings for subsequent connections via session identifiers or tickets. However, TLS is still vulnerable to man-in-the-middle and DNS hijacking attacks if certificate authorities are compromised.
TCP is a connection-oriented protocol that is widely used for data transmission over the internet. It provides process-to-process communication using port numbers and assigns sequence numbers to each transmitted data segment. TCP establishes connections using a three-way handshake between a client and server, allowing for full-duplex communication and reliable data transfer through acknowledgement numbers and retransmission of lost packets. Connections are terminated when either party closes the connection.
This document summarizes a seminar presentation on BitTorrent peer-to-peer file sharing. It discusses how BitTorrent works by dividing files into pieces that are downloaded simultaneously from multiple peers. This allows much faster download speeds than traditional client-server systems, which can become overloaded. BitTorrent uses trackers to coordinate peer-to-peer connections and optimize piece selection, such as prioritizing rare pieces. Its decentralized architecture makes it scalable and robust.
The document discusses access control lists (ACLs) including:
1. Common port numbers for protocols like SMTP, POP3, IMAP, HTTP, HTTPS, DNS, FTP, TFTP, SNMP, and NTP.
2. The basics of packet filtering using ACLs including allowing or denying based on source/destination IP addresses and ports.
3. Numbering, naming, and applying standard and extended ACLs to interfaces for inbound and outbound traffic.
After your successful ClearPass deployment, how will you know if it's still performing properly? In this session, you'll leran how to use our built-in dashboard, logging and trending tools to identify problem areas, and reasonable threshold levels related to authentications, as well as overall appliance performance numbers. See how to turn on and use proactive notifications before problems occur that can keep users from connecting. Hear about best-practices for operationalizing ClearPass as the growth of devices, authentications, and collected data increases.
Quality of service aims to provide different levels of priority to different applications, users, or data flows. It is achieved through techniques like scheduling, traffic shaping, resource reservation, and admission control. Scheduling methods include FIFO queuing, priority queuing, and weighted fair queuing. Traffic shaping uses leaky bucket and token bucket algorithms. Resource reservation reserves buffer space, bandwidth, and other resources beforehand. Admission control restricts packet admission based on specifications. Models for QoS include the Integrated Services Model, which requires resource reservation in advance using RSVP, and the Differentiated Services Model, which differentiates traffic into classes.
The CCNA Exam v1.0 (200-301) is a 120-minute exam that tests a candidate's knowledge of network fundamentals, network access, IP connectivity, IP services, security fundamentals, and automation and programmability. The exam covers topics like network components, IP addressing, routing protocols, network security concepts, and controller-based networking architectures. The Implementing and Administering Cisco Solutions (CCNA) course helps candidates prepare for this exam.
This document provides an overview of Kerberos, an authentication protocol used to securely identify clients within a non-secure network. It discusses Kerberos' design which includes clients, a Key Distribution Center (KDC) consisting of an authentication and ticket granting server, and services. It also defines common Kerberos terms and describes how Kerberos works by having the KDC issue tickets to allow clients access to services. Key features of Kerberos include centralized credential management and reduced protocol weaknesses. A limitation is that compromising the KDC puts the entire infrastructure at risk.
SSL is a secure protocol that runs above TCP/IP and allows users to encrypt data and authenticate server and client identities securely. It uses public key encryption to generate a shared secret and establish an encrypted connection. The SSL handshake process verifies the server's identity and allows the client and server to agree on encryption algorithms before exchanging data. This helps prevent man-in-the-middle attacks by authenticating servers and encrypting the connection.
Configuring Wired 802.1x Authentication on Windows Server 2012.pdfdjameleddine2015
802.1x authentication adds an additional layer of security by requiring devices to authenticate before accessing the network. The document discusses how 802.1x uses RADIUS authentication and EAP protocols to authenticate supplicants, describes the components involved and their roles, and provides instructions for configuring 802.1x on a switch including enabling periodic reauthentication, setting timeout values, and assigning VLANs.
The document discusses virtual private networks (VPNs) and virtual private routed networks (VPRNs). It defines VPNs as private networks constructed within a public network infrastructure like the internet. VPRNs are IP-based layer 3 VPNs that emulate multi-site wide area routed networks over IP facilities. The document outlines requirements for VPNs and VPRNs like opaque transport, data security, QoS guarantees, and tunneling mechanisms. It also discusses different VPN categories and implementation issues for building VPRNs.
Difference between Routing & Routed ProtocolNetwax Lab
A routing protocol is different and is only used
between routers. It makes possible for routers to
build and maintain routing tables.
A routed protocol is a protocol by which data can
be routed.
The document discusses network security and provides an overview of five security services: message confidentiality, message integrity, message authentication, message nonrepudiation, and entity authentication. It describes how each of these services can be achieved using techniques like symmetric and asymmetric encryption, hashing, digital signatures, challenge-response authentication, and key management protocols.
LCA2018 Open Hardware MiniConference: LoliBot SoftwareAndy Gelme
This document provides an overview of the hardware and software for the LoliBot robot platform. The key points are:
- The LoliBot uses an ESP32 microcontroller running MicroPython with WiFi/Bluetooth connectivity and inputs/outputs to control hardware.
- The hardware includes RGB LEDs, DC motors, a servo motor, reflectance sensor, and IMU. The software controls these using MicroPython libraries.
- The software is organized into modules for configuration, drivers, and core functionality. It initializes hardware, connects to WiFi and MQTT, and responds to commands over MQTT.
This is a python course for beginners, intended both for frontal class learning as well as self-work.
The Course is designed for 2 days and then another week of HW assignments.
This document provides instructions for exercises using an IoT Agent to connect devices to the FIWARE platform. It outlines 10 exercises of increasing difficulty:
1. Set up a Python environment and test connectivity to FIWARE services.
2. Discover available device models and create a virtual temperature sensor.
3. Send sensor observations and read them back.
4. Create additional sensor types using different models.
5. Create a new device model.
6. Create an actuator device and send/receive commands.
7. Connect a physical device by creating a model, registering it, and sending data.
8. Additional exercises include building apps on top of context data or visualizing data.
Slides from the 30 minutes long version of "Wait, IPython can do that?!" presentation. I'm talking about some basic and advanced uses of IPython. For a a longer, 45 minutes long version of the slides, check: https://www.slideshare.net/SebastianWitowski/wait-ipython-can-do-that-154464752
The document describes the process of implementing SMP support for OpenBSD on a SGI Octane 2 machine. Key steps included restructuring per-processor data, implementing locking primitives, handling hardware aspects like spinning up secondary processors, and debugging challenges like detecting deadlocks. Debugging was made difficult by timing issues but was aided by tools like JTAG, DDB, printfs, and modifying locks to record stuck locations. Interrupts could block inter-processor communication so the clock handler was modified to re-enable interrupts during locking.
Reid Wightman's presentation at AppSec DC 2012. Reid provides background and the lates on Digital Bond's Project Basecamp. New PLC exploit modules include a Stuxnet-type attack on the Modicon Quantum.
Python is a popular programming language created by Guido van Rossum in 1991. It is easy to use, powerful, and versatile, making it suitable for beginners and experts alike. Python code can be written and executed in the browser using Google Colab, which provides a Jupyter notebook environment and access to computing resources like GPUs. The document then discusses installing Python using Anaconda, basic Python concepts like indentation, variables, strings, conditionals, and loops.
This document discusses using OAuth2 for federated identity and access management with IoT devices that use MQTT. It provides an overview of federated identity and access management (FIAM) and OAuth2, and why they are suitable for IoT. It then demonstrates using OAuth2 to authenticate an Arduino device that publishes sensor data to an MQTT broker. The demo shows the device obtaining and refreshing access tokens to connect and publish, while a Python client subscribes to the data. Lessons learned and next steps are discussed.
- IPython can do powerful things beyond normal Python like dynamic object introspection, input/output caching, magic functions, and custom configurations.
- Magic functions allow extending IPython's capabilities, some examples include %timeit for timing code, %run for loading scripts, and cell magics for different languages.
- Extensions allow packaging and sharing magic functions, and there are many existing extensions for tasks like SQL, Neo4j, and Django.
- IPython is highly configurable through profiles and configuration files to customize things like startup behavior, key bindings, and extensions loaded.
Python testing like a pro by Keith YangPYCON MY PLT
This document provides an overview of software testing strategies and tools for Python projects. It recommends:
1. Using tools like IPython, linters, yapf, pytest, and hypothesis to find errors early through static and dynamic testing. This allows issues to be identified and addressed before deployment.
2. Enabling easy debugging in production with tools like Sentry, IPython, and alog to monitor and diagnose runtime errors.
3. Preparing for failures through defensive programming techniques and testing backup plans, as "no tested backup plan equals no backup." Thorough testing during development helps maximize uptime and minimize surprises once software is deployed.
The document discusses various approaches to integrating native code with Ruby:
Native extensions allow Ruby code to directly call C/C++ functions for improved performance or to interface with existing libraries. This can be done through writing C extensions, using the Foreign Function Interface (FFI) gem, or the Simplified Wrapper and Interface Generator (SWIG). FFI provides an easy Ruby DSL for interfacing with native code while handling data conversions. SWIG can generate bindings to interface Ruby and other languages with C/C++ code. Memory management must still be considered when using native extensions.
This document discusses porting a legacy Python application called Eddie-tool to work with both Python 2 and 3. The application is over 10K lines of code for system monitoring and was last updated in 2009. The author explains why they want to support both Python versions to accommodate enterprise clients still using Python 2. They outline their porting process which included using tools like 2to3 and python-modernize, writing unit tests, and creating a compatibility module. The outcome was a new agent called Boris that was ported in 22 hours and works with Python 2.7 and 3.3+ while addressing issues like bytes, longs, exceptions, and other changes between the Python versions.
A story of how we went about packaging perl and all of the dependencies that our project has.
Where we were before, the chosen path, and the end result.
The pitfalls and a view on the pros and cons of the previous state of affairs versus the pros/cons of the end result.
KOSS Lab. Conference 2016에서 튜토리얼 섹션으로 진행하였습니다.
link: https://kosscon.kr/program/tutorial#11
제로부터 시작하는 텐서플로우
Zero Staring Life in Artificial Intelligence
텐서플로우는 구글에서 공개한 오픈 소스 프로젝트입니다.
기계학습에 관심이 있지만 IT를 잘 모르시는 분들을 위해서
가상환경부터 시작해서 텐서플로우를 설치하고,
예제코드를 따라하면서,
기계학습을 공부하는 사람들에게 마중물(!) 역활을 작게나마 도움이 되었으면 좋겠습니다.
This document provides a summary of an ESP8266 workshop covering:
- Introduction to the ESP8266 hardware and software
- Setting up ESP-01 and ESP-12 modules for development
- Flashing firmware using esptool
- Introduction to NodeMCU and Lua
- Using the ESPlorer IDE
- Examples of using buttons, LEDs, WiFi, UDP, and MQTT with the ESP8266
Talk at PyCon2022 over building binary packages for Python. Covers an overview and an in-depth look into pybind11 for binding, scikit-build for creating the build, and build & cibuildwheel for making the binaries that can be distributed on PyPI.
The core idea of PyPy is to produce a flexible and fast implementation of the Python programming language. The talk will cover the interpreter, translator and jit parts of the code and their relationships and the fundamental ways in which PyPy differs from other virtual machine implementations.
The document discusses building an enterprise/cloud analytics platform using Jupyter notebooks and Apache Spark. It describes the challenges of deploying Jupyter notebooks at an enterprise scale, including collaboration, large-scale data analysis, security, and authentication. It outlines various approaches taken to address these challenges, such as running the entire Jupyter stack on a single large machine or giving each user their own container. However, these approaches have limitations. The document then introduces the Jupyter Enterprise Gateway as a solution developed by IBM to optimize resource allocation, support multi-users securely through impersonation, and enhance security overall when deploying Jupyter at an enterprise scale.
Similar to Getting Started with MicroPython and LoPy (20)
Securing BGP: Operational Strategies and Best Practices for Network Defenders...APNIC
Md. Zobair Khan,
Network Analyst and Technical Trainer at APNIC, presented 'Securing BGP: Operational Strategies and Best Practices for Network Defenders' at the Phoenix Summit held in Dhaka, Bangladesh from 23 to 24 May 2024.
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...APNIC
Adli Wahid, Senior Internet Security Specialist at APNIC, delivered a presentation titled 'Honeypots Unveiled: Proactive Defense Tactics for Cyber Security' at the Phoenix Summit held in Dhaka, Bangladesh from 23 to 24 May 2024.
Cloud computing is revolutionizing the digital age by providing organizations with efficiency and flexibility globally. However, there are drawbacks to this convenience as well. Renowned Miami expert Alec Kassir highlights the growing significance of comprehending and reducing cloud-based security risks.
10 Conversion Rate Optimization (CRO) Techniques to Boost Your Website’s Perf...Web Inspire
What is CRO?
Conversion Rate Optimization, or CRO, is the process of enhancing your website to increase the percentage of visitors who take a desired action. This could be anything from purchasing a product to signing up for a newsletter. Essentially, CRO is about making your website more effective in turning visitors into customers.
Why is CRO Important?
CRO is crucial because it directly impacts your bottom line. A higher conversion rate means more customers and revenue without needing to increase your website traffic. Plus, a well-optimized site improves user experience, which can lead to higher customer satisfaction and loyalty.
EASY TUTORIAL OF HOW TO USE CiCi AI BY: FEBLESS HERNANE Febless Hernane
Cici AI simplifies tasks like writing and research with its user-friendly platform. Users sign up, input queries, customize responses, and edit content as needed. It offers efficient saving and exporting options, making it ideal for enhancing productivity through AI assistance.
Network Security and Cyber Laws (Complete Notes) for B.Tech/BCA/BSc. ITSarthak Sobti
Network Security and Cyber Laws
Detailed Course Content
Unit 1: Introduction to Network Security
- Introduction to Network Security
- Goals of Network Security
- ISO Security Architecture
- Attacks and Categories of Attacks
- Network Security Services & Mechanisms
- Authentication Applications: Kerberos, X.509 Directory Authentication Service
Unit 2: Application Layer Security
- Security Threats and Countermeasures
- SET Protocol
- Electronic Mail Security
- Pretty Good Privacy (PGP)
- S/MIME
- Transport Layer Security: Secure Socket Layer & Transport Layer Security
- Wireless Transport Layer Security
Unit 3: IP Security and System Security
- Authentication Header
- Encapsulating Security Payloads
- System Security: Intruders, Intrusion Detection System, Viruses
- Firewall Design Principles
- Trusted Systems
- OS Security
- Program Security
Unit 4: Introduction to Cyber Law
- Cyber Crime, Cyber Criminals, Cyber Law
- Object and Scope of the IT Act: Genesis, Object, Scope of the Act
- E-Governance and IT Act 2000
- Legal Recognition of Electronic Records
- Legal Recognition of Digital Signatures
- Use of Electronic Records and Digital Signatures in Government and its Agencies
- IT Act in Detail
- Basics of Network Security: IP Addresses, Port Numbers, and Sockets
- Hiding and Tracing IP Addresses
- Scanning: Traceroute, Ping Sweeping, Port Scanning, ICMP Scanning
- Fingerprinting: Active and Passive Email
Unit 5: Advanced Attacks
- Different Kinds of Buffer Overflow Attacks: Stack Overflows, String Overflows, Heap and Integer Overflows
- Internal Attacks: Emails, Mobile Phones, Instant Messengers, FTP Uploads, Dumpster Diving, Shoulder Surfing
- DOS Attacks: Ping of Death, Teardrop, SYN Flooding, Land Attacks, Smurf Attacks, UDP Flooding
- Hybrid DOS Attacks
- Application-Specific Distributed DOS Attacks
Decentralized Justice in Gaming and EsportsFederico Ast
Discover how Kleros is transforming the landscape of dispute resolution in the gaming and eSports industry through the power of decentralized justice.
This presentation, delivered by Federico Ast, CEO of Kleros, explores the innovative application of blockchain technology, crowdsourcing, and incentivized mechanisms to create fair and efficient arbitration processes.
Key Highlights:
- Introduction to Decentralized Justice: Learn about the foundational principles of Kleros and how it combines blockchain with crowdsourcing to develop a novel justice system.
- Challenges in Traditional Arbitration: Understand the limitations of conventional arbitration methods, such as high costs and long resolution times, particularly for small claims in the gaming sector.
- How Kleros Works: A step-by-step guide on the functioning of Kleros, from the initiation of a smart contract to the final decision by a jury of peers.
- Case Studies in eSports: Explore real-world scenarios where Kleros has been applied to resolve disputes in eSports, including issues like cheating, governance, player behavior, and contractual disagreements.
- Practical Implementation: Detailed walkthroughs of how disputes are handled in eSports tournaments, emphasizing speed, cost-efficiency, and fairness.
- Enhanced Transparency: The role of blockchain in providing an immutable and transparent record of proceedings, ensuring trust in the resolution process.
- Future Prospects: The potential expansion of decentralized justice mechanisms across various sectors within the gaming industry.
For more information, visit kleros.io or follow Federico Ast and Kleros on social media:
• Twitter: @federicoast
• Twitter: @kleros_io
2. What is MicroPython
• Python for Microcontrollers
• Lean implementation of Python 3
• Subset of standard lib
• Needs
• 256k code space
• 16k RAM
3. What is a LoPy
• ESP32 Board
• 160 MHz CPU
• 512k RAM
• 4 MB Flash for user code
• I2C, SPI, UART, I2C
• SD Card
• 8 ADC Channels
• 24 GPIOs
• RTC
• WS2812 LED
• Wireless connectivity
• Bluetooth 4.2 (BLE & Classic)
• LoRa (Semtech’s SX1272)
• WiFi
4. Tooling
• Batteries included!
• Firmware upgrade tool
• PyMakr IDE
• PyMate mobile App
• Based on MQTT
• Soon: cloud service
• Code upload via
• Built-in FTP/telnet Server
• Serial connection
5. First thing to do
• Install Pycom updater
• https://www.pycom.io/support/supportdownloads
• Firmware Upgrade!
• Almost weekly releases
with new features
• Check http://forum.pycom.io
Announcement topic
6. Connect to Device REPL
• PyMaker IDE
• Settings/Preferences/Pycom Device
• Directly via serial port
• 8N1 / 115200 Baud
• screen /dev/tty... 115200
• putty
• WiFi
• SSID: lopy-wlan-XXXX
• Password: www.pycom.io
• Telnet 192.168.4.1
8. Primer on Python
• Variables
• Functions
text = ‘Dont forget your towel!’
number = 42
floatingnumber = 13.37
def print_text(name, age):
text = "My name is {0} and I’m {1} years old"
print(text.format(name, age))
9. Primer on Python (math)
• Addition, Subtraction, Division, Multiplication,
exponentiation
12+34
3*3
16/2
(3+1)*(4+5)
5**2 #5 to the power of 2
‘spam’*3 #spamspamspam
10. Primer on Python (useful built-ins)
• print(text) – Print text
• int(text) – «cast» text to int
• type(obj) – Get type of object
• input(prompt) – Read from stdin return value as string
12. Primer on Python (control structs)
if value == True:
print(‘value is true’)
else:
print(‘value is false’)
while True:
do_whatever_is_to_do()
for i in range(10):
print(‘{0}-‐th run’.format(i))
14. Exercises
• Create a function which changes the LED
color from red to blue every 1s
• Create a function which asks for your
weight and your body size and calculates
BMI = weight (kg) divided by size2 (m)
15. Primer on Python (modules)
• Files are treated as modules
• Stuff is imported from modules
• Stuff needs to be imported to be used
• File lib.py contains function connect()
# use lib
from lib import print_name
print_name()
# lib.py
def print_name(name):
print(‘-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐’)
print(name)
print(‘-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐’)
16. More on Python
• Lots of tutorials
• https://docs.pycom.io
• https://learnpythonthehardway.org/
• http://docs.python-guide.org/en/latest/
17. GPIO output
from machine import Pin
# initialize ``P9`` in gpio mode and make it an output
p_out = Pin('P9', mode=Pin.OUT)
p_out.value(1)
p_out.value(0)
18. GPIO input
from machine import Pin
# initialize ``P10`` in gpio mode and make it an input
p_in = Pin('P10', mode=Pin.IN, pull=Pin.PULL_UP)
p_in.value() # get value, 0 or 1
19. GPIO with interrupts
from machine import Pin
# initialize ``P10`` in gpio mode and make it an input
p_in = Pin('P10', mode=Pin.IN, pull=Pin.PULL_UP)
p_in.callback(Pin.IRQ_HIGH_LEVEL, lambda pin: print(“ON”))
p_in.callback(Pin.IRQ_LOW_LEVEL, lambda pin: print(“OFF”))
# Pin.IRQ_HIGH_LEVEL | Pin.IRQ_LOW_LEVEL also possible
20. GPIO numbering
# Numbering with expansion board
Pin.exp_board.G16
led = Pin(Pin.exp_board.G16, mode=Pin.OUT)
# Numbering without expansion board
# P10 is mapped to the Button
Pin.module.P9
led = Pin(Pin.module.P9, mode=Pin.OUT)
24. Nice to know
• Deploy your scripts via
• telnet
• FTP
• Safe boot mode
• Firmware recovery
25. Hello ThingsNetwork!
• https://docs.pycom.io/pycom_esp32/pycom
_esp32/tutorial/includes/lora-abp.html
from network import LoRa
import socket
# Initialize LoRa in LORAWAN mode.
lora = LoRa(mode=LoRa.LORAWAN)
# join a network using ABP (Activation By Personalization)
lora.join(activation=LoRa.ABP, auth=(dev_addr, nwk_swkey, app_swkey))
# create a LoRa socket
s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
# make the socket blocking
# (waits for the data to be sent and for the 2 receive windows to expire)
s.setblocking(True)
# send some data
s.send(bytes([0x01, 0x02, 0x03]))
# make the socket non-‐blocking
# (because if there's no data received it will block forever...)
s.setblocking(False)
# get any data received (if any...)
data = s.recv(64)
print(data)
29. Thanks!
• Hope I could whet your appetite J
• If you have any questions please contact me
Our online shop with pycom products
• http://shop.adnexo.ch
Code & slides
• https://github.com/adnexo-GmbH/lopy_ws
Contact
• christian.faessler@adnexo.ch
• www.adnexo.ch
• http://twitter.com/adnexo_gmbh