OpenLLM-France/wikimedia huggingface dataset:
# Making Websites with Flask/Creating a web app

Now that you have learned the basics of Flask website development, it is time for the final project. We will be making a web application in which someone can someone can upload their name, age and favourite food, and every other user can view this information.

## Creating the homepage

We will now create the homepage for the website so that when someone connects, they will know what this is.
Here is the code:
As you can see, it links to a sign up page, that does not exist yet. We will now address this issue.

## Making the sign up page

For someone to use your website, they must create an account. But first, we must create a list of all accounts. We will structure it like this: accounts = [{"name": "John Doe", "age": 20, "food": "pizza"}]. In the next chapter we will code this page, and more.
# Making Websites with Flask/Getting Started
## Installation

Flask is a Python library, so you first of course need Python installed. Then, you can use the pip package manager to install Flask:
To make sure you installed Flask correctly, run the following Python script:
If it runs without any errors, you have successfully installed Flask!

## Hello World!

In programming, it is a tradition to make a program that displays "Hello World!". So, we will make a website that returns "Hello World!" when we visit it.
In your code editor, write the following code:
Now, save the Python code and run it as you would any other Python program. Then, when you visit localhost:7070, you should "Hello World!".

### Code Breakdown

Now, let's break down the code that we just wrote line by line.
First of all, we need to import the things we need from the Flask module (line 1):
Then, we need to create an instance of the Flask object, which represents our web app (line 3):
Then, we create a decorator. Decorators are functions that modify the next function. In this case, the decorator shows the user whatever is returned by the next function when the user visits the root page (line 5):
Then, we actually create the function which will be modified by the decorator and make it return "Hello World!" (lines 5 and 6):
We could also make the function return some HTML:
Then, we run the Flask object at port 7070 (lines 9 and 10):

## Adding More Routes

Of course, there's nothing stopping us from having more routes. For example, let's add the following code:
For the sake of completeness, here's the entire code with the new code block:
Now, whenever we visit localhost:7070/about, we see "This is my first Flask website" in headings (notice that we added HTML tags to the output of the function).
# Main Page/test

Browse: computing | engineering | humanities | mathematics | science | social sciences | miscellaneous | more...
Wikibooks is a free library of educational textbooks that anyone can contribute to. Never used Wikibooks before? Read Using Wikibooks.
# Make/Examples
## LaTeX Makefile

This makefile seems to work well in CentOS.
# Lua in SpringRTS/Callins/UnitCmdDone
## UnitCmdDone
### Return values

unitID, unitDefID, unitTeam, cmdID, cmdTag
# Lua in SpringRTS/Callins/UnitCommand
## UnitCommand
### Return values

unitID, unitDefID, unitTeam, cmdID, cmdOpts, cmdParams
# Lua in SpringRTS/Callins/UnitCreated
## UnitCreated
### Description

Runs when a unit instance is being made. In practise that can be a unit that just got spawned or a unit that started being built. In unsynced mode the callin gets invoked whenever an instance of your units is made. In synced mode it invokes for any unit in the game.

### Return values

integer unitID, integer unitDefID, integer unitTeamID, integer builderID

### Related

UnitDestroyed
# Lua in SpringRTS/Callins/UnitDestroyed
## UnitDestroyed
### Description

Runs when a unit gets destroyed. That can mean that either the unit got killed by an enemy or that it self destructed itself. In unsynced mode the callin gets invoked whenever one of your units gets destroyed. In synced mode it invokes for any unit in the game.

### Return values

integer unitID, integer unitDefID, integer unitTeam

### Related

UnitCreated
# Lua in SpringRTS/Callins/UnitEnteredWater
## UnitEnteredWater
### Return values

unitID, unitDefID, teamID
# Lua in SpringRTS/Callins/UnitDamaged
## UnitDamaged
### Return values

unitID, unitDefID, unitTeam, damage, paralyzer, weaponID, attackerID, attackerDefID, attackerTeam
# Lua in SpringRTS/Callins/UnitEnteredAir
## UnitEnteredAir
### Return values

unitID, unitDefID, teamID
# Lua in SpringRTS/Callins/UnitEnteredLos
## UnitEnteredLos
### Return values

unitID, teamID
# Lua in SpringRTS/Callins/UnitEnteredRadar
## UnitEnteredRadar
### Return values

