Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env rdmd
- // ----------------------------------------------------------------------------
- // "THE BEER-WARE LICENSE" (Revision 43):
- // <aaronryool@gmail.com> wrote this file. As long as you retain this notice you
- // can do whatever you want with this stuff. If we meet some day, and you think
- // this stuff is worth it, you can buy me a beer in return Aaron R. Yool
- // ----------------------------------------------------------------------------
- import std.stdio;
- void main()
- {
- /+
- // in C:
- ((void(*)())
- "\x48\x31\xc0\xb0\x3b\xeb\x1a\x41\x5a\x48\x31\xd2\x52"
- "\x41\x52\x48\x89\xe6\x4c\x89\xd7\x0f\x05\x48\x31\xc0"
- "\xb0\x3c\x48\x31\xff\x0f\x05\xe8\xe1\xff\xff\xff\x2f"
- "\x62\x69\x6e\x2f\x62\x61\x73\x68")();
- +/
- // in D:
- (cast (void function()) to!(void*)(cast (char*)
- "\x48\x31\xc0\xb0\x3b\xeb\x1a\x41\x5a\x48\x31\xd2\x52"
- "\x41\x52\x48\x89\xe6\x4c\x89\xd7\x0f\x05\x48\x31\xc0"
- "\xb0\x3c\x48\x31\xff\x0f\x05\xe8\xe1\xff\xff\xff\x2f"
- "\x62\x69\x6e\x2f\x62\x61\x73\x68"))();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement