Skip to content

Commit 4b77ebf

Browse files
committed
editing; fancyhdr fix
1 parent ab9e33a commit 4b77ebf

File tree

5 files changed

+28
-15
lines changed

5 files changed

+28
-15
lines changed

digging_into_code/identification/exec.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ \subsection{Delphi}
129129
\RU{Первые 4 байта сегмента данных (\TT{DATA}) в исполняемых файлах могут быть}
130130
\EN{First 4 bytes of the data segment (\TT{DATA}) may be}
131131
\TT{00 00 00 00}, \TT{32 13 8B C0} \OrENRU\ \TT{FF FF FF FF}.
132-
\RU{Эта информация может помочь при распаковке}
133-
\EN{This information may be useful while unpacking}.
132+
\RU{Эта информация может помочь при работе с запакованными программами на Delphi.}
133+
\EN{This information may be useful when dealing with packed Delphi executables.}
134134

135135
\section{\RU{Другие известные DLL}\EN{Other known DLLs}}
136136

digging_into_code/main.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
\part{\RU{Поиск в коде того что нужно}\EN{Finding important/interesting stuff in the code}}
22

3-
\RU{Современное ПО, в общем-то, минимализмом не отличается.}\EN{Minimalism it is not a significant feature
4-
of modern software.}
3+
\RU{Современное ПО, в общем-то, минимализмом не отличается.}
4+
\EN{Minimalism it is not a prominent feature of modern software.}
55

66
\index{\Cpp!STL}
77
\RU{Но не потому, что программисты слишком много пишут,
@@ -27,7 +27,7 @@ \part{\RU{Поиск в коде того что нужно}\EN{Finding importan
2727
\EN{It is just absurd to rewrite all code to \CCpp to find what we're looking for.}
2828

2929
\RU{Одна из важных задач reverse engineer-а это быстрый поиск в коде того что собственно его интересует.}
30-
\EN{One of the primary reverse engineer's task is to find quickly in the code what is needed.}
30+
\EN{One of the primary reverse engineer's task is to find quickly the code he/she needed.}
3131

3232
\index{\GrepUsage}
3333
\RU{Дизассемблер \IDA позволяет делать поиск как минимум строк, последовательностей байт, констант.

examples/z3/main.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
\chapter{\RU{Ручная декомпиляция + использование SMT-солвера Z3 для взлома любительской криптографии}
2-
\EN{Hand decompiling + using Z3 SMT solver for defeating amateur cryptography}}
1+
\chapter{\RU{Ручная декомпиляция + использование SMT-солвера Z3}
2+
\EN{Hand decompiling + Z3 SMT solver}}
33
\index{Z3}
44

55
\RU{Любительская криптография обычно (непреднамеренно) очень слабая и может быть легко сломана ---

fundamentals/CPU.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ \section{\RU{Предсказатели переходов}\EN{Branch predictors
1616
\index{x86!\Instructions!CMOVcc}
1717
\index{ARM!\Instructions!ADRcc}
1818
\RU{Одна из возможностей это условные инструкции в ARM (как ADRcc), а еще инструкция CMOVcc в x86.}
19-
\EN{Conditional instructions in ARM (like ADRcc) is one way, another is CMOVcc instruction in x86.}
19+
\EN{Conditional instructions in ARM (like ADRcc) is one way, another is CMOVcc x86 instruction.}
2020

2121
\section{\RU{Зависимости между данными}\EN{Data dependencies}}
2222

2323
\EN{Modern CPUs are able to execute instructions simultaneously (\ac{OOE}), but in order to do so,
24-
results of one instructions in group should not influence execution of others.}
24+
results of one instructions in group must not influence execution of others.}
2525
\RU{Современные процессоры способны исполнять инструкции одновременно (\ac{OOE}), но для этого,
2626
внутри такой группы, результат одних не должен влиять на работу других.}
2727
\EN{Hence, compiler endeavor to use instructions with minimal influence to the CPU state.}
2828
\RU{Следовательно, компилятор старается использовать инструкции с наименьшим влиянием на
2929
состояние процессора.}
3030

3131
\EN{That's why \LEA instruction is so popular, because it do not modify CPU flags, while
32-
other arithmetic instructions modify them.}
32+
other arithmetic instructions do this.}
3333
\RU{Вот почему инструкция \LEA в x86 такая популярная ---
3434
потому что она не модифицирует флаги процессора,
3535
а прочие арифметические инструкции --- модифицируют.}

main.tex

+18-5
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,17 @@
5656
\usepackage{shorttoc}
5757
\usetikzlibrary{calc,positioning,chains,arrows}
5858
\ifdefined\ebook
59-
\usepackage[margin=0.5in]{geometry}
59+
\usepackage[margin=0.5in,headheight=11pt]{geometry}
60+
\else
61+
\usepackage[margin=0.5in,headheight=12.5pt]{geometry}
6062
\fi
6163

6264
\ifdefined\RUSSIAN
6365
\renewcommand\lstlistingname{Листинг}
6466
\renewcommand\lstlistlistingname{Листинг}
6567
\fi
6668

67-
% fancyhdr
69+
% fancyhdr ********************************************************
6870
\makeatletter
6971
\let\stdchapter\chapter
7072
\renewcommand*\chapter{%
@@ -80,6 +82,20 @@
8082
}
8183
\makeatother
8284

85+
% taken from http://texblog.org/tag/fancyhdr-font-size/
86+
\newcommand{\changefont}{%
87+
\ifdefined\ebook
88+
\fontsize{6}{7}\selectfont
89+
\else
90+
\fontsize{8}{9.5}\selectfont
91+
\fi
92+
}
93+
\fancyhf{}
94+
\fancyhead[LE,RO]{\changefont \slshape \rightmark} %section
95+
\fancyhead[RE,LO]{\changefont \slshape \leftmark} %chapter
96+
\fancyfoot[C]{\changefont \thepage} %footer
97+
% *****************************************************************
98+
8399
\newcommand{\footnoteref}[1]{\textsuperscript{\ref{#1}}}
84100

85101
\definecolor{lstbgcolor}{rgb}{0.94,0.94,0.94}
@@ -121,9 +137,6 @@
121137

122138
\begin{document}
123139

124-
%\setlength{\headheight}{15.2pt}
125-
\setlength{\headheight}{20pt}
126-
127140
\pagestyle{fancy}
128141

129142
\VerbatimFootnotes

0 commit comments

Comments
 (0)