unitID, unitTeam
# Lua in SpringRTS/Callins/UnitDecloaked
## UnitDecloaked
### Description

Runs when a unit is being decloaked

### Return values

unitID, unitDefID, teamID

### Related

UnitCloaked
# Metasploit/Support

* Metasploit FAQs

# Support
## Framework Mailing List
### Subscribe

To subscribe, send a blank email to framework-subscribe[at]spool.metasploit.com.
The server will reply and ask you to confirm the request. You must reply to the email to confirm your subscription. ahly_com7@yahoo.com

### Unsubscribe

To unsubscribe, send a blank email to framework-unsubscribe[at]spool.metasploit.com.
The server will reply and ask you to confirm the request. You must reply to the email to confirm your removal from the list.
Sending the word "unsubscribe" to the framework[at]metasploit.com list just annoys the other 1400 people on the list ;-)

## Framework Hackers Mailing List

The goal of the list is to create a place for detailed discussion about exploit development and the framework code. If you write your own modules or hack on the code in any shape, please subscribe.

### Subscribe

To subscribe, send a blank email to framework-hackers-subscribe[at]spool.metasploit.com.
The server will reply and ask you to confirm the request. You must reply to the email to confirm your subscription.

### Unsubscribe

To unsubscribe, send a blank email to framework-hackers-unsubscribe[at]spool.metasploit.com.
The server will reply and ask you to confirm the request. You must reply to the email to confirm your removal from the list.
Sending the word "unsubscribe" to the framework[at]metasploit.com list just annoys the other 1400 people on the list ;-)

## Metasploit official blog

Lots of tutorials and how-tos
# Metasploit/Tips and Tricks

* Metasploit FAQs
Tips and Tricks for the Metasploit Framework

## Abstract

Whether writing exploits or using the Metasploit Framework, there are numerous tricks available to the end user.

## Writing Exploits

* Unsure about what characters may be filtered? Use the Rex::text.charset_exclude( badchars ) function:
Set your debugger to break at the jump location and review the characters in your dump. (Add screenshot)
* Evasion techniques are best applied after verification of exploitability.
* Some payloads may not work correctly in every exploit, try multiple payloads after you have execution flow.

## Using Exploit-less Handlers (Executable Payloads)

At some point during your use with Metasploit you'll come into the need to run a payload without an exploit. This is possible with the use of the multi/handler exploit module.
Step 1. Generate your payload executable:
Step 2. Start your listener:
Step 3. Run the executable and interact
This document contains several syntax examples for creating and using stand alone payloads. It also contains discussion about avoiding antivirus detection. http://www.giac.org/certified_professionals/practicals/GCIH/01072.php

## LM Half-Challenge

Originally blogged here - Using the Free Rainbow Tables HALFLMCHALL Tables and a modified Metasploit 2.7 smb_sniffer exploit module, obtaining and cracking LANMAN Challenges has never been easier.
Step 1. Use Metasploit 2.7 (for now) and the updated smb_sniffer.pm exploit module. This does not work on a Windows platform.
Step 2. Unpack Msf2.7 and place smb_sniffer.pm under the exploits/ directory, replacing the older version.
Step 3. Set up your Metasploit and run it as root
Step 4. Have somebody connect to your server. It can be as simple as a "dir \\serverip\share" or "<img src=\\serverip\share\file.gif height=0 width=0>" tag on some HTML page. Windows will attempt to make the connection and send the logged in user credentials to your waiting server.
Step 5. Take your new pwtest.txt file and copy it over to a Cain & Able machine that has the HALFLMCHALL tables.
Step 6. Select the hash you want to crack, right click and select Cryptanalysis Attack->HALFLM Hashes + challenge->via RainbowTables, add the tables, and crack!
Caveats
* Only LANMAN hashes can be obtained this way. If the client denies LM then too bad.
* Only the first 7 characters are in the tables. You have to brute force the rest(or split the hash in 2 and add AAD3B435B51404EE at each end).
* The tables are 54 GB total. It will take some time to load and search.
# Metasploit/Frequently Asked Questions

* Metasploit FAQs

# Installation
## Errors
### no such file to load -- openssl (LoadError)

Q: When running Metasploit for the first time, I get the error: no such file to load -- openssl (LoadError)
* Example:
A: Metasploit requires the Ruby implementation of openssl - not the standard C implementation of openssl used by Apache etc. Install the relevant ruby-openssl library.
* Example (for Debian - check your OS or try using gem):

