Xathrya Sabertooth |
- Programming Problem Set: 99 Problems Chapter 3
- Programming Problem Set: 99 Problems Chapter 2
- The Architecture of PlayStation 1
- Assembly Primer for Hackers – Video Tutorial
- Nmap Video Tutorials and Trainings
Programming Problem Set: 99 Problems Chapter 3 Posted: 20 Jul 2013 03:10 AM PDT Ninety-nine Problems is generalized version to famous P-99: Ninety-Nine Prolog Problems collection used for teaching programming. The problems initially set for prolog but later many solutions come from various programming language. The purpose of this problem is to give us opportunity to practice our skills in logic programming. The goal is to find the most elegant solution of the given problem. Efficiency is important, but logical clarity is even more crucial. The problem set are divided into seven categories / chapters: Lists, Arithmetic, Logic and Codes, Binary Trees, Multiway Trees, Graphs, and Miscellaneous. In this chapter you will be only given a problem set. The solution might come however it would be on different page. This chapter will cover about Logic and Codes. The problems in this chapter served as continuation of previous problems, therefore the numbering will start from the last problem. 40. Truth tables for logical expression. Define and/2, or/2, nand/2, nor/2, xor/2, impl/2 and equ/2 (for logical equivalence) which succeed or fail according to the result of their respective operations; e.g. and(A,B) will succeed, if and only if both A and B succeed. Now, write a predicate table/3 which prints the truth table of a given logical expression in two variables. Example: table_p( A, B, xor(A,B) ) -> true true false true false true false true true false false false
41. Truth tables for logical expressions (2) Continue problem 40 by defining and/2, or/2, etc as being operators. This allows to write the logical expression in the more natural way, as in the example: A and (A or not B). Define operator precedence as usual; i.e. as in C. Example: table2_p( A, B, A and (A or not B) ) -> true true true true false true false true false false false false
42. Truth tables for logical expression (3). Generalize problem 41 in such a way that the logical expression may contain any number of logical variables. Define table/2 in a way that table(List,Expr) prints the truth table for the expression Expr, which contains the logical variables enumerated in List. The index is started from 1. Example: table3_p( [A,B,C], A and (B or C) equ A and B or A and C) -> <tt>true true true true true true false true true false true true true fail false true false true true true false true false true false false true true false false false true</tt>
43. Gray code. An n-bit Gray code is a sequence of n-bit strings constructed according to certain rules. For example, n = 1: C(1) = ['0','1']. n = 2: C(2) = ['00','01','11','10']. n = 3: C(3) = ['000','001','011','010','110','111','101','100']. Find out the construction rules and write a predicate with the following specification: % gray(N,C) :- C is the N-bit Gray code Can you apply the method of "result caching" in order to make the predicate more efficient, when it is to be used repeatedly?
44. Huffman code. First of all, study a good book on discrete mathematics or algorithms for a detailed description of Huffman codes, or consult wikipedia We suppose a set of symbols with their frequencies, given as a list of fr(S,F) terms. Example: [fr(a,45),fr(b,13),fr(c,12),fr(d,16),fr(e,9),fr(f,5)]. Our objective is to construct a list hc(S,C) terms, where C is the Huffman code word for the symbol S. In our example, the result could be Hs = [hc(a,'0'), hc(b,'101'), hc(c,'100'), hc(d,'111'), hc(e,'1101'), hc(f,'1100')] [hc(a,'01'),...etc.]. Example: huffman_p(Fs,Hs) -> Hs is the Huffman code table for the frequency table Fs Solution:
|
Programming Problem Set: 99 Problems Chapter 2 Posted: 20 Jul 2013 02:54 AM PDT Ninety-nine Problems is generalized version to famous P-99: Ninety-Nine Prolog Problems collection used for teaching programming. The problems initially set for prolog but later many solutions come from various programming language. The purpose of this problem is to give us opportunity to practice our skills in logic programming. The goal is to find the most elegant solution of the given problem. Efficiency is important, but logical clarity is even more crucial. The problem set are divided into seven categories / chapters: Lists, Arithmetic, Logic and Codes, Binary Trees, Multiway Trees, Graphs, and Miscellaneous. In this chapter you will be only given a problem set. The solution might come however it would be on different page. This chapter will cover about Arithmetic. A list is either empty or it is composed of a first element (head) and a tail, which is a list itself. As a continuation from previous chapter, the problem will be started from last previous number 29. Determine whether a given integer number is prime. Example: is_prime_p( 7 ) -> Yes 30. Determine the prime factors of a given positive integer. Construct a list containing the prime factors in ascending order Example: prime_factor_p( 315 ) -> [ 3, 3, 5, 7 ] 31. Determine the prime factors of a given positive integer (2) Construct a list containing the prime factors and their multiplicity. Example: prime_factor2_p( 315 ) -> [ [3,2], [5,1], [7,1] ] Hint: The solution of problem 10 may be helpful. 32. A list of prime number Given a range of integers by its lower and upper limit, construct a list of all prime numbers in that range. Example: prime_list_p( 3, 15 ) -> [3, 5, 7, 11, 13 ] 33. Goldbach's conjecture Goldbach's conjecture says that every positive even number greater than 2 is the sum of two prime numbers. Example: 28 = 5 + 23. It is one of the most famous facts in number theory that has not been proved to be correct in the general case. It has been numerically confirmed up to very large numbers. Find the two prime numbers that sum up to a given even integer Example: goldbach_p( 28 ) -> [ 5, 23]
34. A list of Goldbach compositions Given a range of integers by its lower and upper limit, print a list of all even numbers and their Goldbach composition Example: goldbach_list_p( 9, 20 ) 10 = 3 + 7 12 = 5 + 7 14 = 3 + 11 16 = 3 + 13 18 = 5 + 13 20 = 3 + 17 In most case, if an even number is written as the sum of two prime numbers, one of them is very small. Very rarely, the primes are both bigger than say 50. Try to find out how many such cases there are in the range 2..3000. 35. Determine the greatest common divisor of two positive integer numbers Use Euclid's algorithm Example: gcd_p( 36, 63 ) -> 9 36. Determine whether two positive integer numbers are coprime Two numbers are coprime if their greates common divisor equals 1 Example: coprime_p( 35, 64 ) -> Yes 37. Calculate Euler's totient function phi(m) Euler's so-called totient phi(m) is defined as the number of pisitive integers r (1 <= r < m) that are coprime to m. If m = 10 then r = 1, 3, 7, 9; thus phi(m) = 4. Note the special case phi(1) = 1 Example: phi_p( 10 ) -> 4 38. Calculate Euler's totient function phi(m) (2) See the previous problem for definition of Euler's totient function. If the list of the prime factors of a number m is known in the form of problem 32 then the function phi(m) can be efficiently calculated as follows: Let [[p1, m1], [p2, m2], [p3, m3], ...] be the list of prime factors (and their multiplicities) of a given number m. Then phi(m) can be calculated with following formula: phi(m) = (p1-1)* p1^(m1-1) *(p2-1)* p2^(m2-1)*(p3-1)* p3^(m3-1) Note that a^b stands for the b'th power of a. 39. Compare the two methods of calculating Euler's totient function. Use the solution of problem 37 and 38 to compare algorithm. Take the number of logical inferences as a measure for efficiency. Try to calculate phi(10090) as an example Solution:
|
The Architecture of PlayStation 1 Posted: 20 Jul 2013 02:20 AM PDT PlayStation, or PlayStation 1 (abbreviate as PS1), is the first generation of home video game console made by Sony Coputer Entertainment. This article will discuss about PlayStation architecture and some important aspects. General SpecificationPlayStation features ability to read and play audio CDs or Video CDs. The CD player has the ability to shuffle the playback order, play the songs in a programmed order, and repeat one song or the entire disk. PS1 doesn’t have internal storage in which it use external memory card to record data. Memory card is managed by Memory Card Manager which can be accessed by starting the console without inserting a game or keeping the CD tray open. PlayStation 1 support two slot for wired controller and two slot for memory card. The Central Processing UnitSony PlayStation employ MIPS R3000A compatible 32-bit RISC chip running at 33.8688MHz. The feature of the chip:
Geometry transformation engine employed by the CPU give additional vector math instructions used for 3D graphics. The features:
Inside the CPU also resides MDEC which responsible for decompressing images and video. It reads three RLE (Run Length Encoding) encoded 16×16 macroblocks, run IDCT and assemble a single 16×16 RGB macroblock. The output data may be transferred directly to GPU via DMA (Direct Memory Access). The features:
Graphics Processing UnitThe GPU handles 2D graphics processing separate from the main 3D engine on CPU. It features:
Sound Processing UnitThe SPU supports ADPCM (Adaptive Differential Pulse-code Modulation) sources with up to 24 channels. The sampling rate of up to 44.1 kHz and having 512 kB of memory. CD ROMThe drive is a tray with XA Mode 2 Compliant. It use CD-DA (CD-Digital Audio) and use 128 kB buffer with maximum data throughput reach 300 kB/s ConnectivityPlayStation has AV Multi Out. As PlayStation has numerous variants during its production, the hardware configuration especially connectivity might vary. For SCPH-100x to SCPH-3xxx, PlayStation has RCA Composite video and Stereo out. It also has RFU DC Out. The older SCPH-1000 has S-Video out. |
Assembly Primer for Hackers – Video Tutorial Posted: 19 Jul 2013 08:35 PM PDT Programming in Assembly is not as easy as higher level language. The main factor is because you can’t find syntax such as if, while, etc. However one of our kind heart friend from SecurityTube has made us a very interesting video for learning Assembly. Here the list of video. Please bear in mind that I don’t made these and I have no claim over it. As stated in other page, this site and NEST is originally serve a purpose as personal documentation. These videos are actually good starter for anyone who want to dive deeper in computer field, especially who have interest in cracking, exploitation, etc. The tutorials consists of eleven modules. Module 1 – System OrganizationAssembly language is probably the most important thing one needs to master if he desires to enter the world of code exploitation, virus writing and reverse engineering. In this multi-part video series I will try to provide a simple primer to Assembly language which will help you get started. These videos are in no way meant to be exhaustive but rather will only act as a guide on how to begin. <br><br>In this first part, I explain the basics of computer organization, CPU registers – general purpose, segment and instruction pointer. Also covered is virtual memory organization, program memory organization, program stack and stack operations. Download: EmbedUpload | MirrorCreator Module 2 – Virtual Memory OrganizationIn this video we take an in-depth look at virtual memory organization concepts. The entire discussion is explained by taking a live example using the SimpleDemo.c code. We look at how one can use the /proc/PID/maps to peek into the layout of a program’s virtual memory and interpret useful things. Also, we show how the Address Space Layout Randomization (ASLR) works in the latest 2.6 kernels and why this is significant from a security point of view. We also show how this can be disabled at runtime if the need be. This video is very important from an code exploitation perspective as it teaches us how to check for the presence of ASLR on a given system. Download: EmbedUpload | MirrorCreator Module 3 – Gdb UsageGDB (GNU Debugger) is probably one of the most important tools one needs to be familiar with in order to be a good assembly language programmer. In this video we go through a quick primer on how to use GDB to disassemble code, set breakpoints, trace through code, examine CPU registers and memory locations, examine the program stack and many other important use cases which will help us in later videos when we actually start coding in Assembly and want to debug our code. Download: EmbedUpload | MirrorCreator File for this Module: SimpleDemo.c Module 4 – Hello WorldIn this video we will look at the structure of assembly language programs – .data, .bss, .text segments, how to pass arguments to linux system calls in assembly, using GAS and LD to assemble and link code and finally in the end we go through a step by step approach to create our first “Hello World” program. Download: EmbedUpload | MirrorCreator File for this Module: JustExit.s | HelloWorldProgram.s Module 5 – Data TypesIn this video we will go through an in-depth primer on data types which are used in assembly. We do a live demo on how to look at data in memory using GDB for .ascii, .int, .short, .float (.data) and .comm, .lcomm (.bss) types. Download: EmbedUpload | MirrorCreator File for this Module: VariableDemo.s Module 6 – Moving DataIn this video we look at how to transfer data between registers and memory locations using the MOV series of instructions. We discuss data transfer between registers, immediate values and registers, memory locations and registers, immediate values and memory locations, indexed memory addressing schemes, indirect addressing using registers and many other important concepts. It is important to note that all the above are explained in detail using example code in the video. Download: EmbedUpload | MirrorCreator File for this Module: MovDemo.s Module 7 – Working with StringsIn this video we will look at how to work with strings in Assembly. We will demonstrate how we can move strings from one memory location to the other using the MOVS instruction set, discuss the concept of the Direction Flag (DF) and how to set and clear it using STD and CLD, how to execute multiple string copy instructions using the REP instruction, how to load strings from memory into the EAX register using the LODS instruction set, how to store strings from the EAX register back into memory using the STOS instruction set and finally we shall look at how to compare strings using the CMPS instruction set. Download: EmbedUpload | MirrorCreator Module 8 – Unconditional BranchingIn this video we will look at how to alter the program execution flow using unconditional branching. We will look at how to use the JMP instruction to make an unconditional branching to a new location in the code segment and how to use the CALL statement in conjunction with RET to save the program execution state. We will demonstrate all the concepts using very simple code snippets to aid understanding. Download: EmbedUpload | MirrorCreator File for this Module: UnconditionalBranching.s Module 9 – Conditional BranchingIn this video we will look at Conditional Branching in Assembly Language using the JXX family of instructions and the LOOP instruction. The conditional jump instructions such as JA, JAE, JZ, JNZ etc. use various flags in the EFLAGS register such as the Zero Flag (ZF), the Parity Flag (PF), Overflow Flag (OF), Sign Flag (SF) etc. to determine which instruction path to take next. In this video we will look at the JZ condition jump instruction in great detail. JZ using the Zero Flag (ZF) to determine if the last instruction resulted in the Zero operation or not and then chooses to jump to a specified location if it was set. We will also look at the LOOP instruction which used the ECX register to loop over a set of instructions over and over again. Download: EmbedUpload | MirrorCreator File for this Module: ConditionalBranching.s Module 10 – FunctionsIn this video we will look at how to write functions in Assembly Language. <br><br>The most important step in writing functions in assembly is to understand how to pass arguments to them and then read their return values. We will look at 2 techniques – using registers and using global memory locations to understand how this can be done. In this demo we will use our familiar “Hello World” program to demonstrate how to code a simple function using the “write()” syscall. We will use the Function.s program to demonstrate argument passing using the CPU registers and Function2.s to demo argument passing using global memory location in the .BSS segment. Download: EmbedUpload | MirrorCreator File for this Module: Function.s | Function2.s Module 11 – Functions StackIn this video, we will look at how to use the Stack to pass arguments to functions. <br><br>In course of this video we will look into exactly how the Stack works, how to store arguments on the stack, how the “call” instruction stores the return address on the stack, the logic behind storing the EBP register on the stack, how and why EBP is used to reference function arguments and local variables in a function and how to adjust the ESP to accommodate all this. This video is very important as a lot of learning from this will be used in the Buffer overflow video series I plan to make next. Download: EmbedUpload | MirrorCreator File for this Module: Function3.s |
Nmap Video Tutorials and Trainings Posted: 19 Jul 2013 06:14 PM PDT Nmap or Network Mapper is the tools to conduct a networking mapping. Using Nmap, one can know whether computer or host active and obtain further information about the target. Nmap is available in a variety of operating system such as Linux and Windows. The video tutorials on this page is made by Professor Messer. If you value this product, you can consider purchase this from www.professormesser.com/professor-messers-nmap-secrets-training-course/. These video is password protected and archived with 7zip. Once you download it, rename the extension from .xar to .7z and extract it. As the archive is password protected, to be able to extract the file you should enter the correct password. The password is: xathrya.web.id. If you want to share this, please only share this page URL or link listed here. The tutorials consists of eleven modules. These modules require a web browser with working adobe flash installed. Please make sure your browser support it. Module 1 – Getting Started with NmapOverview of the entire course, along with a sneak peek of the secrets that will be uncovered along the way. Download: EmbedUpload | MirrorCreator Module 2 – Nmap BasicsOverview of network protocols, the Nmap scan process, and secrets for increasing the speed of this process. Download: EmbedUpload | MirrorCreator Module 3 – Scans for Every OccasionIntroduces four of the most popular, most useful, and most versatile Nmap scanning methods: TCP SYN scan, TCP connect() scan, Ping scan, and UDP scan. Download: EmbedUpload | MirrorCreator Module 4 – “Back Pocket” ScansSometimes, you'll run into a situation where a normal Nmap scan isn't providing you with all of the information you need. This may be a situation where remote devices aren't responding, or perhaps you aren't able to identify any available ports on a remote device – even though you can easily connect to its web server! In these situations, it's useful to have a few tricks in your back pocket. Download: EmbedUpload | MirrorCreator Module 5 – Useful Scanning OptionsConcentrate on some useful scanning options that will assist in building Nmap scan sessions that are effective and efficient. Download: EmbedUpload | MirrorCreator Module 6 – Nmap “Pings” : The Search for HostsThere's a lot to Nmap's ping process, and we'll start with defining a ping. From there, we'll move to Nmap's default pings – the ARP ping and the ICMP and TCP ACK ping combo. To really make the most of Nmap's pings, we'll also investigate the details of the TCP SYN ping and the UDP ping. Download: EmbedUpload | MirrorCreator Module 7 – Recon ScanningInvestigae the secrets of network reconnaissance and take the details of two major Nmap features – operating system fingerprinting and version detection. Download: EmbedUpload | MirrorCreator Module 8 – Ninja ScanningIntroduce to Nmap’s art of invisibility. Learn the secrets of using Nmap on network in stealth mode, where you can go come and go like the wind. Download: EmbedUpload | MirrorCreator Module 9 – Output OptionsNmap includes a number of output options, and this module takes us through them all. We'll show you the differences in the output options, including how to convert Nmap's XML output into some great HTML-based reports. Download: EmbedUpload | MirrorCreator Module 10 – Windows NmapLearn about the history of Nmap and Windows – both the good, and the bad. Although there have been some significant operational issues with Windows-related issues that exist today are easy to work around. Download: EmbedUpload | MirrorCreator Module 11 – Real-World Nmap ScanningDiscuss six Nmap scanning techniques that can get you through some pretty nasty security problems. Download: EmbedUpload | MirrorCreator |
You are subscribed to email updates from Xathrya Sabertooth To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
Tidak ada komentar:
Posting Komentar