Skip to content

Instantly share code, notes, and snippets.

View alecnunn's full-sized avatar
🏳️‍🌈

Alec alecnunn

🏳️‍🌈
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta content="" name="description">
<meta content="Alec Nunn" name="author">
<link href="" rel="shortcut icon">
<title>DB Results</title><!-- Bootstrap core CSS -->
@alecnunn
alecnunn / genData.py
Last active December 31, 2015 18:29
Added automatic insertion into the database.
from random import randrange
from random import choice
import _mysql
db = _mysql.connect(host="localhost", user="root", passwd="P@ssw0rd", db="pbnjout")
i = 1
while True:
os = ["Unix", "Linux", "Windows Server"]
status = ["success", "important"]
SELECT
machines.mid as `ID`, machines.ip as `IP`,
GROUP_CONCAT(services.port) as `Ports`
FROM
machines, services
WHERE
machines.mid = services.mid
GROUP BY
machines.mid;
-- phpMyAdmin SQL Dump
-- version 3.4.10.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 06, 2013 at 11:08 AM
-- Server version: 5.5.34
-- PHP Version: 5.3.10-1ubuntu3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
#!/usr/bin/perl
#
# Copyright (C) 2005-2006 Joshua D. Abraham ([email protected])
#
# This program is released under the terms of the GNU General Public License
# (GPL), which is distributed with this software in the file "COPYING".
# The GPL specifies the terms under which users may copy and use this software.
#
# PBNJ 2.0
# (P)orts (B)anners N' (J)unk
<?php
if(isset($_GET["page"])) {
$page = $_GET["page"];
} else {
$page=1;
}
$connection = mysql_connect("localhost", "root", "P@ssw0rd");
$start_from = ($page-1) * 20;
$sql = "SELECT * FROM results LIMIT $start_from, 20";
$rs_result = mysql_query($sql, $connection);
=SUM(B2:INDIRECT(ADDRESS(ROW()-1, 1)))
description = [[
Detects whether a server is vulnerable to the OpenSSL Heartbleed bug (CVE-2014-0160).
The code is based on the Python script ssltest.py authored by Jared Stafford ([email protected])
]]
---
-- @usage
-- nmap -p 443 --script ssl-heartbleed <target>
--
-- @output
#A golfed python 'accent'. Fully backwards compatible with python.
#NOT SUITED FOR DAY-TO-DAY PROGRAMMING!
#If you DO use it for a production (non-challenge/codegolf) program, I'm not
#responsible for anything bad that happens to you, your computer,
#your spare time, your code maintainability, any kittens that god might kill,
#or the tears of blood you will weep.
import sys
from math import *
import random, struct
A = 1024
C = random.randrange(100,25000)
def c(f):
with open(f, 'rb') as f:
b = 0
d = 0
while True:
b = f.read(1)
d += 1