# Exploit Modules
## Errors
### Exploit failed: No encoders encoded the buffer successfully

Q: After setting all the required parameters for an exploit module and running exploit, I receive the following error: [-] Exploit failed: No encoders encoded the buffer successfully.
* Example:
A: The payloads available (show payloads) are determined by the memory 'Space' available for the exploit to use. In the above example, the payload space is: 'Space: 200'. However, the target application does not allow certain characters to be used (usually the null character 0x00 as this denotes the end of a string [character array]). In the example the payload cannot permit five characters: 'Avoid: 5 characters '
When you run the exploit, the payload generators will attempt to fit your desired payload into a space of 200 which excludes 5 specific characters. This is not always possible, and will result in the error: No encoders encoded the buffer successfully.
However, all is not lost. The Metasploit Framework includes the ability to support staged payloads. A staged payload is a significantly smaller payload which, instead of executing your desired action (such as reverse shell), will start a staging platform which can then add to that platform. So in our example, instead of a complete reverse shell, it will:
* Create the staging platform.
* Allocate enough memory to hold your desired payload.
* Obtain the rest of the payload from you.
* Execute the payload as a whole.
Generally, all the staged exploits are denoted by the '/' after the desired payload. Some examples are:
So now that we know it cannot fit an 'Inline' payload, we can use a stager instead:
# Metasploit/MethodAutofilter

* Metasploit FAQs
Metasploit provides functionality to automate exploitation via the autopwn command. When you write a module, there are certain requirements for it to be used within the autopwn routine.
* Use a universal return address. Or
* Set a DefaultTarget. Or
* Define a method called "autofilter" within your module:
The method must return true or false.
This method is responsible for determining the correct target when used for automated exploitation. In the future, this method will be able to query the database to look for target-specific information about the target. The autofilter method can set the TARGET datastore value along with any other common parameters. As long as the final return value is true, the module will be executed as part of autopwn.

## Autofilter examples

... will prevent your module from being executed in autopwn. Should MSF one day be able to determine the target host via other means, autopwn will determine the target automatically.
... is an example where the module contains its own detection mechanisim.
# Metasploit/EvasionOptions/HTTP::compression

HTTP compression insures that data transferred between web servers and client browsers uses minimum bandwidth. The most common compression methods are deflate and gzip which are negotiated by the browser and server before the data transfer begin. Browsers will send an accept encoding field specifying all the supported encoding schemes and the server will select any supported schemes to compress the data: Accept-Encoding: gzip, deflate Many IDS/IPS and firewall have static signatures for either normal HTTP request/response and/or HTTP data compressed with the most common compression schemes. Users can use more compression methods that are commonly supported by the browsers and servers but are not implemented within the IDS/IPS filters.
# Metasploit/VideoTutorials

http://www.vulnerabilityassessment.co.uk/meterpreterswf.html http://www.vulnerabilityassessment.co.uk/msfcliswf.html http://www.vulnerabilityassessment.co.uk/win32_execswf.html http://www.vulnerabilityassessment.co.uk/1stmetasploit.html http://www.vulnerabilityassessment.co.uk/win32_bin_stg_upexecswf.html
http://learnsecurityonline.com/vid/MSF3-met/MSF3-met.html http://learnsecurityonline.com/vid/MSF3-nc-reg-hack/MSF3-nc-reg-hack.html http://learnsecurityonline.com/vid/MSF3-VNC/MSF3-VNC.html http://learnsecurityonline.com/vid/MSF3_web/msfwebp1.html http://learnsecurityonline.com/vid/MSF3_web/msfwebp2.html
http://www.milw0rm.com/video/watch.php?id=67 http://www.milw0rm.com/video/watch.php?id=50 http://www.milw0rm.com/video/watch.php?id=5
http://www.determina.com/security.research/flash/ani.html
http://www.ethicalhacker.net/content/view/227/24/
http://www.ethicalhacker.net/content/view/238/24/
http://www.ethicalhacker.net/content/view/137/24/
http://www.ethicalhacker.net/content/view/136/24/
http://www.vimeo.com/videos/search:metasploit
http://www.computerdefense.org/wp-content/uploads/manual/msf25.avi
http://www.computerdefense.org/wp-content/uploads/manual/msf30.avi
http://www.irongeek.com/i.php?page=videos/metasploit1
http://www.irongeek.com/i.php?page=videos/metasploitwmf
Ref: http://www.darknet.org.uk/2007/07/learn-to-use-metasploit-tutorials-docs-videos/
http://guides.intern0t.net/msf1.php
http://guides.intern0t.net/msf2.php
# Metasploit/StyleGuide
### The Metasploit Book Writing Guide

