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
$ r2 -a x86.bea ./a.out | |
Cannot use 'x86.bea' anal plugin. | |
Cannot use 'x86.bea' anal plugin. | |
-- Change the registers of the child process in this way: '!set eax 0x333' | |
[0x00400490]> pD 461 @ sym.aes_test | |
0x004005ae sym.aes_test: | |
0x004005ae 53 push rbx | |
0x004005af ba60a04000 mov edx, sym.edst | |
0x004005b4 be60604000 mov esi, sym.src2 | |
0x004005b9 bf60204000 mov edi, sym.src1 |
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
#!/usr/bin/perl -w | |
use Socket; | |
use IO::Handle; | |
$port=3389; | |
$host='127.0.0.1'; | |
$packhost=inet_aton($host); | |
$address=sockaddr_in($port,$packhost); | |
socket(SERVER, AF_INET, SOCK_STREAM, getprotobyname('tcp')); |
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
-- probably broken | |
-- no polymorphic kind signatures, which may make things cleaner | |
{-# OPTIONS_GHC -Wall #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE TypeOperators#-} |
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
/* Static assertions. | |
** GCC 4.6 and Clang 3.0 has support for _Static_assert under C1x | |
** so we use that here if it's available. | |
*/ | |
#if (defined(COMPILER_GNUC) && \ | |
(4 < __GNUC__ || (__GNUC__ == 4 && 6 <= __GNUC_MINOR__))) \ | |
|| __has_extension(c_static_assert) | |
# define STATIC_ASSERT(cond,m) _Static_assert(cond, m) | |
#else | |
/* Not GCC 4.6 || Clang 3.0 */ |
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
-- Inspired by the writings of Edward Kmett, Edward Yang and Gabriel Gonzalez | |
-- concerning free monads and the codensity transformation. | |
-- | |
-- http://comonad.com/reader/2011/free-monads-for-less/ | |
-- http://blog.ezyang.com/2012/01/problem-set-the-codensity-transformation/ | |
-- http://www.haskellforall.com/2012/06/you-could-have-invented-free-monads.html | |
-- | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FlexibleInstances #-} |
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
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
module Teletype | |
( main -- :: IO () | |
) where | |
import Prelude hiding (putStrLn, getLine) | |
import qualified Prelude as P (putStrLn, getLine) | |
import qualified System.Exit as Exit (exitSuccess) | |
import System.Environment (getArgs) |
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
module Test1 where | |
{- numbers -} | |
data Nat : Set where | |
zero : Nat | |
suc : (n : Nat) -> Nat | |
{-# BUILTIN NATURAL Nat #-} | |
{-# BUILTIN ZERO zero #-} | |
{-# BUILTIN SUC suc #-} |
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
diff -urN -X diff.txt cl75/config/m.h OchaCaml/config/m.h | |
--- cl75/config/m.h 1999-06-12 06:02:22.000000000 +0900 | |
+++ OchaCaml/config/m.h 2011-08-26 16:59:46.000000000 +0900 | |
@@ -1,3 +1,3 @@ | |
#define CAML_SIXTYFOUR | |
#undef CAML_BIG_ENDIAN | |
-#define CAML_ALIGNMENT | |
+#undef CAML_ALIGNMENT | |
diff -urN -X diff.txt cl75/config/s.h OchaCaml/config/s.h | |
--- cl75/config/s.h 1999-06-12 06:02:44.000000000 +0900 |
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
{-# LANGUAGE ViewPatterns #-} | |
module ADDual where | |
{-- | |
Dual numbers are an extension of the real numbers, like Complex | |
numbers, only with the identity that d^2 = 0. They are represented | |
similarly to complex numbers as well, i.e. a+b*d where 'a' and 'b' are | |
real numbers. |
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
/home/a/code/qemu/i386-dis.c:5748:19: error: adding 'char' to a string does not append to the string [-Werror,-Wstring-plus-int] | |
oappend ("%es:" + intel_syntax); | |
~~~~~~~^~~~~~~~~~~~~~ | |
/home/a/code/qemu/i386-dis.c:5748:19: note: use array indexing to silence this warning | |
oappend ("%es:" + intel_syntax); | |
^ | |
& [ ] |