Skip to content

Instantly share code, notes, and snippets.

View buraksarica's full-sized avatar
🏠

Burak SARICA buraksarica

🏠
View GitHub Profile
@buraksarica
buraksarica / TestMS15_034
Created April 16, 2015 11:45
MS15-034 Test
// Sends CVE-2015-1635 / MS15-034 Test Request and checks for vulnerability
// based on https://gist.github.com/Zagrophyte/0fa7a8e2e507fac2b59d
static string TestMS15_034(String host, string staticFile, int port = 80)
{
TcpClient tc = new TcpClient();
string result = "";
try
{
tc.Connect(host, port);
@buraksarica
buraksarica / gist:4714151
Created February 5, 2013 12:24
Objective-C fuzzy date diff "x hours ago" etc.
-(NSString *)dateDiff:(NSString *)origDate {
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setFormatterBehavior:NSDateFormatterBehavior10_4];
[df setDateFormat:@"EEE, dd MMM yy HH:mm:ss VVVV"];
NSDate *convertedDate = [df dateFromString:origDate];
[df release];
NSDate *todayDate = [NSDate date];
double ti = [convertedDate timeIntervalSinceDate:todayDate];
ti = ti * -1;
if(ti < 1) {
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace YGSSifreIhtimal
{
class Program
{
const int soruSayisi = 45;