When using screen shots please keep them "clean" and non-promotional. Tech writers tend to insert screen shots of their company's web site or their research groups banner. Try to keep all screen shots boring and generic for the sake of consistency.
When using screen shots try to use light backgrounds with dark text for all screen shots. It's not quite as leet looking but it uses much less ink if someone decides to print out the content.
When using any graphics keep in mind that light colors will not print well. Avoid using yellow on a white background and try not to color-code screen elements when a description or other icon will suffice. If you talk about how the green button does one thing and the rest does another the reader will be very confused when they print in black and white. Some readers are color blind and would not understand these references either.
A screen shot is not a replacement for a thorough explanation but there is no need to describe every element of a screen shot.
Write as if you are working with the reader in real-life. Use "we" to represent yourself and the reader. For example "Now that the buffer has been created we can use this method to insert our return address". Do not use "we" to represent yourself and the co-authors.
Always use present tense and active voice. For example write "Use the ENCODER option to specify a particular payload encoder" do not write "The ENCODER option is used to specify a particular payload encoder"
Avoid slang and curse-words. Some users aren't as cool as you and may not understand. Worse they may be offended.
Avoid long words and sentences. If you are using more than 3 commas in a sentence think about a shorter way to represent the same idea. Try to keep paragraphs short. Over two sentences but no more than half a page long each.
# MATLAB Programming/Psychtoolbox/Screen Commands/PixelSize

