Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <netinet/tcp.h> | |
| #include <sys/socket.h> | |
| #include <sys/types.h> | |
| #include <netinet/in.h> |
| // Asynchronous Client Socket Example | |
| // http://msdn.microsoft.com/en-us/library/bew39x2a.aspx | |
| using System; | |
| using System.Net; | |
| using System.Net.Sockets; | |
| using System.Threading; | |
| using System.Text; | |
| // State object for receiving data from remote device. |
| <html> | |
| <head> | |
| <title>xss example</title> | |
| <script> | |
| //my awesome js | |
| function a(){alert(1)} | |
| </script> | |
| </head> | |
| <body> |
| # | |
| # NB : this is not secure | |
| # from http://code.activestate.com/recipes/266586-simple-xor-keyword-encryption/ | |
| # added base64 encoding for simple querystring :) | |
| # | |
| def xor_crypt_string(data, key='awesomepassword', encode=False, decode=False): | |
| from itertools import izip, cycle | |
| import base64 | |
| if decode: |
| #!/usr/bin/env ruby | |
| # | |
| # Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156) | |
| # | |
| # ## Advisory | |
| # | |
| # https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion | |
| # | |
| # ## Caveats | |
| # |
| function Invoke-Template { | |
| param( | |
| [string]$Path, | |
| [Scriptblock]$ScriptBlock | |
| ) | |
| function Get-Template { | |
| param($TemplateFileName) | |
| $content = [IO.File]::ReadAllText( | |
| (Join-Path $Path $TemplateFileName) ) | |
| Invoke-Expression "@`"`r`n$content`r`n`"@" |
| package main | |
| import ( | |
| "log" | |
| "net/http" | |
| ) | |
| func redirect(w http.ResponseWriter, r *http.Request) { | |
| http.Redirect(w, r, "http://www.google.com", 301) |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| function toHex(s) { | |
| // utf8 to latin1 | |
| var s = unescape(encodeURIComponent(s)) | |
| var h = '' | |
| for (var i = 0; i < s.length; i++) { | |
| h += s.charCodeAt(i).toString(16) | |
| } | |
| return h | |
| } |
Most of programs will not accept an email using just @localhost as domain.
So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:
127.0.0.1 localhost.com