This file contains hidden or 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
ebin/*.beam |
This file contains hidden or 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
*.beam |
This file contains hidden or 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
-module(leb128). | |
-export([encode/2, decode/2]). | |
encode(Value, signed) -> | |
encode_ranged(Value, 0, 16#40); | |
encode(Value, unsigned) when Value >= 0 -> | |
encode_ranged(Value, 0, 16#80). |
This file contains hidden or 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
-module(gs_up). | |
-export([init/1, handle_call/3, terminate/2]). | |
-record(state, { | |
own_fields, | |
field1, | |
field2, | |
field3 | |
}). |
This file contains hidden or 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
-module(bubble). | |
-export([sort/1, sort/2]). | |
sort(List) -> | |
sort(fun erlang:'=<'/2, List, []). | |
sort(Compare, List) -> | |
sort(Compare, List, []). | |
This file contains hidden or 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
-module(no_deep_case). | |
-export([deep/1, no_deep/1]). | |
deep(X) -> | |
case x:do_something(X) of | |
{ok, Result1} -> | |
case x:do_something_else(X, Result1) of | |
{ok, Result2} -> | |
case x:final_action(Result2) of |
This file contains hidden or 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
#!/usr/bin/env escript | |
% This escript sends malformed SSLv3 client_hello to specified server | |
% and prints negotiated version and cipher suite | |
% | |
% Usage example: ./badhello.escript localhost 9998 | |
-module(badhello). | |
-include_lib("ssl/src/ssl_handshake.hrl"). | |
client_hello() -> |
This file contains hidden or 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
#!/usr/bin/env escript | |
%% -*- mode: erlang -*- | |
%% vim: sw=2 ts=2 | |
% This escript sends garbage SSLv3 record between client_hello and any other record | |
% to specified server causing acceptor to crash with function_clause | |
% | |
% Usage example: ./badhandshake.escript localhost 9998 | |
-module(badhandshake). | |
-include_lib("ssl/src/ssl_handshake.hrl"). |
This file contains hidden or 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
#!/usr/bin/env escript | |
%% -*- mode: erlang -*- | |
%% vim: sw=2 ts=2 | |
% This escript sends valid TLSv1.2 client_hello to specified server | |
% crashing the OTP 17.0 acceptor due to bad hashsign default value | |
% | |
% Usage example: ./tlsv12_no_hs.escript localhost 9998 | |
-module(tlsv12_no_hs). | |
-include_lib("ssl/src/ssl_handshake.hrl"). |
This file contains hidden or 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
-module(bininspector). | |
% For inspecting binary usage by all accessible ETS tables, run | |
% [{T, (catch ets:foldl(fun bininspector:collect/2, {0, 0}, T))} || T <- ets:all()]. | |
-export([collect/2]). | |
collect(B, {S, R}) when is_bitstring(B) -> | |
{S + byte_size(B), R + binary:referenced_byte_size(B)}; | |
collect(T, Acc) when is_tuple(T) -> |
OlderNewer