Usage:
Get/set screen depth, gray/color mode, and number of video pages. (We don't yet provide a way of changing the page.)
# MATLAB Programming/Psychtoolbox/Screen Commands/OpenOffscreenWindow

Usage:
Open an offscreen window (offscreen surface in DirectDraw). This is simply an area in memory that is treated as a window. Offscreen windows are very useful for creating images for subsequent display, because copying between windows is very fast. You may specify a screen (a screenNumber>=0) or no screen (screenNumber=-1). If you do designate a screen then the offscreen window is attached to the DirectDraw object associated with that screen. You may specify no screen (screenNumber=-1), but any real screen must already have an open SCREEN window when you call OpenOffscreenWindow. color is the clut index (scalar or [r g b] triplet) that you want to poke into each pixel; default is white. rect specifies the size of the offscreen window and what part of the screen the offscreen window is aligned with. If supplied, rect must contain at least one pixel. If a screenNumber is supplied then rect is in screen coordinates (origin at upper left), and defaults to the size of that screen. If a screenNumber of -1 is supplied then rect defaults to the size of the main screen. (In all cases, subsequent references to this new offscreen window will use its coordinates: origin at its upper left.) pixelSize sets the depth (in bits) of each pixel. If you specify a screen (screenNumber>=0) and a pixelSize>0 then they must be consistent. If you specify no screen (screenNumber=-1) then the default pixelSize' is the same as the main screen, but you can specify any legal depth: 8, 16, 24, 32. A pixelSize of 0 or is replaced by the default.
# MATLAB Programming/Psychtoolbox/Screen Commands/PixelSizes

Usage:
List all possible pixelSizes for this screen. The Windows Version returns only pixel sizes available at the current display size.
# MATLAB Programming/Psychtoolbox/Screen Commands/PutColorImage

PutColorImage is obsolete. Use PutImage instead.
# MATLAB Programming/Psychtoolbox/Screen Commands/GlobalRect

GlobalRect is not supported yet.
# MATLAB Programming/Psychtoolbox/Screen Commands/MoveWindow

MoveWindow is not supported yet.
# MATLAB Programming/Psychtoolbox/Screen Commands/OpenWindow

Usage:
Open an onscreen window. Specify a screen by a windowPtr or a screenNumber (0 is the main screen, with menu bar). color is the clut index (scalar or [r g b] triplet) that you want to poke into each pixel; default is white. If supplied, rect must contain at least one pixel. If a windowPtr is supplied then rect is in the window's coordinates (origin at upper left), and defaults to the whole window. If a screenNumber is supplied then rect is in screen coordinates (origin at upper left), and defaults to the whole screen. (In all cases, subsequent references to this new window will use its coordinates: origin at its upper left.) pixelSize sets the depth (in bits) of each pixel; default is to leave depth unchanged. Opening or closing a window takes about a second.
# MATLAB Programming/Psychtoolbox/Screen Commands/IsOffscreen

Usage:
Find out whether window is offscreen. Responses: 1=yes; 0=no.
# MATLAB Programming/Psychtoolbox/Screen Commands/MATLABToFront

Usage:
Bring forward n-th window in MATLAB Window menu. If not specified, n defaults to 0 (the command window).
# MATLAB Programming/Psychtoolbox/Screen Commands/Preference

Usage:
Get/set various preferences. The first four are general, the rest are related to WaitBlanking or SetClut and are screen-specific. boolean values are 1 (nonzero) for Yes and 0 for No. Preferences are volatile: They're set by SCREEN when you first use each screen, and they're flushed by closing the last SCREEN window (e.g. by Psychtoolbox:Screen Commands:Close, Psychtoolbox:Screen Commands:CloseAll, or flushing SCREEN.mex by typing clear screen). So do any preference setting after calling 'OpenWindow'.
Warning: These settings allow you to access all the internal parameters that determine SCREEN's behavior. As a result the set of parameters is ever-changing, as SCREEN evolves to deal with an ever-changing environment (e.g. video drivers that don't wait for blanking, and Rush's high priority).
Feel free to play with these expert controls, but, if you do, realize that you may have to tweak your 'Preference' calls with each new release of the PsychToolbox.
* SetClutDriverWaitsForBlanking reports whether the monitor's video driver waits for blanking. Usually read-only, you can also set/clear this on the PowerMac 7300/7500/7600/8500/8600 built-in driver.
* SetClutQuickly specifies your preference for whether to use a custom SetEntriesQuickly.c driver (if available for this device) in place of the standard video driver. The SetEntriesQuickly drivers don't wait for blanking.
* SetClutCallsWaitBlanking determines whether WaitBlanking should be called after each call to SetClut.
* SetClutSimulatesBlankingInterrupts sets/gets the number of blanking interrupts to simulate after each SetClut, to make up for interrupts missed during the SetClut call.
* WaitBlankingUsesInterrupt specifies a preference for whether WaitBlanking should use SetClut (original driver) or the screen's blanking interrupt to wait for blanking. See 'WaitBlanking'.
* MaxPriorityForBlankingInterrupt specifies the maximum priority at which the hardware blanking interrupt still works. Normally this is 1, but it's reduced to 0.5 (on non-PCI Macs) if necessary for timing the 3-ms interval during which spurious VBL interrupts are ignored. Your programs can override this setting, but your computer is likely to hang unless you really know what you're doing.
# Mac OS X Tiger/System Preferences/CDs & DVDs

This simple pane lets you decide what to have your Mac do when you insert a certain kind of disc. You can have your Mac ask you what to do every time, run an application, run an AppleScript, or ignore the disc entirely.
# Mac OS X Tiger/System Preferences/Appearance

The Appearance pane of System Preferences lets you adjust the little bits and pieces of the Mac interface. While the changes can be seen as minor, they can make a big impact on your Mac's feel.
The most important controls are the two pop-up menus at the top.
The first is "Appearance", which controls the color of accents in Mac OS X. The default setting, "Blue", is a bit of a misnomer. Not every accent in Mac OS X is blue (for instance, the buttons in window title bars are red, yellow, and green). It would be much better to call this setting "Color". When this pop-up is set to "Graphite", the life is sucked out of the Mac interface. Buttons, scrollbars, the Apple menu, etc. all turn a shade of grey.
This is a very niche option. The colored accents in Mac OS X are very appealing, and almost all users prefer to leave them turned on. Graphite is mainly used among graphic designers, who find extra color distracting and unprofessional. When used together with a neutral Desktop Picture, Graphite gives your Mac a very serious air.
The second pop-up menu lets you choose a highlight color, used when selecting text, windows in Exposé, files on the desktop, etc.
Other options let you customize how scroll bars work, how many items appear in  > Recent Items, and how fonts are smoothed. These options are pretty self-explanatory.