- Nmap. The script requires version 6.25 or newer. The latest version, 6.47, already includes the next 3 dependencies, so you can skip directly to the Scanning section below.
- An easy way to get the latest Nmap release is to use Kali Linux.
- Binary installers are available for Windows.
- RPM installer available for Linux, or install from source.
- .dmg installer available for Mac OS X.
- tls.lua. The script requires this Lua library for TLS handshaking.
- ssl-heartbleed.nse. This is the script itself.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate curl; | |
extern crate futures; | |
extern crate time; | |
extern crate tokio_core; | |
extern crate tokio_curl; | |
extern crate tokio_timer; | |
use curl::easy::Easy; | |
use futures::{Future, Stream}; | |
use futures::stream::futures_unordered; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate serde; | |
#[macro_use] | |
extern crate serde_derive; | |
extern crate serde_json; | |
use std::collections::HashMap; | |
use serde::{Serialize, Serializer}; | |
fn main() { | |
let mut map: HashMap<String, String> = HashMap::new(); |
Generating a self-signed certificate is a common taks and the command to generate one with openssl
is well known and well documented. Generating a certificate that includes subjectAltName is not so straght forward however. The following example demonstrates how to generate a SAN certificate without making a permanent change to the openssl configuration.
$ export SAN="DNS:www.domain.localdomain,DNS:domain.localdomain"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_use] extern crate nom; | |
fn to_s(i: Vec<u8>) -> String { | |
String::from_utf8_lossy(&i).into_owned() | |
} | |
named!( single_quoted_shell_arg(&[u8]) -> String | |
, map!( delimited!( char!('\'') | |
, escaped_transform!( take_until!("\\'") | |
, "\\" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# If file exists (likely) copy fragment below into existing script: | |
# If stdin is a terminal | |
if [ -t 0 ]; then | |
# Set GPG_TTY so gpg-agent knows where to prompt. See gpg-agent(1) | |
export GPG_TTY="$(tty)" | |
# Set PINENTRY_USER_DATA so pinentry-auto knows to present a text UI. | |
export PINENTRY_USER_DATA=USE_TTY=1 |