Beruflich Dokumente
Kultur Dokumente
http://
Spreading Guide
Spreading Guide
Company Profile:
Secugenius Security Solutions is a Student Entrepreneurial Company started by 2 Social Student
Entrepreneurs in 2010 with an aim to make our country Cyber Crime Free. We at SECUGENIUS
are headquartered at Ludhiana, the Manchester of Punjab. The main activities of Secugenius
Security Solutions are providing training in Information Security and various professional courses.
Secugenius Security Solutions is an organization which believes in inventing and implementing new
ideas to influence the technological minds of the youngsters
Looking at the number of Cyber Crimes since last many years, We at Secugenius Security
Solutions provides training on Ethical hacking & Cyber Security to students, IT Professionals, Bank
Employees, Police officials.
Secugenius conducts workshops in all parts of the country in various Colleges/institutions for the
benefit of the students & making them aware of the latest trends in technological era of the
Computer age. We believe in spreading knowledge to all the youngsters & growing minds of the
nation so that they could serve the nation with perfect skill-sets in the field of Cyber Crime
Investigation & Forensic Sciences
Secugenius provides various security solutions to its clients by securing their websites from cyber
attacks. We provide training to college students, graduates and professionals in various fields.
Education is delivered to students through two modes i.e. Regular mode and Distance mode which
are available as short term and long term courses.
In the workshops conducted by Secugenius, participants can claim to be trained by the highly
experienced & skilled corporate trainers from different parts of the nation. We believe in making
the base of students to be as strong as possible. All the modules have been designed in order to
provide students with specialized knowledge by specialized trainers.
This library was furnished, managed and funded by the Founders and Directors of Secugenius
Er. Harpreet Khattar & Er. Kshitij Adhlakha. The overall resource person for the content of
the series of this Digital Library is Er. Chetan Soni - Sr. Security Specialist, Secugenius Security
Solutions.
This Online Digital Library has been initiated as a free resource & permanent
resource on specialization basis for every student of Team Secugenius.
Requirements:-
Now start terminal in Backtrack OS and go to the directory where you pasted your file.
E.g. cd Desktop
So our first step is to change the permissions of that file (775) by typing this command,
root@bt:~/Desktop# chmod 775 server.exe
-t raw -o
Youll notice Antivirus still detected it even though we encoded it 10 times with
x86/shikata_ga_nai encoder.
Now again change the permissions of this output file,
root@bt:~/Desktop# chmod 775 server2.exe
-o
Now heres your final virus named as final.exe and upload it in virustotal.com and
youll see the results.
And as you'll notice, you have just bypassed anti-virus. Now all you have to do is send it
to the victim and keep enjoying.
InterBase 6
Getting Started
Borland
SOFTWARE CORPORATION
Borland Software Corporation may have patents and/or pending patent applications covering subject matter in
this document. The furnishing of this document does not convey any license to these patents.
Copyright 2001 BorlandSoftware Corporation. All rights reserved. All InterBase and Borland products are
trademarks or registered trademarks of BorlandSoftware Corporation. Other brand and product names are
trademarks or registered trademarks of their respective holders.
1INT0060WW21000 21006
D4
TABLE OF CONTENTS
Table of Contents
CHAPTER 1
System Requirements
Disk space requirements . . . . . . . . . . . . . . . . . . . . . . . 5
Windows system requirements . . . . . . . . . . . . . . . . . . . . 6
UNIX system requirements . . . . . . . . . . . . . . . . . . . . . . 6
Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Solaris . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Requirements for other platforms . . . . . . . . . . . . . . . . . . 6
CHAPTER 2
Installation
Installing InterBase on Windows
. . . . . . . . . . . . . . . . . .7
Migrating to InterBase 6
Migration process . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Migration Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
InterBase 6 SQL dialects . . . . . . . . . . . . . . . . . . . 20
Servers, databases, and ODS 10 . . . . . . . . . . . . . . . 20
Clients and databases . . . . . . . . . . . . . . . . . . . . . 21
iii
iv
INTERBASE 6
CHAPTER
System Requirements
Chapter1
Solaris
Operating system: Solaris 2.6 or 2.7
Memory: 32 megabytes minimum; 64 recommended for a server
Processor/Hardware Model: SPARC or UltraSPARC
C Compiler: SPARCWorks SC 4.2 C compiler
C++ Compiler: SPARCWorks SC 3.0.1. C++ compiler
Note InterBase on Solaris uses a OS-specific install utility called pkgadd. Install the Solaris
INTERBASE 6
CHAPTER
Installation
Chapter2
This chapter contains detailed instructions for installing InterBase on Windows 98/ME,
Windows NT, Windows 2000, Linux, and Solaris.
InterBase might install differently on other platforms due to operating system
requirements. Refer to installation notes included in the software package, on the media,
or on the Borland web site (http://www.borland.com/interbase) for platform-specific
installation instructions.
IMPORTANT
CHAPTER 2 INSTALLATION
Configuring InterBase
You can control many aspects of how InterBase runs, including server and database
configurations, backup and restore, and database replication. See the Operations Guide
for information on these topics.
Logging on
To attach to any database, you must have a user name and password. When you first
install InterBase, there is one user defined: SYSDBA. The password is masterkey. SYSDBA
has special privileges that override normal SQL security, and there are database
maintenance tasks that only SYSDBA can perform. You should change the SYSDBA
password immediately after installing InterBase.
Use IBConsole or the gsec utility to change a password and create additional users. For
more information see the IBConsole online help or the Operations Guide.
INTERBASE 6
INSTALLATION ON UNIX
The InterBase Server, Guardian, and InterServer processes must not be running when you
uninstall the software. To stop one of these applications, right-click its icon in the Task
Tray and selecting Shutdown. To stop one of these services (Windows NT/2000), use the
Control Panel | Services applet.
Uninstall never removes isc4.gdb or files created by the server process, including
interbase.log, host.evn, host.lck.
The Windows InterBase installation allows you to choose between performing a complete
install or selecting individual components. If you choose to install components at
different times, the uninstall program removes only the components selected for the last
install.
The ODBC driver or the ODBC driver manager must be removed manually; there is no
uninstall available through the Windows control panel.
Installation on UNIX
This section provides instructions for installing InterBase 6 on Solaris and Linux. For
platform-specific instruction on installing InterBase on other UNIX brands, see the
InterBase web site (http://www.borland.com/interbase).
By default, InterBase files are installed in /opt/interbase. On the Solaris platform, the
install program still creates a symbolic link from /usr/interbase to /opt/interbase. On
Linux, there is no symbolic link from /usr/interbase to an actual install directory. You
can use the INTERBASE environment variable to change this location. See the Operations
Guide for information about setting environment variables.
CHAPTER 2 INSTALLATION
You can skip this step if you haven't customized these files in a previous installation.
Note When you use pkgrm remove InterBase V5 for Solaris, these files are
Installing on Solaris
InterBase requires Solaris versions 2.6.x. or 7. These instructions are for both server and
client installations:
10
INTERBASE 6
INSTALLATION ON UNIX
11
CHAPTER 2 INSTALLATION
##
##
##
##
##
The InterBase install script looks for the InterClient installation script on the CD-ROM,
and runs it if possible. See Uninstalling InterBase on UNIX on page 16.
Thereafter, the install script returns to pkgadd:
Installation of <interbase> was successful.
The following packages are available:
1 interbase InterBase RDBMS Software
(sparc) InterBase Version 6.0
Select package(s) you wish to process (or all to process
all packages). (default: all) [?,??,q]:
6. If you intend to run the ibserver daemon as a user other than root, create a
UNIX user account named interbase on your machine. Log in as this user
before starting the SuperServer with the ibmgr utility.
12
INTERBASE 6
INSTALLATION ON UNIX
Note We recommend that you create an interbase user account and use this account
for all database maintenance; this will make tasks such as backup and restore run much
more smoothly.
7. Execute the following command to start the InterBase Server:
# echo /usr/interbase/bin/ibmgr start forever | su interbase
This starts the SuperServer daemon (ibserver) and a guardian (ibguard) program that
keeps track of ibserver.
8. Now that the server is running, you can restore the security database with the
ones you backed up before installing InterBase 6:
# gbak r /tmp/isc4.gbak jupiter:/usr/interbase/isc4.gdb
9. To test your existing databases with InterBase 6, use gbak to restore the
backup files you created before upgrading.
Installing on Linux
For both the SuperServer and Classic versions of InterBase, default installation directories
on Linux are as follows:
/opt/interbase
executables
/usr/lib
libraries
/usr/include
header files
InterBase SuperServer for Linux requires glibc (libc6) Version 2.1. InterBase does not
work with the older Version 2.0 library.
13
CHAPTER 2 INSTALLATION
IMPORTANT
If /etc/hosts.equiv already exists on the system, then the command above will
overwrite your current file, and all the information that was in it will be lost.
6. To test SuperServer installations do the following:
- Make sure that a search path (environment variable PATH) contains
/opt/interbase/bin.
- Start the ibserver in /opt/interbase/bin with:
ibmgr -start -forever -user SYSDBA -password masterkey
Note The Classic architecture permits application processes to perform I/O on database
files directly, whereas SuperServer requires applications to request the ibserver I/O
operations by proxy, using a network method. The local access method is only usable by
applications that run on the same host as the database. Thus we need to test both local
and remote access for Classic servers.
- To test local access, start isql locally and connect to the example database:
isql /opt/interbase/examples/employee.gdb
- To test remote access, start the isql utility and connect to the example database:
isql localhost:/opt/interbase/examples/employee.gdb
14
INTERBASE 6
INSTALLATION ON UNIX
IMPORTANT
If /etc/hosts.equiv already exists on the system, then the command above will
overwrite your current file, and all the information that was in it will be lost.
7. To test SuperServer installations do the following:
- Make sure that a search path (environment variable PATH) contains
/opt/interbase/bin.
- Start the ibserver in /opt/interbase/bin with:
ibmgr -start -forever -user SYSDBA -password masterkey
Note The Classic architecture permits application processes to perform I/O on database
files directly, whereas SuperServer requires applications to request the ibserver I/O
operations by proxy, using a network method. The local access method is only usable by
applications that run on the same host as the database. Thus we need to test both local
and remote access for Classic servers.
- To test local access, start isql locally and connect to the example database:
isql /opt/interbase/examples/employee.gdb
- To test remote access, start the isql utility and connect to the example database:
isql localhost:/opt/interbase/examples/employee.gdb
15
CHAPTER 2 INSTALLATION
On Linux, if InterBase was installed using RPM, use RPM to uninstall InterBase, for
example:
rpm -e NameofInterBasePackage
On Linux, if InterBase was installed using a tar file, follow these steps to uninstall
InterBase.
SuperServer:
1. If ibserver is running, use the following command to shut down the server:
ibmgr -shut -pass password
Classic:
1. If gds_lock_mgr is running, use the following command to shut down the
lock manager:
gds_drop -s
16
INTERBASE 6
4. Remove all the InterBase files from the /usr/lib, /usr/local/sbin, and
/usr/include directories; see /tmp/ibinstall.log for the list of files.
5. Remove the InterBase entry from /etc/inetd.conf; see /tmp/ibinstall.log for
the InterBase entry.
6. Find the inetd process id in /var/run/inetd.pid and send the signal SIGHUP
to the inetd process to tell it to re-read the configuration file and not listen
on port 3050 (gds_db) any more.
7. Remove the InterBase entry from /etc/services; see /tmp/ibinstall.log for
the InterBase entry.
Full-text searching
The document set has been indexed for full-text searching. If you are viewing the
documents using Acrobat Reader With Search, you can enter a query and receive a list of
hits from all five books in the InterBase document set.
To use full-text searching, click the
button and search for a word or phrase. Acrobat
Reader returns a list of books that contain the phrase. Choose the book you want to start
looking in to display the first instance. You then use the
and
buttons to step
forward and back through instances of your search target. Reader moves from one book
to the next. To go to a different book at will, click the
button to display the found
list.
17
CHAPTER 2 INSTALLATION
On UNIX and Linux, always open documents using an absolute pathname to the PDF
file, to make Acrobat Reader With Search associate the index with the PDF document
correctly.
Links
The PDF documentation set contains many hypertext links that take you to referenced
points in the document with a single click. In addition, the Table of Contents and Index
entries are hypertext links and therefore are clickable. Throughout the document set,
clickable links appear bold and green.
You can install Acrobat Reader 3.01 With Search by choosing Install Adobe Acrobat
Reader 3.0 from the InterBase Launcher. You can also install it directly by running
setup.exe from the /Adobe directory of the InterBase CD-ROM.
On UNIX
The InterBase CD-ROM includes Acrobat Reader With Search for both the UNIX platform
and for Windows. The files are in subdirectories of the /Adobe directory on the InterBase
CD-ROM. Read instguid.txt in the /Adobe/UNIX platform directory for UNIX installation
instructions. To install on a Windows platform, run setup.exe in the /Adobe/Windows
directory.
From the Adobe website
If you dont have the InterBase CD-ROM handy, you can get Acrobat Reader for free from
the Adobe website. Its at http://www.adobe.com/products/acrobat. Check the box next to
Include option for searching PDF files... to download Acrobat Reader With Search, not
the plain Acrobat Reader.
18
INTERBASE 6
CHAPTER
Migrating to InterBase 6
Chapter3
This chapter describes how to plan and execute a smooth migration from earlier versions
of InterBase to InterBase 6. Topics in this chapter include:
Migration paths
Migration process
These are the steps you must take to migrate servers, databases, and clients. Each is
discussed in detail in later sections:
19
Client migration
1. Identify the clients that must be upgraded to InterBase 6
2. Identify areas in your application which may need upgrading
3. Install the InterBase 6 client to each machine that requires it
4. Upgrade SQL applications to SQL dialect 3
Migration Issues
Before migrating your databases, you need to learn about InterBase 6 SQL dialects and
understand their effect on servers, clients, and the use of new InterBase 6 features.
Double quote (): changed from a synonym for the single quote () to the delimiter for
an object name
DECIMAL and NUMERIC datatypes with precision greater than 9: now stored as INT64
datatypes instead of DOUBLE PRECISION
DATE, TIME, and TIMESTAMP datatypes: DATE has changed from a 64-bit quantity containing
both date and time information to a 32-bit quantity containing only date information.
TIME is a 32-bit quantity containing only time information, while TIMESTAMP is a 64-bit
quantity containing both date and time information (the same as DATE in pre-Version 6
SQL).
20
If you upgrade a server to InterBase 6, you have the option to migrate the databases that
it accesses to InterBase 6 as well.
INTERBASE 6
MIGRATION ISSUES
If you do not upgrade a server, you do not need to migrate the databases that it accesses.
InterBase 5 and older servers can access InterBase 6 databases.
Version 5 clients cannot access dialect 3 columns that are stored as INT64, TIME, or DATE.
(DECIMAL and NUMERIC columns with precision greater than 9 are stored as INT64.)
Version 5 clients cannot display new datatypes in metadata using the SHOW command, or
any equivalent.
Version 5 clients interpret the DATE datatype as TIMESTAMP, since that was the definition
of DATE prior to InterBase 6.
Version 5 clients cannot access any object named with a delimited identifiers.
Clients that use the Borland Database Engine (BDE) to access an InterBase 6.0 server are
not able to access any of the new field type regardless of the version of the InterBase
client installed.
For example, the following statement uses the new keyword word TIME:
SELECT TIME FROM atable;
This statement, when executed via a pre-InterBase 6 client returns the information as it
did in previous versions. If this same query is issued using a version 6 client, an error is
returned since TIME is now a reserved word. See page 27 for a list of new keywords.
21
Double quoted text is interpreted as a string literal. Delimited identifiers are not available.
The DATE datatype contains both time and date information and is interpreted as
TIMESTAMP; the name has changed but the meaning has not. Dialect 1 clients expect the
entire timestamp to be returned. In dialect 1, DATE and TIMESTAMP are identical.
Dialect 1 databases store DECIMAL and NUMERIC datatypes with precision greater than 9
as DOUBLE PRECISION, not INT64. In clients: The dialect 1 client expects information stored
in these datatypes to be returned as double precision; such clients cannot create database
fields to hold 64-bit integers.
An InterBase 6 server recognizes all the other InterBase 6 features in dialect 1 clients and
databases.
Dialect 2 clients
Dialect 2 is available only on the client side. It is intended for assessing possible problems
in legacy metadata that is being migrated to dialect 3. To determine where the problem
spots are when you migrate a database from dialect 1 to dialect 3, you extract the
metadata from the database, set isql to dialect 2, and then run that metadata file through
isql. isql issues warning whenever it encounters double quotes, DATE datatypes, or large
exact numerics to alert you to places where you might need to change the metadata in
order to make a successful migration to dialect 3.
To detect problem areas in the metadata of a database that you are migrating, extract the
metadata and run it through a dialect 2 client, which will report all instances of transition
features. For example:
isql -i v5metadata.sql
22
INTERBASE 6
Dialect 3 DATE datatype fields contain only date information. Dialect 3 clients expect only
date information from a field of datatype DATE.
Dialect 3 databases store DECIMAL and NUMERIC datatypes with precision greater than 9
as INT64 if and only if they are in columns that were created in dialect 3. Dialect 3 clients
expect DECIMAL and NUMERIC datatypes with precision greater than 9 to be returned as
INT64. (To learn how to migrate older data to INT64 storage, see Migrating databases to
dialect 3 on page 43 and Migrating NUMERIC and DECIMAL datatypes on page 48.)
Within an isql session or in an SQL script, you can issue this statement:
SET SQL DIALECT n
The following table shows the precedence for setting isql dialect:
Ranking
Lowest
Next lowest
Next highest
Highest
TABLE 3.1
23
If you start isql and attach to a database without specifying a dialect, isql takes on the
dialect of the database.
If you specify a dialect on the command line when you invoke isql, it retains that dialect
after connection unless explicitly changed.
When you change the dialect during a session using SET SQL DIALECT n, isql continues to
operate in that dialect until explicitly changed.
When you create a database using isql, the database is created with the dialect of the isql
client; for example, if isql has been set to dialect 1, when you create a database, it is a
dialect 1 database.
If you create a database without first specifying a dialect for the isql client or attaching to
a database, isql creates the database in dialect 3.
The statements above are true whether you are running isql as a command-line utility or
are accessing it through IBConsole, InterBases new interface.
IMPORTANT
Any InterBase 6 isql client that attaches to a version 5 database resets to dialect 1.
Start gpre with option -sql_dialect n. For example, this command sets gpre to dialect 3:
gpre -sql_dialect 3
Highest
gpre -sql_dialect n
EXEC SQL
SET SQL DIALECT n
24
INTERBASE 6
NEW FEATURES
New features
Many of the new InterBase 6 features operate without reference to dialect. Other features
are dialect-specific. These features are listed below and described in more detail in the
Release Notes and other InterBase manuals.
Read-only databases
You can make InterBase 6 databases be read-only. This permits distribution on read-only
media such as CDROMs and reduces the chance of accidental or malicious changes to
databases.
definition.
25
SQL warnings
The InterBase API function set now returns warnings and informational messages along
with error messages in the status vector.
Delimited identifiers
Identifiers can now be keywords, contain spaces, be case sensitive, and contain
non-ASCII characters. Such identifiers must be delimited by double quotes. String
constants must be delimited by single quotes.
In dialect 3, the DATE datatype holds only date information. This is a change from earlier
InterBase versions in which it stored the whole timestamp.
26
INTERBASE 6
NEW FEATURES
Dialect 3 allows the use of the TIME datatype, which hold only the time portion of the
timestamp.
New keywords
InterBase 6 introduces the following new keywords:
COLUMN
CURRENT_DATE
CURRENT_TIME
CURRENT_TIMESTAMP
DAY
EXTRACT
HOUR
MINUTE
MONTH
SECOND
TIME
TIMESTAMP
TYPE
WEEKDAY
YEAR
YEARDAY
You cannot create objects in a version 6 dialect 1 database that have any of these
keywords as object names (identifiers).
You can migrate a version 5 database that contains these keywords used as identifiers to
version 6 dialect 1 without changing the object names: a column could be named YEAR,
for instance.
Version 5 clients can access these keyword identifiers without error.
Version 6 clients cannot access keywords that are used as identifiers. In a dialect 1
database, you must change the names so that they are not keywords.
If you migrate directly to dialect 3, you can retain the names, but you must delimit them
with double quotes. To retain accessibility for older clients, put the names in all upper
case. Delimited identifiers are case sensitive.
Although TIME is a reserved word in version 6 dialect 1, you cannot use it as a datatype
because such databases guarantee datatype compatibility with version 5 clients.
In dialect 3 databases and clients, any reserved word can be used as an identifier as long
as it is delimited with double quotes.
27
Delimited identifiers
To increase compliance with the SQL 92 standard, InterBase 6 introduces delimited
identifiers. An identifier is the name of any database object; for instance a table, a
column, or a trigger. A delimited identifier is an identifier that is enclosed in double
quotes. Because the quotes delimit the boundaries of the name, the possibilities for object
names are greatly expanded from previous versions of InterBase. Object names can now:
mimic keywords
be case-sensitive
Double-quotes use
Up to and including version 5, InterBase allowed the use of either single or double quotes
around string constants. The concept of delimited identifiers did not exist. InterBase 6
operates under these rules for double quotes:
28
In version 5 and older of InterBase, string constants were delimited by either double or
single quotes. Since there was no concept of delimited identifiers, double quotes were
always interpreted as string constants.
Version 6 dialect 1 is a transition mode that behaves like older versions of InterBase with
respect to quote marks: it interprets strings within double quotes as string constants and
does not permit delimited identifiers.
Version 6 dialect 3 uses double quotes only for delimited identifiers. String constants must
be delimited by single quotes, never double.
When version 6 servers detect that the client is dialect 1, they permit client DML
statements to contain double quotes and they correctly handle these as string constants.
However, they do not permit double quotes in client DDL statements because that
metadata would not be allowed in dialect 3. Version 6 servers all insist that string
constants be delimited with single quotes when clients create new metadata.
INTERBASE 6
NEW FEATURES
In dialect 1, only TIMESTAMP is available. TIMESTAMP is the equivalent of the DATE datatype
in previous versions. When you back up an older database and restore it in version 6, all
the DATE columns and domains are automatically restored as TIMESTAMP. DATE and
TIMESTAMP datatypes are both available and both mean the same thing in dialect 1.
In dialect 3, DATE and TIME columns require only four bytes of storage, while TIMESTAMP
columns require eight bytes.
The following example shows the differences between dialect 1 and dialect 3 clients when
date information is involved.
Example
29
Example
In dialect 1:
FLD1
===========
25-JUN-1999
In dialect 3:
FLD1
=========================
1999-06-25 10:24:35.0000
Example
30
INTERBASE 6
NEW FEATURES
25-JU
In dialect 3:
Statement failed, SQLCODE = -802
arithmetic exception, numeric overflow, or string truncation
It is not possible to cast a date/time datatype to or from BLOB, SMALLINT, INTEGER, FLOAT,
DOUBLE PRECISION, NUMERIC, or DECIMAL datatypes.
For more information, refer to Using CAST() to convert dates and times in the Embedded
SQL Guide.
Table 3.2 outlines the results of casting to date/time datatypes:
31
To
Cast From
TIMESTAMP
DATE
TIME
VARCHAR(n)
See below.
CSTRING(n)
TIMESTAMP
Always succeeds
DATE
Always succeeds
Error
TIME
Error
Always succeeds
CHARACTER(n)
TABLE 3.2
result does not fit in the string variable a string truncation exception is raised. In earlier
versions, this case results in DD-Mon-YYYY HH:mm:SS.hundreds where Mon was a
3-letter English month abbreviation. Inability to fit in the string variable resulted in a
silent truncation.
Casting a string to a date now permits strings of the form:
'yyyy-mm-dd'
'yyyy:mm:dd'
'yyyy/mm/dd'
'yyyy.mm.dd'
'yyyy mm dd'
In all of the forms above, you can substitute a month name or 3-letter abbreviation in
English for the 2-digit numeric month. However, the order must always be 4-digit year,
then month, then day.
In previous versions of InterBase, you could enter date strings in a number of forms,
including ones that had only two digits for the year. Those forms are still available in
InterBase 6. If you enter a date with only two digits for the year, InterBase uses its "sliding
window" algorithm to assign a century to the years.
The following forms were available in earlier versions of InterBase and are still permitted
in InterBase 6:
'mm-dd-yy'
'mm dd yy'
'dd.mm.yy'
32
'mm-dd-yyyy'
'mm dd yyyy'
'dd.mm.yyyy'
'mm/dd/yy'
'mm:dd:yy'
'mm/dd/yyyy'
'mm:dd:yyyy'
INTERBASE 6
NEW FEATURES
If you write out the month name in English or use a 3-character English abbreviation,
you can enter either the month or the day first. In the following examples, xxx stands
for either a whole month name or a three-letter abbreviation. All of the following forms
are acceptable:
'dd-xxx-yy'
'dd xxx yy'
'dd:xxx:yy'
'dd-xxx-yyyy'
'dd xxx yyyy'
'dd:xxx:yyyy'
'xxx-dd-yy'
'xxx dd yy'
'xxx:dd:yy'
'xxx-dd-yyyy'
'xxx dd yyyy'
'xxx:dd:yyyy'
For example, the following INSERT statements all insert the date January 22, 1943:
INSERT
INSERT
INSERT
INSERT
INTO
INTO
INTO
INTO
t1
t1
t1
t1
VALUES
VALUES
VALUES
VALUES
('1943-01-22');
('01/22/1943');
('22.01.1943');
('jan 22 1943');
The following statement would enter the date January 22, 2043:
INSERT INTO t1 VALUES ('01/22/43');
TABLE 3.3
Cast From
TIMESTAMP
DATE
TIME
33
TABLE 3.4
34
Operand1
Operator Operand2
Result
DATE
DATE
Error
DATE
TIME
TIMESTAMP (concatenation)
DATE
TIMESTAMP
Error
DATE
TIME
DATE
TIMESTAMP (concatenation)
TIME
TIME
Error
TIME
TIMESTAMP
Error
TIME
TIMESTAMP
DATE
Error
TIMESTAMP
TIME
Error
TIMESTAMP
TIMESTAMP
Error
TIMESTAMP
DATE
DATE
DATE
TIME
Error
DATE
TIMESTAMP
Error
DATE
TIME
DATE
Error
TIME
TIME
TIME
TIMESTAMP
Error
INTERBASE 6
NEW FEATURES
TABLE 3.4
Operand1
Operator Operand2
Result
TIME
TIMESTAMP
DATE
Error
TIMESTAMP
TIME
Error
TIMESTAMP
TIMESTAMP
TIMESTAMP
Default clauses
CURRENT_DATE, CURRENT_TIME, and CURRENT_TIMESTAMP can be specified as the default
The value passed to the EXTRACT() expression must be DATE, TIME, or TIMESTAMP.
Extracting a part that doesnt exist in a datatype results in an error. For example:
EXTRACT (TIME FROM aTime)
35
The datatype of EXTRACT() expressions depends on the specific part being extracted:
TABLE 3.5
Extract
YEAR
SMALLINT
MONTH
SMALLINT
DAY
SMALLINT
HOUR
SMALLINT
MINUTE
SMALLINT
SECOND
DECIMAL(6,4)
WEEKDAY
SMALLINT
YEARDAY
SMALLINT
36
INTERBASE 6
NEW FEATURES
=======
5
SELECT EXTRACT (YEARDAY FROM timestamp_fld) FROM table_name;
=======
175
SELECT EXTRACT (MONTH FROM timestamp_fld) ||
'-' || EXTRACT (DAY FROM timestamp_fld) ||
'-' || EXTRACT (YEAR FROM timestamp_fld) FROM table_name;
====================
6-25-1999
When you migrate an exact numeric column to dialect 3 it is still stored as DOUBLE
PRECISION. The migration does not change the way the data is stored because INT64
cannot store the whole range that DOUBLE PRECISION can store. There is potential data
loss, so InterBase does not permit direct conversion. If you decide that you want your
data stored as INT64, you must create a new column and copy the data. Only exact
numeric columns that are created in dialect 3 are stored as INT64. The details of the
process are provided in Migrating databases to dialect 3 on page 43.
You might or might not want to change exact numeric columns to INT64 when you
migrate to dialect 3. See Do you really need to migrate your NUMERIC and DECIMAL
datatypes? on page 48 for a discussion of issues.
Dialect 3 features and changes include
37
Overflow protection. In dialect 1, if the product of two integers was bigger than 31 bits,
the product was returned modulo 232. In dialect 3, the true result is returned as a 64-bit
integer. Further, if the product, sum, difference, or quotient of two exact numeric values
is bigger than 63 bits, InterBase issues an arithmetic overflow error message and
terminates the operation. (Previous versions sometimes returned the least-significant
portion of the true result.). The stored procedure bignum below demonstrates this.
Operations involving division return an exact numeric if both operands are exact
numerics in dialect 3. When the same operation is performed in dialect 1, the result is a
DOUBLE PRECISION.
To obtain a DOUBLE PRECISION quotient of two exact numeric operands in dialect 3,
explicitly cast one of the operands to DOUBLE PRECISION before performing the division:
CREATE TABLE table 1 (n1 INTEGER, n2 INTEGER);
INSERT INTO table 1 (n1, n2) VALUES (2, 3);
SELECT n1 / n2 FROM table1;
======================
0
Similarly, to obtain a double precision value when averaging an exact numeric column,
you must cast the argument to double precision before the average is calculated:
SELECT AVG(CAST(int_col AS DOUBLE PRECISION))FROM table1;
Compiled objects
The behavior of a compiled object such as a stored procedure, trigger, check constraint,
or default value depends on the dialect setting of the client at the time the object is
compiled. Once compiled and validated by the server the object is stored as part of the
database and its behavior is constant regardless of the dialect of the client that calls it.
Example
client.
38
INTERBASE 6
NEW FEATURES
client.
Consider the following procedure:
Example
dialect 3 client.
Generators
InterBase 6 generators return a 64-bit value, and only wrap around after 264 invocations
(assuming an increment of 1), rather than after 232 as in InterBase 5. Applications should
use an ISC_INT64 variable to hold the value returned by a generator. A client using dialect
1 receives only the least significant 32 bits of the updated generator value, but the entire
64-bit value is incremented by the engine even when returning a 32-bit value to a client
that uses dialect 1. If your database was using an INTEGER field for holding generator
values, you need to recreate the field so that it can hold 64-bit integer values.
Miscellaneous issues
Resolution If you have more than 1500 elements, place the values in a temporary table
and use a SELECT subquery in place of the list elements.
39
Using isql to select from a TIMESTAMP column displays all information when client dialect
is 3.
Resolution In versions of InterBase prior to 6.0, the time portion of a timestamp
displayed only if SET TIME ON was in effect. In 6.0 client dialect 3, the time portion of the
timestamp always displays.
Older clients can still access databases that have been migrated to InterBase 6. You must
be aware, however, that they cannot access new datatypes or data stored as INT64, and
they always handle double quoted material as strings.
InterBase strongly recommends that you establish a migration testbed to check your
migration procedures before migrating production servers and databases. The testbed
does not need to be on the same platform as the production clients and servers that you
are migrating.
The migration path varies somewhat depending on whether you are replacing an existing
server or installing a new server and moving old databases there. Upgrading an existing
server costs less in money, but may cost more in time and effort. The server and all the
databases you migrate with it are unavailable during the upgrade. If you have hardware
available for a new InterBase 6 server, the migration can be done in parallel, without
interrupting service more than very briefly. This option also offers an easier return path
if problems arise with the migration.
40
INTERBASE 6
3. Shut down the version 5 server. If your current server is a Superserver, you
are not required to uninstall the server if you intend to install over it,
although uninstalling is always good practice. You cannot have multiple
versions of InterBase on the same machine. If your current server is Classic,
you must uninstall before installing InterBase 6.
4. Install the version 6 server.
Note The install does not overwrite isc4.gdb or isc4.gbk.
Note that InterBase can run only as user root or user interbase on UNIX.
6. To restore the list of valid users, follow these steps:
a. Restore isc4.gbk to isc4_old.gdb
b. Shut down the server
c. Copy isc4_old.gdb over isc4.gdb
d. Copy isc4_old.gbk over isc4.gbk
e. Restart the server
7. Delete each ODS 9 database file. Restore each database from its backup file.
This process creates InterBase 6, ODS 10, dialect 1 databases.
8. Perform a full validation of each database.
After performing these steps, you have an InterBase 6 server and InterBase 6, dialect 1
databases. See About InterBase 6, dialect 1 databases on page 43 to understand
more about these databases. See Migrating databases to dialect 3 on page 43 for a
description of how to migrate databases to dialect 3. See Migrating clients on page 51
for an introduction to client migration.
41
Note that InterBase can run only as user root or user interbase on UNIX.
4. Copy the database backup files to the new server and restore each database
from its backup file. This process creates InterBase 6, ODS 10, dialect 1
databases.
Save your backup files until your migration to dialect 3 is complete.
5. To restore the list of valid users, follow these steps:
a. Restore isc4.gbk to isc4_old.gdb
b. Shut down the server
c. Copy isc4_old.gdb over isc4.gdb
d. Copy isc4_old.gbk over isc4.gbk
e. Restart the server
6. Perform a full validation of each database on the new server.
After performing these steps, you have an InterBase 6 server and InterBase 6, dialect 1
databases. See About InterBase 6, dialect 1 databases on page 43 to understand
more about these databases. See Migrating databases to dialect 3 on page 43 for a
description of how to migrate databases to dialect 3. See Migrating clients on page 51
for an introduction to client migration.
42
INTERBASE 6
A version 5 client can access everything in the database with no further changes.
If there are object namescolumn or table names, for instancethat include any of the
17 new keywords, you must change these names in order to access these objects with a
version 6 dialect 1 client. The new ALTER COLUMN clause of ALTER TABLE makes it easy to
implement column name changes.
Version 5 clients can still access the columns.
Dialect 3 clients can access these columns as long as they delimit them with double
quotes.
The 17 new keywords are reserved words. However, the new datatypes TIME and DATE are
not available to use as datatypes. DATE columns have the old meaningboth date and
time. The new meaning of DATEdate onlyis available only in dialect 3.
All columns that were previously DATE datatype are now TIMESTAMP datatype. TIMESTAMP
contains exactly the information that DATE did in previous versions.
Exact numeric columnsthose that have a DECIMAL or NUMERIC datatype with precision
greater than 9are still stored as DOUBLE PRECISION datatypes. All arithmetic algorithms
that worked before on these columns still work as before. It is not possible to store data
as INT64 in dialect 1.
Overview
In either method, you begin by extracting the metadata from your database, examining
it for problem areas, and fixing the problems.
43
If you are performing an in-place migration, you copy corrected SQL statements from the
metadata file into a new script file, modify them, and run the script against the original
database. Then you set the database to dialect 3. There are some final steps to take in the
dialect 3 database to store old data as INT64.
If you have a utility for moving data from the old database to a newly created empty
database, you use the modified metadata file to create a new dialect 3 database and use
the utility to transfer data from the old database to the new.
In both cases, you must make changes to the new database to accommodate migrated
columns that must be stored as INT64 and column constraints and defaults that originally
contained double quotes.
The two methods are described below.
original metadata file, but this is more likely to result in problems from statements
that were left in error. InterBase recommends creating a new script file that contains
only the statements that need to be run against the original database.
For the remaining steps, use a text editor to examine and modify the metadata and script
files. Place copied statements into the new script file in the same order they occur in the
metadata file to avoid dependency errors.
4. Search for each instance of double quotes in the extracted metadata file.
These can occur in triggers, stored procedures, views, domains, table column
defaults, and constraints. Change each double quote that delimits a string to
a single quote. Make a note of any tables that have column-level constraints
or column defaults in double quotes.
Copy each changed statement to your empty script file, but do not copy ALTER TABLE
statements whose only double quotes are in column-level constraints or column
defaults.
44
INTERBASE 6
Important When copying trigger or stored procedure code, be sure to include any
associated SET TERM statements.
Quoted quotes If there is any chance that you have single or double quotes inside of
strings, you must search and replace on a case-by-case basis to avoid inappropriate
changes. The handling of quotation marks within strings is as follows:
TABLE 3.6
String:
In "peg" mode
Double-quoted:
Single-quoted:
String:
O'Reilly
Double-quoted:
"O'Reilly"
Single-quoted:
'O''Reilly'
5. In the new script file, search for occurrences of the TIMESTAMP datatype. In
most cases, these were DATE datatypes in your pre-6 database. For each one,
decide whether you want it to be TIME, TIMESTAMP, or DATE in your dialect 3
database. Change it as needed.
6. Repeat step 5 in the metadata file. Copy each changed statement to your new
script file.
7. In the new script file, search for occurrences of reserved words that are used
as object names and enclose them in double quotes; that makes them
delimited identifiers.
8. Repeat step 7 in the metadata file. Copy each changed statement to your new
script file.
9. In each of the two files, search for each instance of a DECIMAL or NUMERIC
datatype with a precision greater than 9. Consider whether or not you want
data stored in that column or with that domain to be stored as DOUBLE
PRECISION or INT64. See Do you really need to migrate your NUMERIC and
DECIMAL datatypes? on page 48 for a discussion of issues. For occurrences
that should be stored as DOUBLE PRECISION, change the datatype to that.
Leave occurrences that you want stored as INT64 alone for now. Copy each
changed statement that occurs in the metadata file to your new script file.
Perform the following steps in your new script file:
45
10. Locate each CREATE TRIGGER and CREATE DOMAIN statement and change it to
ALTER TRIGGER or ALTER DOMAIN as appropriate.
11. Locate each CREATE VIEW statement. Precede it by a corresponding DROP
statement. For example, if you have a CREATE VIEW foo statement, put a DROP
VIEW foo statement right before it, so that when you run this script against
your database, each view first gets dropped and then re-created.
12. If you have any ALTER TABLE statements that you copied because they contain
named table-level constraints, modify the statement so that it does nothing
except drop the named constraint and then add the constraint back with the
single quotes.
13. Check that stored procedure statements are ALTER PROCEDURE statements.
This should already be the case.
14. At the beginning of the script, put a CONNECT statement that connects to the
original database that you are migrating.
15. Make sure your database is backed up and run your script against the
database.
16. Use gfix to change the database dialect to 3.
gfix -sql_dialect 3 database.gdb
Note To run gfix against a database, you must attach as either the database owner or
SYSDBA.
17. At this point, DECIMAL and NUMERIC columns with a precision greater than 9
are still stored as DOUBLE PRECISION. To store the data as INT64, follow the
steps in Migrating NUMERIC and DECIMAL datatypes on page 48.
18. Validate the database using either IBConsole or gfix.
Thats it. Youve got a dialect 3 database. There is a little more work to do if you want
your NUMERIC and DECIMAL columns with a precision of greater than 9 to be stored as
INT64. At this point, they are still stored as DOUBLE PRECISION. To decide whether you want
to change they way data in these columns is stored, read
In addition, there are some optional steps you can take that are described in the following
sections, Column defaults and column constraints and Unnamed table
constraints.
IMPORTANT
46
If you ever extract metadata from the dialect 3 database that you created using the steps
above, and if you plan to use that metadata to create a new database, check to see if the
extracted metadata contains double quotes delimiting string constants in column
defaults, column constraints, or unnamed table constraints. Change any such
occurrences to single quotes before using the metadata to create the new database.
INTERBASE 6
47
If SHOW TABLE shows that InterBase stores the unnamed constraint as INTEG_2, then
issue the following statement to change the constraint:
ALTER TABLE foo
DROP CONSTRAINT INTEG_2,
ADD CONSTRAINT new_name
CHECK (col_name IN ('val1', 'val2', 'val3'));
As you migrate you databases to dialect 3, consider the following questions about
columns defined with NUMERIC and DECIMAL datatypes:
Is the precision less than 10? If so, there is no issue. You can migrate without taking any
action and there will be no change in the database and no effect on clients.
For NUMERIC and DECIMAL columns with precision greater than 9, is DOUBLE PRECISION an
appropriate way to store your data?
In many cases, the answer is yes. If you want to continue to store your data as DOUBLE
PRECISION, change the datatype of the column to DOUBLE PRECISION either before or
after migrating your database to dialect 3. This doesnt change any functionality in
dialect 3, but it brings the declaration into line with the storage mode. In a dialect 3
database, newly-created columns of this type are stored as INT64, but migrated columns
are still stored as DOUBLE PRECISION. Changing the declaration avoids confusion.
48
INTERBASE 6
DOUBLE PRECISION may not be appropriate or desirable for financial applications and
others that are sensitive to rounding errors. In this case, you need to take steps to
migrate your column so that it is stored as INT64 in dialect 3. As you make this decision,
remember that INT64 does not store the same range as DOUBLE PRECISION. Check
whether you will experience data loss and whether this is acceptable.
MIGRATING NUMERIC AND DECIMAL DATATYPES
Read Do you really need to migrate your NUMERIC and DECIMAL datatypes? on
page 48 to decide whether you have columns in a dialect 1 database that would be best
stored as 64-bit integers in a dialect 3 database. If this is the case, follow these steps for
each column:
1. Migrate your database to InterBase 6 as described in Method one: in-place
migration on page 44.
2. Use the ALTER COLUMN clause of the ALTER DATABASE statement to change the
name of each affected column to something different from its original name.
If column position is going to be an issue with any of your clients, use ALTER
COLUMN to change the positions as well.
3. Create a new column for each one that you are migrating. Use the original
column names and if necessary, positions. Declare each one as a DECIMAL or
NUMERIC with precision greater than 9.
4. Use UPDATE to copy the data from each old column to its corresponding new
column:
UPDATE tablename
SET new_col = old_col;
5. Check that your data has been successfully copied to the new columns and
drop the old columns.
the problems. Use the modified metadata file to create a new dialect 3 database and use
an application to transfer data from the old database to the new.
49
1. If you have not migrated the database to version 6, dialect 1, do so first. Back
up the database again.
2. Extract the metadata from the database using isql -x. If you are migrating a
database that contains data structures created with GDML, see Migrating
older databases on page 50.
For the following steps, use a text editor to examine and modify the metadata file.
3. Search for each occurrence of the TIMESTAMP datatype. In most cases, these
were DATE datatypes in your pre-6 database. Decide whether you want it to
be TIME, TIMESTAMP, or DATE in your dialect 3 database. Change it as needed.
4. Find all instances of reserved words that are used as object names and
enclose them in double quotes to make them delimited identifiers.
5. Search for each instance of double quotes in the extracted metadata file.
These can occur in triggers, stored procedures, views, domains, exceptions,
table column defaults, and constraints. Change each double quote to a single
quote.
6. Search for each instance of a DECIMAL or NUMERIC datatype with a precision
greater than 9. Consider whether or not you want that data stored as DOUBLE
PRECISION or INT64. See Do you really need to migrate your NUMERIC and
DECIMAL datatypes? on page 48 for a discussion of issues. For occurrences
that should be stored as DOUBLE PRECISION, change the datatype to that.
Leave occurrences that you want stored as INT64 alone for now.
7. At the beginning of the file, enter SET SQL DIALECT 3. On the next line,
uncomment the CREATE DATABASE statement and edit it as necessary to create
a new database.
8. Run the metadata file as a script to create a new database.
9. Use your data transfer utility to copy data from the old database to the new
dialect 3 database. In the case of a large database, allow significant time for
this.
10. Validate the database using gfix.
11. At this point, DECIMAL and NUMERIC columns with a precision greater than 9
are still stored as DOUBLE PRECISION. To store the data as INT64, follow the
steps in Migrating NUMERIC and DECIMAL datatypes on page 48.
50
INTERBASE 6
MIGRATING CLIENTS
Migrating clients
To migrate an older client application to InterBase 6, install the InterBase 6 client onto
the platform where the client application resides. An InterBase server then recognizes
that client as a version 6 dialect 1 client.
It is good practice to recompile and relink the application and make note of field names,
datatype use, and so on in the new application. When you recompile, state the dialect
explicitly:
SET SQL DIALECT n;
51
IMPORTANT
If you have databases that use any of the new version 6 keywords as object identifiers
and you are not migrating those databases to dialect 3, you might want to not migrate
your version 5 clients. If you migrate them to version 6 dialect 1, you lose the ability to
access those keyword columns. See New keywords on page 27.
When you recompile an existing gpre client, you must recompile it with the
gpre -sql_dialect n switch.
There are several paths that permit you to create dialect 3 clients that access all new
InterBase 6 features:
In Delphi 5, make calls to functions in the new InterBase Express (IBX) package. Because
the Delphi 5 beta includes InterBase 5, it ships with a version of IBX that does not include
calls to the new InterBase 6 Services, Install, and Licensing APIs.
To write embedded SQL applications that address all InterBase 6 dialect 3 functionality,
compile them using gpre -sql_dialect 3.
Client
How to migrate
GPRE
TABLE 3.7
52
BDE
InterClient
INTERBASE 6
If you have any schemas defined that have a source database replicating to more than
one target (within the same schema), then you should run the Create System Objects
command for each of those source databases. In such schemas, more than one entry is
placed in the log for any row modified. This does not cause any data errors, but does
cause some changes to be replicated more than once.
Note Do not run the Remove System Objects command, as this will empty the REPL_LOG
table.
If you have been using older licenses purchased from Synectics Software, those licenses
will not work with InterBase 6. You must use the version of IBReplicator for Opensource
InterBase, or buy new licenses from Borland Software Corporation for use with the
version of IBReplicator for Borland InterBase (the certified commercial version of
InterBase).
53
54
INTERBASE 6
___________________________________________________
Algorithms Explained By Ankit Fadia ankit@bol.net.in
<mailto:ankit@bol.net.in>
___________________________________________________
Encryption has become a part and parcel of our lives and we have
accepted the fact that data is going to encrypted and decrypted at
various stages. However, there is not a single encryption algorithm
followed everywhere. There are a number of algorithms existing, and I
feel there is a need to understand how they work. So this text
explains a number of popular encryption algorithms and makes you look
at them as mathematical formulas.
Data Encryption Standard or DES
The U.S government in 1977 adopted the Data Encryption Standard
(DES) algorithm. According to its developer the DES algorithm is:
It is a block cipher system which transforms 64-bit data blocks under
a 56-bit secret key under a 56-bit secret key, by means of permutation
and substitution.
Now, this tutorial will guide you through the various steps of the DES
encryption algorithm making you more confident in dealing with DES
encryption.
The following is a step by step guide to the DES algorithm, which was
originally written by Matthew Fischer and has been edited by me-:
1.) Firstly, we need to process the key.
1.1 Get a 64-bit key from the user. (Every 8th bit is considered a
parity bit. For a key to have correct parity, each byte should contain an
odd number of "1" bits.)
1.2 Calculate the key schedule.
1.2.1 Perform the following permutation on the 64-bit key. (The
parity bits are discarded, reducing the key to 56 bits. Bit 1 of the
permuted block is bit 57 of the original key, bit 2 is bit 49, and so on
with bit
56 being bit 4 of the original key.)
Permuted Choice 1 (PC-1)
57 49 41 33 25 17 9
1 58 50 42 34 26 18
10 2 59 51 43 35 27
19 11 3 60 52 44 36
63 55 47 39 31 23 15
7 62 54 46 38 30 22
14 6 61 53 45 37 29
21 13 5 28 20 12 4
1.2.2 Split the permuted key into two halves. The first 28 bits are
called C[0] and the last 28 bits are called D[0].
1.2.3
1.2.3.1 Perform one or two circular left shifts on both C[i-1] and
D[i-1] to get C[i] and D[i], respectively. The number of shifts per
iteration are given in the table below.
Iteration #
Left Shifts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1 1 2 2 2 2 2 2 1 2 2 2 2 2 2 1
46 42 50 36 29 32
1.2.3.3 Loop back to 1.2.3.1 until K[16] has been calculated.
2 Process a 64-bit data block.
2.1 Get a 64-bit data block. If the block is shorter than 64 bits, it
should be padded as appropriate for the application.
2.2 Perform the following permutation on the data block.
Initial Permutation (IP)
58
60
62
64
57
59
61
63
50
52
54
56
49
51
53
55
42
44
46
48
41
43
45
47
34
36
38
40
33
35
37
39
26
28
30
32
25
27
29
31
18
20
22
24
17
19
21
23
10
12
14
16
9
11
13
15
2
4
6
8
1
3
5
7
2.3 Split the block into two halves. The first 32 bits are called L[0],
and the last 32 bits are called R[0].
2.4 Apply the 16 subkeys to the data block. Start with i = 1.
2.4.1 Expand the 32-bit R[i-1] into 48 bits according to the bitselection function below.
Expansion (E)
32
4
8
12
16
20
1 2 3 4 5
5 6 7 8 9
9 10 11 12 13
13 14 15 16 17
17 18 19 20 21
21 22 23 24 25
24 25 26 27 28 29
28 29 30 31 32 1
2.4.2 Exclusive-or E(R[i-1]) with K[i].
2.4.3 Break E(R[i-1]) xor K[i] into eight 6-bit blocks. Bits 1-6 are
B[1], bits 7-12 are B[2], and so on with bits 43-48 being B[8].
2.4.4 Substitute the values found in the S-boxes for all B[j]. Start
with j = 1. All values in the S-boxes should be considered 4 bits wide.
2.4.4.1 Take the 1st and 6th bits of B[j] together as a 2-bit value
(call it m) indicating the row in S[j] to look in for the substitution.
2.4.4.2 Take the 2nd through 5th bits of B[j] together as a 4-bit
value (call it n) indicating the column in S[j] to find the substitution.
2.4.4.3 Replace B[j] with S[j][m][n].
Substitution Box 1 (S[1])
14 4 13
0 15 7
4 1 14
15 12 8
1 2
4 14
8 13
2 4
15 11 8 3 10 6 12 5 9
2 13 1 10 6 12 11 9 5
6 2 11 15 12 9 7 3 10
9 1 7 5 11 3 14 10 0
0 7
3 8
5 0
6 13
S[2]
15 1
3 13
0 14
13 8
8 14 6 11
4 7 15 2
7 11 10 4
10 1 3 15
3 4 9
8 14 12
13 1 5
4 2 11
7
0
8
6
2 13 12
1 10 6
12 6 9
7 12 0
0
9
3
5
5 10
11 5
2 15
14 9
S[3]
10 0 9 14 6 3 15 5 1 13 12 7 11 4 2 8
13 7 0 9 3 4 6 10 2 8 5 14 12 11 15 1
13 6 4 9 8 15 3 0 11 1 2 12 5 10 14 7
1 10 13 0 6 9 8 7 4 15 14 3 11 5 2 12
S[4]
7 13
13 8
10 6
3 15
14
11
9
0
3 0
5 6
0 12
6 10
6 9 10
15 0 3
11 7 13
1 13 8
1
4
15
9
2
7
1
4
8 5 11 12 4 15
2 12 1 10 14 9
3 14 5 2 8 4
5 11 12 7 2 14
S[5]
2 12 4 1 7 10 11 6 8
14 11 2 12 4 7 13 1 5
4 2 1 11 10 13 7 8 15
11 8 12 7 1 14 2 13 6
5 3 15 13
0 15 10 3
9 12 5 6
15 0 9 10
0 14 9
9 8 6
3 0 14
4 5 3
S[6]
12 1 10 15
10 15 4 2
9 14 15 5
4 3 2 12
9 2 6 8
7 12 9 5
2 8 12 3
9 5 15 10
0 13 3 4 14 7 5 11
6 1 13 14 0 11 3 8
7 0 4 10 1 13 11 6
11 14 1 7 6 0 8 13
S[7]
4 11 2 14
13 0 11 7
1 4 11 13
6 11 13 8
15
4
12
1
0 8 13 3 12
9 1 10 14 3
3 7 14 10 15
4 10 7 9 5
9 7 5 10
5 12 2 15
6 8 0 5
0 15 14 2
6 1
8 6
9 2
3 12
S[8]
13 2 8
1 15 13
7 11 4
2 1 14
4
8
1
7
6 15 11 1
10 3 7 4
9 12 14 2
4 10 8 13
10
12
0
15
9 3 14
5 6 11
6 10 13
12 9 0
5 0 12 7
0 14 9 2
15 3 5 8
3 5 6 11
2.4.4.4 Loop back to 2.4.4.1 until all 8 blocks have been replaced.
8
7
6
5
4
3
2
1
48
47
46
45
44
43
42
41
16 56 24 64 32
15 55 23 63 31
14 54 22 62 30
13 53 21 61 29
12 52 20 60 28
11 51 19 59 27
10 50 18 58 26
9 49 17 57 25
This has been a description of how to use the DES algorithm to encrypt
one 64-bit block. To decrypt, use the same process, but just use the
keys K[i] in reverse order. That is, instead of applying K[1] for the
first
iteration, apply K[16], and then K[15] for the second, on down to K[1].
Summaries:
Key schedule:
C[0]D[0] = PC1(key)
for 1 <= i <= 16
C[i] = LS[i](C[i-1])
D[i] = LS[i](D[i-1])
K[i] = PC2(C[i]D[i])
Encipherment:
L[0]R[0] = IP(plain block)
for 1 <= i <= 16
L[i] = R[i-1]
R[i] = L[i-1] xor f(R[i-1], K[i])
cipher block = FP(R[16]L[16])
Decipherment:
R[16]L[16] = IP(cipher block)
for 1 <= i <= 16
R[i-1] = L[i]
L[i-1] = R[i] xor f(L[i], K[i])
plain block = FP(L[0]R[0])
To encrypt or decrypt more than 64 bits there are four official modes
(defined in FIPS PUB 81). One is to go through the above-described
process for each block in succession. This is called Electronic Codebook
(ECB) mode. A stronger method is to exclusive-or each plaintext block
with the preceding ciphertext block prior to encryption. (The first block
is exclusive-or'ed with a secret 64-bit initialization vector (IV).) This is
called Cipher Block Chaining (CBC) mode. The other two modes are
Output Feedback (OFB) and Cipher Feedback (CFB).
When it comes to padding the data block, there are several options.
One is to simply append zeros. Two suggested by FIPS PUB 81 are, if
the data is binary data, fill up the block with bits that are the opposite
of the last bit of data, or, if the data is ASCII data, fill up the block
with random bytes and put the ASCII character for the number of pad
bytes in the last byte of the block. Another technique is to pad the
block with random bytes and in the last 3 bits store the original number
of data bytes.
The DES algorithm can also be used to calculate checksums up to 64
bits long (see FIPS PUB 113). If the number of data bits to be check
summed is not a multiple of 64, the last data block should be padded
with zeros. If the data is ASCII data, the first bit of each byte
should be set to 0. The data is then encrypted in CBC mode with IV =
0. The leftmost n bits (where 16 <= n <= 64, and n is a multiple of 8)
of the final ciphertext block are an n-bit checksum.
Wow, that was one heck of a paper on DES. That would be all you need
to implement DES. Well, if you still have not understood how the DES
algorithm is implemented, then I suggest you go through the following C
program:
#include <stdio.h>
static int keyout[17][48];
void des_init(),lshift(),cypher(),des_encrypt(),des_descrypt();
void des_init(unsigned char *key){
unsigned char c[28],d[28];
static int pc1[56] = {57,49,41,33,25,17,9,
01,58,50,42,34,26,18,
10,02,59,51,43,35,27,
19,11,03,60,52,44,36,
63,55,47,39,31,23,15,
07,62,54,46,38,30,22,
14,06,61,53,45,37,29,
21,13,05,28,20,12,04};
static int pc2[48] = {14,17,11,24,1,5,
3,28,15,6,21,10,
23,19,12,4,26,8,
16,7,27,20,13,2,
41,52,31,37,47,55,
30,40,51,45,33,48,
44,49,39,56,34,53,
46,42,50,36,29,32};
static int nls[17] = {
0,1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1};
static int cd[56],keyb[64];
static int cnt,n=0;
register int i,j;
for(i=0;i<8;i++) /*Read in key*/
for(j=0;j<8;j++) keyb[n++]=(key[i]>>j&0x01);
for(i=0;i<56;i++) /*Permuted choice 1*/
cd[i]=keyb[pc1[1]-1];
for(i=0;i<28;i++){
c[i]=cd[i];
d[i]=cd[i+28];
}
for(cnt=1;cnt<=16;cnt++){
for(i=0;i<nls[cnt];i++){
lshift(c); lshift(d);
}
for(i=0;i<28;i++){
cd[i]=c[i];
cd[i+28]=d[i];
}
for(i=0;i<48;i++) /*Permuted Choice 2*/
keyout[cnt][i]=cd[pc2[i]-1];
}
}
static void lshift(unsigned char shft[]){
register int temp,i;
temp=shft[0];
for(i=0;i<27;i++) shft[i]=shft[i+1];
shft[27]=temp;
}
static void cypher(int *r, int cnt, int *fout){
static int expand[48],b[8][6],sout[8],pin[48];
4,3,2,12,9,5,15,10,11,14,1,7,6,0,8,13,
4,11,2,14,15,0,8,13,3,12,9,7,5,10,6,1,/*s7*/
13,0,11,7,4,9,1,10,14,3,5,12,2,15,8,6,
1,4,11,13,12,3,7,14,10,15,6,8,0,5,9,2,
6,11,13,8,1,4,10,7,9,5,0,15,14,2,3,12,
13,2,8,4,6,15,11,1,10,9,3,14,5,0,12,7, /*s8*/
1,15,13,8,10,3,7,4,12,5,6,11,0,14,9,2,
7,11,4,1,9,12,14,2,0,6,10,13,15,3,5,8,
2,1,14,7,4,10,8,13,15,12,9,0,3,5,6,11
};
for(i=0;i<48;i++) expand[i]=r[e[i]-1]; /*Expansion Function*/
for(i=n=0;i<8;i++) {
for(j=0;j<6;j++,n++) b[i][j]=expand[n]^keyout[cnt][n];
}
/*Selection functions*/
for(scnt=n=0;scnt<8;scnt++){
row=(b[scnt][0]<<1)+b[scnt][5];
col=(b[scnt][1]<<3)+(b[scnt][2]<<2)+(b[scnt][3]<<1)+b[scnt][4];
sout[scnt]=s[scnt][(row<<4)+col];
for(i=3;i>=0;i--){
pin[n]=sout[scnt]>>i;
sout[scnt]=sout[scnt]-(pin[n++]<<i);
}
}
for(i=0;i<32;i++) fout[i]=pin[p[i]-1]; /*Permutation Function*/
}
static int p[64] = {58,50,42,34,26,18,10,2,
60,52,44,36,28,20,12,4,
62,54,46,38,30,22,14,6,
64,56,48,40,32,24,16,8,
5 = {58,50,42,34,26,18,10,2,
60,52,44,36,28,20,12,4,
62,54,46,38,30,22,14,6,
64,56,48,40,32,24,16,8,
57,49,41,33,25,17,9,1,
59,51,43,35,27,19,11,3,
61,53,45,37,29,21,13,5,
63,55,47,39,31,23,15,7};
if((in=fopen(argv[2],"rb"))==NULL){
fprintf(stderr,"\r\nCould not open input file: %s",argv[2]);
return 2;
}
if((out=fopen(argv[3],"wb"))==NULL){
fprintf(stderr,"\r\nCould not open output file: %s",argv[3]);
return 3;
}
if(argv[1][0]=='e'){
while ((n=fread(data,1,8,in)) >0){
des_encrypt(data);
printf("data enctyted");
if(fwrite(data,1,8,out) < 8){
fprintf(stderr,"\r\nError writing to output file\r\n");
return(3);
}
}
}
if(argv[1][0]=='d'){
while ((n=fread(data,1,8,in)) >0){
des_decrypt(data);
if(fwrite(data,1,8,out) < 8){
fprintf(stderr,"\r\nError writing to output file\r\n");
return(3);
}
}
}
fclose(in); fclose(out);
return 0;
}ntf(stderr,"\r\nError writing to output file\r\n");
return(3);
}
}
}
fclose(in); fclose(out);
return 0;
}
The RSA Encryption Algorithm
PERL:
#
# -d (decrypt)
# or -e (encrypt)
#
# $k is exponent, $n is modulus; $k and $n in hex
#
# use of -s was contributed by Jeff Friedl, a cool perl hacker
#
# the $e-$d (grok that? awesome hack by Jeff also) checks for -d or
-e:
#
# when perl -s sets $x for -x so that means $d is set for -d, $e for
-e
# if they are both set 1-1 = 0 so it fails if neither are set it fails
# and if either one is set we're ok! This is to get around using | ,
# as | has higher precedence than & things group wrongly.
#
$e-$d&(($k,$n)=@ARGV)==2||die"$0 -d|-e key mod <in >out\n";
#
# $v will be the digits of output per block, $w the digits of input per
block.
# If encrypting need to reduce $w so input is guaranteed to be less
than
# modulus; for decrypting reduce $v to match.
#
# blocks are based on modulus size in hex digits rounded up to nearest
even
# length (~1&1+length$n) so that things will unpack properly
#
$v=$w=1+length$n&~1;
$v-=$d*2:$w-=$e*2;
#
# Make $_ be the exponent $k as a binary bit string
#
# Add a leading 0 to make length of $k be even so that it will fill
# Bytes when packed as 2 digits per byte
#
$_=unpack('B*',pack('H*',1&length$k?"0$k":$k));
#
# strip leading 0's from $_
#
s/^0+//;
#
# Turn every 0 into "d*ln%", every 1 into "d*ln%lm*ln%". These are dc
codes
# which construct an exponentiation algorithm for that exponent.
# "d*ln%" is duplicate, square, load n, modulus; e.g. square the number
# on the stack, mod n. "d*ln%lm*ln%" does this then, load m, multiply,
# load n, modulus; e.g. then multiply by m mod n. This is the square
and
# multiply algorithm for modular exponentiation.
#
# (Kudos to Hal for shortened this one by 4 chars)
#
s/1/0lM*ln%/g;
s/0/d*ln%/g;
#
# Encryption/decryption loop. Read $w/2 bytes of data to $m.
#
while(read(STDIN,$m,$w/2)){
#
# Turn data into equivalent hex digits in $m
#
$m=unpack("H$w",$m);
#
# Run dc: 16 bit radix for input and output; $m into dc register "M";
# $n into dc register "n"; execute $_, the exponentiation program
above.
# "\U...\E" forces upper case on the hex digits as dc requires.
# Put the result in $e.
#
$a=`echo 16oOi\U$m SM$n\Esn1$_ p|dc`;
#
# Pad the result with leading 0's to $v digits, pack to raw data and
output.
#
print pack("H$v",'0'x($v+1-length$a).$a);
}
Blowfish
Blowfish is yet another popular encryption algorithm which is based on:
The following C program demonstrates the implementation of the
Blowfish encryption algorithm:
/*********************blowfish.h********************/
/* $Id: blowfish.h,v 1.3 1995/01/23 12:38:02 pr Exp pr $*/
#define MAXKEYBYTES 56 /* 448 bits */
#define bf_N 16
#define noErr 0
#define DATAERROR -1
#define KEYBYTES 8
#define subkeyfilename "Blowfish.dat"
#define UWORD_32bits unsigned long
#define UWORD_16bits unsigned short
#define UBYTE_08bits unsigned char
/* choose a byte order for your hardware */
/* ABCD - big endian - motorola */
#ifdef ORDER_ABCD
union aword {
UWORD_32bits word;
UBYTE_08bits byte [4];
struct {
unsigned int byte0:8;
unsigned int byte1:8;
unsigned int byte2:8;
unsigned int byte3:8;
} w;
};
#endif /* ORDER_ABCD */
/* DCBA - little endian - intel */
#ifdef ORDER_DCBA
union aword {
UWORD_32bits word;
UBYTE_08bits byte [4];
struct {
inline
void Blowfish_encipher(UWORD_32bits *xl, UWORD_32bits *xr)
{
union aword Xl;
union aword Xr;
Xl.word = *xl;
Xr.word = *xr;
Xl.word ^= bf_P[0];
ROUND (Xr, Xl, 1); ROUND (Xl, Xr, 2);
ROUND (Xr, Xl, 3); ROUND (Xl, Xr, 4);
ROUND (Xr, Xl, 5); ROUND (Xl, Xr, 6);
ROUND (Xr, Xl, 7); ROUND (Xl, Xr, 8);
ROUND (Xr, Xl, 9); ROUND (Xl, Xr, 10);
ROUND (Xr, Xl, 11); ROUND (Xl, Xr, 12);
ROUND (Xr, Xl, 13); ROUND (Xl, Xr, 14);
ROUND (Xr, Xl, 15); ROUND (Xl, Xr, 16);
Xr.word ^= bf_P[17];
*xr = Xl.word;
*xl = Xr.word;
}
void Blowfish_decipher(UWORD_32bits *xl, UWORD_32bits *xr)
{
union aword Xl;
union aword Xr;
Xl = *xl;
Xr = *xr;
Xl.word ^= bf_P[17];
ROUND (Xr, Xl, 16); ROUND (Xl, Xr, 15);
ROUND (Xr, Xl, 14); ROUND (Xl, Xr, 13);
ROUND (Xr, Xl, 12); ROUND (Xl, Xr, 11);
ROUND (Xr, Xl, 10); ROUND (Xl, Xr, 9);
ROUND (Xr, Xl, 8); ROUND (Xl, Xr, 7);
ROUND (Xr, Xl, 6); ROUND (Xl, Xr, 5);
ROUND (Xr, Xl, 4); ROUND (Xl, Xr, 3);
ROUND (Xr, Xl, 2); ROUND (Xl, Xr, 1);
Xr.word ^= bf_P[0];
*xl = Xr.word;
*xr = Xl.word;
}
/* FIXME: Blowfish_Initialize() ??? */
short InitializeBlowfish(UBYTE_08bits key[], short keybytes)
{
short i; /* FIXME: unsigned int, char? */
short j; /* FIXME: unsigned int, char? */
UWORD_32bits data;
UWORD_32bits datal;
UWORD_32bits datar;
union aword temp;
/* fprintf (stderr, "0x%x 0x%x ", bf_P[0], bf_P[1]); /* DEBUG */
/* fprintf (stderr, "%d %d\n", bf_P[0], bf_P[1]); /* DEBUG */
j = 0;
for (i = 0; i < bf_N + 2; ++i) {
temp.word = 0;
temp.w.byte0 = key[j];
temp.w.byte1 = key[(j+1)%keybytes];
temp.w.byte2 = key[(j+2)%keybytes];
temp.w.byte3 = key[(j+3)%keybytes];
data = temp.word;
bf_P[i] = bf_P[i] ^ data;
j = (j + 4) % keybytes;
}
datal = 0x00000000;
datar = 0x00000000;
for (i = 0; i < bf_N + 2; i += 2) {
Blowfish_encipher(&datal, &datar);
bf_P[i] = datal;
bf_P[i + 1] = datar;
}
for (i = 0; i < 4; ++i) {
for (j = 0; j < 256; j += 2) {
Blowfish_encipher(&datal, &datar);
bf_S[i][j] = datal;
bf_S[i][j + 1] = datar;
}
}
return 0;
}
=============== bf_tab.h ==============
/* bf_tab.h: Blowfish P-box and S-box tables */
static UWORD_32bits bf_P[bf_N + 2] = {
0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,
0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89,
0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917,
0x9216d5d9, 0x8979fb1b,
};
static UWORD_32bits bf_S[4][256] = {
0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,
0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99,
0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16,
0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e,
0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee,
0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,
0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef,
0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e,
0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,
0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440,
0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce,
0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,
0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e,
0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677,
0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,
0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032,
0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88,
0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,
0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e,
0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0,
0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3,
0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98,
0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88,
0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,
0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6,
0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d,
0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,
Contents
Disclaimer1
Introduction..2
Getting Started...3
T ips & Secrets................4
Choosing your target audience...5
Downloading, crypting, binding, and making the torrent6
Uploading your torrent...............8
Conclusion....9
Disclaimer
This eBook is provided as-is with no representations or warranties, either express or
implied, including, but not limited to, implied warranties of merchantability, fitness for a
particular purpose and noninfringement. You assume complete responsibility and risk
for use of any of the information made available in this book and any and all related or
advertised services.
Some jurisdictions do not allow the exclusion of implied warranties; so the above
exclusion may not apply to you.
The author of this book, its agents, representatives and employees are neither responsible
nor liable for any direct, indirect, incidental, consequential, special, exemplary, punitive,
or other damages arising out of or relating in any way to this book and/or its content or
information contained within it.
By using the information made available in this book you agree to take full responsibility
of your actions. You also agree to use the fore mentioned information according to the
laws and regulations of your jurisdiction.
This book, including any part of its content, must not be produced, reproduced, copied or
passed on without the prior written consent of the author. The book ships with
absolutely no Private Label Rights or Master Reless Rights and is licensed for personal use
by the person whose name appears on the receipt.
Introduction
Greetings!
F irst of all, let me say that Im really glad you decided to buy this detailed book about
spreading the ultimate way.
This is the first eBook, about spreading, which is so in -depth and detailed, and Im sure
you will be able to get at least 150 bots in your first day (Yes, only 150, because you
have to keep spreading to get the hang of it). This method is the one I use personally,
and get about 600 1000 downloads per 3 days!
I will show you step by step how to make a popular torrent, and where to upload it
first, then when it becomes a bit more popular (when you have some seeds) what to do
with it, and how to make it trusted on popular torrent sites like ThePirateBay. And the
beauty of this eBook is that I am doing everything in these steps as I write this ver y
sentence you are reading, so I will provide screenshots and other stuff to make this as
easy as possible. I started writing this eBook from the moment I began to set-up a
torrent for DDoSeR 3.6
All the secrets of spreading, is revealed in this book!
After reading this eBook I guarantee you that you will have your own update / install
service or spreading service, and if you dont have that, you are already too busy
watching your downloads increase hour by hour.
Getting started
Ok, as you may have guessed, we need a torrent client. A popular and easy to use one is
Torrent. You can download it from: http://www.utorrent.com. Or you can use
your favorite torrent client, but this tutorial I will be using Torrent.
When you have downloaded Torrent, you are ready to go. First of all, we need a popular
program, hopefully includes a patch / key generator (to bind our file with). There is many
ways to find a popular program, but the most common one is top 100 at ThePirateBay
(http://www.thepiratebay.org /top/300 ). If you have a fast upload speed, you can try big
torrents (which make the torrent look more legit), and if you have a slow connection with a
slow upload speed, try some smaller torrents, or consider buying a seedbox, which is
pretty cheap these days.
Put yourself in the downloaders shoes when it comes to spreading, would you download
a Photoshop crack at 45 kB, with no PE info, no leechers/seeds and the default .exe icon?
The answer is no, you would be afraid, because it looks really suspicious. But if it was a 372
megabyte Photoshop installer (I like to include a installer for the program I am making the
torrent for, it looks more legit, and I have tried to make a torrent with the same crack, just
that I excluded the installer, and got 460 more install because of the installer, so the
installer plays a big role) + a crack with some nice icon and info about the creator (PE Info) I
would run it (remember, think as the downloaders, always!)
Now lets move on to the tips & secrets.
There is always at least one guy that uploads your file to virustotal. And virustotal
distribute your sample to antivirus companies and get it detected faster. But if your file
is
30 megabyte, then they wont be able to upload it to virustotal due to the upload limit (20
megabyte)
And there will always be at least one smart guy that will look for outgoing connections
or such, so you need more time to get leechers, so make it not too big, and not too small.
30 megabyte is always enough.
3. You need history, for successful torrents, so upload a few eBooks and movies on
your account before uploading your programs.
4. The .exe extension is sometimes not suit for the torrent; lets say you want to send to
somebody as a picture. An executable will be just dumb to send, so you can rename
it to something.scr. Scr stands for screensaver, and functions the same way as an .exe
It has 952 seeders, and 45 leechers, which is a really good (and popular) torrent. Why I
chose this torrent have its reasons:
antivirus installed.
It has a key generator included, which is also good for us, so we can bind it.
T ip: I usually bind my program with the installer too, so if somebody for some reason
just downloads it for the installer, will get your program too.
Now I have downloaded the torrent, let s do the crypting & binding.
This is what I got so far, 5 files: installer, key generator, readme, screenshot of key
generator, and finally our program. What we want to do is bind the key generator with
our program. For this you have to use a crypter with b uilt-in binder, or a crypter and a
binder. There is a good and free one called Fly Crypter by BUNNN, you can get it from
http://hackh ound.org /forum/index.php?topic=13513.0 but you have to decrypt it
though. Now I am binding and crypting it using Fly Crypter:
Now I put everything back in their original folders, like it was when I downloaded it.
Open up Torrent, and click the magic wand tool:
Click Add Directory (or file, if you use a zip archive) and browse to your file/folder. Put
in the trackers you want to use (a tracker list go to: http ://pastebin.mozi lla.org /697683
) and check Start seeding, as below:
Now after you have saved your torrent, you should have something like this:
Conclusion
Its time to finish this book, so all I have to say is good luck, and have a happy spreading!
You will find this book really helpful when you are sitting there, staring at your torrent with
1 seed and 0 leechers. Using the information provided within this book will guarantee
you that you will become a professional spreader in no time. So what are you waiting for?
If you begin faster, you finish faster, and practice makes master.
Happy spreading.
THE END
Now go spread your torrent! :-)
InterBase 6
Getting Started
Borland
SOFTWARE CORPORATION
Borland Software Corporation may have patents and/or pending patent applications covering subject matter in
this document. The furnishing of this document does not convey any license to these patents.
Copyright 2001 BorlandSoftware Corporation. All rights reserved. All InterBase and Borland products are
trademarks or registered trademarks of BorlandSoftware Corporation. Other brand and product names are
trademarks or registered trademarks of their respective holders.
1INT0060WW21000 21006
D4
TABLE OF CONTENTS
Table of Contents
CHAPTER 1
System Requirements
Disk space requirements . . . . . . . . . . . . . . . . . . . . . . . 5
Windows system requirements . . . . . . . . . . . . . . . . . . . . 6
UNIX system requirements . . . . . . . . . . . . . . . . . . . . . . 6
Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Solaris . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Requirements for other platforms . . . . . . . . . . . . . . . . . . 6
CHAPTER 2
Installation
Installing InterBase on Windows
. . . . . . . . . . . . . . . . . .7
Migrating to InterBase 6
Migration process . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Migration Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
InterBase 6 SQL dialects . . . . . . . . . . . . . . . . . . . 20
Servers, databases, and ODS 10 . . . . . . . . . . . . . . . 20
Clients and databases . . . . . . . . . . . . . . . . . . . . . 21
iii
iv
INTERBASE 6
CHAPTER
System Requirements
Chapter1
Solaris
Operating system: Solaris 2.6 or 2.7
Memory: 32 megabytes minimum; 64 recommended for a server
Processor/Hardware Model: SPARC or UltraSPARC
C Compiler: SPARCWorks SC 4.2 C compiler
C++ Compiler: SPARCWorks SC 3.0.1. C++ compiler
Note InterBase on Solaris uses a OS-specific install utility called pkgadd. Install the Solaris
INTERBASE 6
CHAPTER
Installation
Chapter2
This chapter contains detailed instructions for installing InterBase on Windows 98/ME,
Windows NT, Windows 2000, Linux, and Solaris.
InterBase might install differently on other platforms due to operating system
requirements. Refer to installation notes included in the software package, on the media,
or on the Borland web site (http://www.borland.com/interbase) for platform-specific
installation instructions.
IMPORTANT
CHAPTER 2 INSTALLATION
Configuring InterBase
You can control many aspects of how InterBase runs, including server and database
configurations, backup and restore, and database replication. See the Operations Guide
for information on these topics.
Logging on
To attach to any database, you must have a user name and password. When you first
install InterBase, there is one user defined: SYSDBA. The password is masterkey. SYSDBA
has special privileges that override normal SQL security, and there are database
maintenance tasks that only SYSDBA can perform. You should change the SYSDBA
password immediately after installing InterBase.
Use IBConsole or the gsec utility to change a password and create additional users. For
more information see the IBConsole online help or the Operations Guide.
INTERBASE 6
INSTALLATION ON UNIX
The InterBase Server, Guardian, and InterServer processes must not be running when you
uninstall the software. To stop one of these applications, right-click its icon in the Task
Tray and selecting Shutdown. To stop one of these services (Windows NT/2000), use the
Control Panel | Services applet.
Uninstall never removes isc4.gdb or files created by the server process, including
interbase.log, host.evn, host.lck.
The Windows InterBase installation allows you to choose between performing a complete
install or selecting individual components. If you choose to install components at
different times, the uninstall program removes only the components selected for the last
install.
The ODBC driver or the ODBC driver manager must be removed manually; there is no
uninstall available through the Windows control panel.
Installation on UNIX
This section provides instructions for installing InterBase 6 on Solaris and Linux. For
platform-specific instruction on installing InterBase on other UNIX brands, see the
InterBase web site (http://www.borland.com/interbase).
By default, InterBase files are installed in /opt/interbase. On the Solaris platform, the
install program still creates a symbolic link from /usr/interbase to /opt/interbase. On
Linux, there is no symbolic link from /usr/interbase to an actual install directory. You
can use the INTERBASE environment variable to change this location. See the Operations
Guide for information about setting environment variables.
CHAPTER 2 INSTALLATION
You can skip this step if you haven't customized these files in a previous installation.
Note When you use pkgrm remove InterBase V5 for Solaris, these files are
Installing on Solaris
InterBase requires Solaris versions 2.6.x. or 7. These instructions are for both server and
client installations:
10
INTERBASE 6
INSTALLATION ON UNIX
11
CHAPTER 2 INSTALLATION
##
##
##
##
##
The InterBase install script looks for the InterClient installation script on the CD-ROM,
and runs it if possible. See Uninstalling InterBase on UNIX on page 16.
Thereafter, the install script returns to pkgadd:
Installation of <interbase> was successful.
The following packages are available:
1 interbase InterBase RDBMS Software
(sparc) InterBase Version 6.0
Select package(s) you wish to process (or all to process
all packages). (default: all) [?,??,q]:
6. If you intend to run the ibserver daemon as a user other than root, create a
UNIX user account named interbase on your machine. Log in as this user
before starting the SuperServer with the ibmgr utility.
12
INTERBASE 6
INSTALLATION ON UNIX
Note We recommend that you create an interbase user account and use this account
for all database maintenance; this will make tasks such as backup and restore run much
more smoothly.
7. Execute the following command to start the InterBase Server:
# echo /usr/interbase/bin/ibmgr start forever | su interbase
This starts the SuperServer daemon (ibserver) and a guardian (ibguard) program that
keeps track of ibserver.
8. Now that the server is running, you can restore the security database with the
ones you backed up before installing InterBase 6:
# gbak r /tmp/isc4.gbak jupiter:/usr/interbase/isc4.gdb
9. To test your existing databases with InterBase 6, use gbak to restore the
backup files you created before upgrading.
Installing on Linux
For both the SuperServer and Classic versions of InterBase, default installation directories
on Linux are as follows:
/opt/interbase
executables
/usr/lib
libraries
/usr/include
header files
InterBase SuperServer for Linux requires glibc (libc6) Version 2.1. InterBase does not
work with the older Version 2.0 library.
13
CHAPTER 2 INSTALLATION
IMPORTANT
If /etc/hosts.equiv already exists on the system, then the command above will
overwrite your current file, and all the information that was in it will be lost.
6. To test SuperServer installations do the following:
- Make sure that a search path (environment variable PATH) contains
/opt/interbase/bin.
- Start the ibserver in /opt/interbase/bin with:
ibmgr -start -forever -user SYSDBA -password masterkey
Note The Classic architecture permits application processes to perform I/O on database
files directly, whereas SuperServer requires applications to request the ibserver I/O
operations by proxy, using a network method. The local access method is only usable by
applications that run on the same host as the database. Thus we need to test both local
and remote access for Classic servers.
- To test local access, start isql locally and connect to the example database:
isql /opt/interbase/examples/employee.gdb
- To test remote access, start the isql utility and connect to the example database:
isql localhost:/opt/interbase/examples/employee.gdb
14
INTERBASE 6
INSTALLATION ON UNIX
IMPORTANT
If /etc/hosts.equiv already exists on the system, then the command above will
overwrite your current file, and all the information that was in it will be lost.
7. To test SuperServer installations do the following:
- Make sure that a search path (environment variable PATH) contains
/opt/interbase/bin.
- Start the ibserver in /opt/interbase/bin with:
ibmgr -start -forever -user SYSDBA -password masterkey
Note The Classic architecture permits application processes to perform I/O on database
files directly, whereas SuperServer requires applications to request the ibserver I/O
operations by proxy, using a network method. The local access method is only usable by
applications that run on the same host as the database. Thus we need to test both local
and remote access for Classic servers.
- To test local access, start isql locally and connect to the example database:
isql /opt/interbase/examples/employee.gdb
- To test remote access, start the isql utility and connect to the example database:
isql localhost:/opt/interbase/examples/employee.gdb
15
CHAPTER 2 INSTALLATION
On Linux, if InterBase was installed using RPM, use RPM to uninstall InterBase, for
example:
rpm -e NameofInterBasePackage
On Linux, if InterBase was installed using a tar file, follow these steps to uninstall
InterBase.
SuperServer:
1. If ibserver is running, use the following command to shut down the server:
ibmgr -shut -pass password
Classic:
1. If gds_lock_mgr is running, use the following command to shut down the
lock manager:
gds_drop -s
16
INTERBASE 6
4. Remove all the InterBase files from the /usr/lib, /usr/local/sbin, and
/usr/include directories; see /tmp/ibinstall.log for the list of files.
5. Remove the InterBase entry from /etc/inetd.conf; see /tmp/ibinstall.log for
the InterBase entry.
6. Find the inetd process id in /var/run/inetd.pid and send the signal SIGHUP
to the inetd process to tell it to re-read the configuration file and not listen
on port 3050 (gds_db) any more.
7. Remove the InterBase entry from /etc/services; see /tmp/ibinstall.log for
the InterBase entry.
Full-text searching
The document set has been indexed for full-text searching. If you are viewing the
documents using Acrobat Reader With Search, you can enter a query and receive a list of
hits from all five books in the InterBase document set.
To use full-text searching, click the
button and search for a word or phrase. Acrobat
Reader returns a list of books that contain the phrase. Choose the book you want to start
looking in to display the first instance. You then use the
and
buttons to step
forward and back through instances of your search target. Reader moves from one book
to the next. To go to a different book at will, click the
button to display the found
list.
17
CHAPTER 2 INSTALLATION
On UNIX and Linux, always open documents using an absolute pathname to the PDF
file, to make Acrobat Reader With Search associate the index with the PDF document
correctly.
Links
The PDF documentation set contains many hypertext links that take you to referenced
points in the document with a single click. In addition, the Table of Contents and Index
entries are hypertext links and therefore are clickable. Throughout the document set,
clickable links appear bold and green.
You can install Acrobat Reader 3.01 With Search by choosing Install Adobe Acrobat
Reader 3.0 from the InterBase Launcher. You can also install it directly by running
setup.exe from the /Adobe directory of the InterBase CD-ROM.
On UNIX
The InterBase CD-ROM includes Acrobat Reader With Search for both the UNIX platform
and for Windows. The files are in subdirectories of the /Adobe directory on the InterBase
CD-ROM. Read instguid.txt in the /Adobe/UNIX platform directory for UNIX installation
instructions. To install on a Windows platform, run setup.exe in the /Adobe/Windows
directory.
From the Adobe website
If you dont have the InterBase CD-ROM handy, you can get Acrobat Reader for free from
the Adobe website. Its at http://www.adobe.com/products/acrobat. Check the box next to
Include option for searching PDF files... to download Acrobat Reader With Search, not
the plain Acrobat Reader.
18
INTERBASE 6
CHAPTER
Migrating to InterBase 6
Chapter3
This chapter describes how to plan and execute a smooth migration from earlier versions
of InterBase to InterBase 6. Topics in this chapter include:
Migration paths
Migration process
These are the steps you must take to migrate servers, databases, and clients. Each is
discussed in detail in later sections:
19
Client migration
1. Identify the clients that must be upgraded to InterBase 6
2. Identify areas in your application which may need upgrading
3. Install the InterBase 6 client to each machine that requires it
4. Upgrade SQL applications to SQL dialect 3
Migration Issues
Before migrating your databases, you need to learn about InterBase 6 SQL dialects and
understand their effect on servers, clients, and the use of new InterBase 6 features.
Double quote (): changed from a synonym for the single quote () to the delimiter for
an object name
DECIMAL and NUMERIC datatypes with precision greater than 9: now stored as INT64
datatypes instead of DOUBLE PRECISION
DATE, TIME, and TIMESTAMP datatypes: DATE has changed from a 64-bit quantity containing
both date and time information to a 32-bit quantity containing only date information.
TIME is a 32-bit quantity containing only time information, while TIMESTAMP is a 64-bit
quantity containing both date and time information (the same as DATE in pre-Version 6
SQL).
20
If you upgrade a server to InterBase 6, you have the option to migrate the databases that
it accesses to InterBase 6 as well.
INTERBASE 6
MIGRATION ISSUES
If you do not upgrade a server, you do not need to migrate the databases that it accesses.
InterBase 5 and older servers can access InterBase 6 databases.
Version 5 clients cannot access dialect 3 columns that are stored as INT64, TIME, or DATE.
(DECIMAL and NUMERIC columns with precision greater than 9 are stored as INT64.)
Version 5 clients cannot display new datatypes in metadata using the SHOW command, or
any equivalent.
Version 5 clients interpret the DATE datatype as TIMESTAMP, since that was the definition
of DATE prior to InterBase 6.
Version 5 clients cannot access any object named with a delimited identifiers.
Clients that use the Borland Database Engine (BDE) to access an InterBase 6.0 server are
not able to access any of the new field type regardless of the version of the InterBase
client installed.
For example, the following statement uses the new keyword word TIME:
SELECT TIME FROM atable;
This statement, when executed via a pre-InterBase 6 client returns the information as it
did in previous versions. If this same query is issued using a version 6 client, an error is
returned since TIME is now a reserved word. See page 27 for a list of new keywords.
21
Double quoted text is interpreted as a string literal. Delimited identifiers are not available.
The DATE datatype contains both time and date information and is interpreted as
TIMESTAMP; the name has changed but the meaning has not. Dialect 1 clients expect the
entire timestamp to be returned. In dialect 1, DATE and TIMESTAMP are identical.
Dialect 1 databases store DECIMAL and NUMERIC datatypes with precision greater than 9
as DOUBLE PRECISION, not INT64. In clients: The dialect 1 client expects information stored
in these datatypes to be returned as double precision; such clients cannot create database
fields to hold 64-bit integers.
An InterBase 6 server recognizes all the other InterBase 6 features in dialect 1 clients and
databases.
Dialect 2 clients
Dialect 2 is available only on the client side. It is intended for assessing possible problems
in legacy metadata that is being migrated to dialect 3. To determine where the problem
spots are when you migrate a database from dialect 1 to dialect 3, you extract the
metadata from the database, set isql to dialect 2, and then run that metadata file through
isql. isql issues warning whenever it encounters double quotes, DATE datatypes, or large
exact numerics to alert you to places where you might need to change the metadata in
order to make a successful migration to dialect 3.
To detect problem areas in the metadata of a database that you are migrating, extract the
metadata and run it through a dialect 2 client, which will report all instances of transition
features. For example:
isql -i v5metadata.sql
22
INTERBASE 6
Dialect 3 DATE datatype fields contain only date information. Dialect 3 clients expect only
date information from a field of datatype DATE.
Dialect 3 databases store DECIMAL and NUMERIC datatypes with precision greater than 9
as INT64 if and only if they are in columns that were created in dialect 3. Dialect 3 clients
expect DECIMAL and NUMERIC datatypes with precision greater than 9 to be returned as
INT64. (To learn how to migrate older data to INT64 storage, see Migrating databases to
dialect 3 on page 43 and Migrating NUMERIC and DECIMAL datatypes on page 48.)
Within an isql session or in an SQL script, you can issue this statement:
SET SQL DIALECT n
The following table shows the precedence for setting isql dialect:
Ranking
Lowest
Next lowest
Next highest
Highest
TABLE 3.1
23
If you start isql and attach to a database without specifying a dialect, isql takes on the
dialect of the database.
If you specify a dialect on the command line when you invoke isql, it retains that dialect
after connection unless explicitly changed.
When you change the dialect during a session using SET SQL DIALECT n, isql continues to
operate in that dialect until explicitly changed.
When you create a database using isql, the database is created with the dialect of the isql
client; for example, if isql has been set to dialect 1, when you create a database, it is a
dialect 1 database.
If you create a database without first specifying a dialect for the isql client or attaching to
a database, isql creates the database in dialect 3.
The statements above are true whether you are running isql as a command-line utility or
are accessing it through IBConsole, InterBases new interface.
IMPORTANT
Any InterBase 6 isql client that attaches to a version 5 database resets to dialect 1.
Start gpre with option -sql_dialect n. For example, this command sets gpre to dialect 3:
gpre -sql_dialect 3
Highest
gpre -sql_dialect n
EXEC SQL
SET SQL DIALECT n
24
INTERBASE 6
NEW FEATURES
New features
Many of the new InterBase 6 features operate without reference to dialect. Other features
are dialect-specific. These features are listed below and described in more detail in the
Release Notes and other InterBase manuals.
Read-only databases
You can make InterBase 6 databases be read-only. This permits distribution on read-only
media such as CDROMs and reduces the chance of accidental or malicious changes to
databases.
definition.
25
SQL warnings
The InterBase API function set now returns warnings and informational messages along
with error messages in the status vector.
Delimited identifiers
Identifiers can now be keywords, contain spaces, be case sensitive, and contain
non-ASCII characters. Such identifiers must be delimited by double quotes. String
constants must be delimited by single quotes.
In dialect 3, the DATE datatype holds only date information. This is a change from earlier
InterBase versions in which it stored the whole timestamp.
26
INTERBASE 6
NEW FEATURES
Dialect 3 allows the use of the TIME datatype, which hold only the time portion of the
timestamp.
New keywords
InterBase 6 introduces the following new keywords:
COLUMN
CURRENT_DATE
CURRENT_TIME
CURRENT_TIMESTAMP
DAY
EXTRACT
HOUR
MINUTE
MONTH
SECOND
TIME
TIMESTAMP
TYPE
WEEKDAY
YEAR
YEARDAY
You cannot create objects in a version 6 dialect 1 database that have any of these
keywords as object names (identifiers).
You can migrate a version 5 database that contains these keywords used as identifiers to
version 6 dialect 1 without changing the object names: a column could be named YEAR,
for instance.
Version 5 clients can access these keyword identifiers without error.
Version 6 clients cannot access keywords that are used as identifiers. In a dialect 1
database, you must change the names so that they are not keywords.
If you migrate directly to dialect 3, you can retain the names, but you must delimit them
with double quotes. To retain accessibility for older clients, put the names in all upper
case. Delimited identifiers are case sensitive.
Although TIME is a reserved word in version 6 dialect 1, you cannot use it as a datatype
because such databases guarantee datatype compatibility with version 5 clients.
In dialect 3 databases and clients, any reserved word can be used as an identifier as long
as it is delimited with double quotes.
27
Delimited identifiers
To increase compliance with the SQL 92 standard, InterBase 6 introduces delimited
identifiers. An identifier is the name of any database object; for instance a table, a
column, or a trigger. A delimited identifier is an identifier that is enclosed in double
quotes. Because the quotes delimit the boundaries of the name, the possibilities for object
names are greatly expanded from previous versions of InterBase. Object names can now:
mimic keywords
be case-sensitive
Double-quotes use
Up to and including version 5, InterBase allowed the use of either single or double quotes
around string constants. The concept of delimited identifiers did not exist. InterBase 6
operates under these rules for double quotes:
28
In version 5 and older of InterBase, string constants were delimited by either double or
single quotes. Since there was no concept of delimited identifiers, double quotes were
always interpreted as string constants.
Version 6 dialect 1 is a transition mode that behaves like older versions of InterBase with
respect to quote marks: it interprets strings within double quotes as string constants and
does not permit delimited identifiers.
Version 6 dialect 3 uses double quotes only for delimited identifiers. String constants must
be delimited by single quotes, never double.
When version 6 servers detect that the client is dialect 1, they permit client DML
statements to contain double quotes and they correctly handle these as string constants.
However, they do not permit double quotes in client DDL statements because that
metadata would not be allowed in dialect 3. Version 6 servers all insist that string
constants be delimited with single quotes when clients create new metadata.
INTERBASE 6
NEW FEATURES
In dialect 1, only TIMESTAMP is available. TIMESTAMP is the equivalent of the DATE datatype
in previous versions. When you back up an older database and restore it in version 6, all
the DATE columns and domains are automatically restored as TIMESTAMP. DATE and
TIMESTAMP datatypes are both available and both mean the same thing in dialect 1.
In dialect 3, DATE and TIME columns require only four bytes of storage, while TIMESTAMP
columns require eight bytes.
The following example shows the differences between dialect 1 and dialect 3 clients when
date information is involved.
Example
29
Example
In dialect 1:
FLD1
===========
25-JUN-1999
In dialect 3:
FLD1
=========================
1999-06-25 10:24:35.0000
Example
30
INTERBASE 6
NEW FEATURES
25-JU
In dialect 3:
Statement failed, SQLCODE = -802
arithmetic exception, numeric overflow, or string truncation
It is not possible to cast a date/time datatype to or from BLOB, SMALLINT, INTEGER, FLOAT,
DOUBLE PRECISION, NUMERIC, or DECIMAL datatypes.
For more information, refer to Using CAST() to convert dates and times in the Embedded
SQL Guide.
Table 3.2 outlines the results of casting to date/time datatypes:
31
To
Cast From
TIMESTAMP
DATE
TIME
VARCHAR(n)
See below.
CSTRING(n)
TIMESTAMP
Always succeeds
DATE
Always succeeds
Error
TIME
Error
Always succeeds
CHARACTER(n)
TABLE 3.2
result does not fit in the string variable a string truncation exception is raised. In earlier
versions, this case results in DD-Mon-YYYY HH:mm:SS.hundreds where Mon was a
3-letter English month abbreviation. Inability to fit in the string variable resulted in a
silent truncation.
Casting a string to a date now permits strings of the form:
'yyyy-mm-dd'
'yyyy:mm:dd'
'yyyy/mm/dd'
'yyyy.mm.dd'
'yyyy mm dd'
In all of the forms above, you can substitute a month name or 3-letter abbreviation in
English for the 2-digit numeric month. However, the order must always be 4-digit year,
then month, then day.
In previous versions of InterBase, you could enter date strings in a number of forms,
including ones that had only two digits for the year. Those forms are still available in
InterBase 6. If you enter a date with only two digits for the year, InterBase uses its "sliding
window" algorithm to assign a century to the years.
The following forms were available in earlier versions of InterBase and are still permitted
in InterBase 6:
'mm-dd-yy'
'mm dd yy'
'dd.mm.yy'
32
'mm-dd-yyyy'
'mm dd yyyy'
'dd.mm.yyyy'
'mm/dd/yy'
'mm:dd:yy'
'mm/dd/yyyy'
'mm:dd:yyyy'
INTERBASE 6
NEW FEATURES
If you write out the month name in English or use a 3-character English abbreviation,
you can enter either the month or the day first. In the following examples, xxx stands
for either a whole month name or a three-letter abbreviation. All of the following forms
are acceptable:
'dd-xxx-yy'
'dd xxx yy'
'dd:xxx:yy'
'dd-xxx-yyyy'
'dd xxx yyyy'
'dd:xxx:yyyy'
'xxx-dd-yy'
'xxx dd yy'
'xxx:dd:yy'
'xxx-dd-yyyy'
'xxx dd yyyy'
'xxx:dd:yyyy'
For example, the following INSERT statements all insert the date January 22, 1943:
INSERT
INSERT
INSERT
INSERT
INTO
INTO
INTO
INTO
t1
t1
t1
t1
VALUES
VALUES
VALUES
VALUES
('1943-01-22');
('01/22/1943');
('22.01.1943');
('jan 22 1943');
The following statement would enter the date January 22, 2043:
INSERT INTO t1 VALUES ('01/22/43');
TABLE 3.3
Cast From
TIMESTAMP
DATE
TIME
33
TABLE 3.4
34
Operand1
Operator Operand2
Result
DATE
DATE
Error
DATE
TIME
TIMESTAMP (concatenation)
DATE
TIMESTAMP
Error
DATE
TIME
DATE
TIMESTAMP (concatenation)
TIME
TIME
Error
TIME
TIMESTAMP
Error
TIME
TIMESTAMP
DATE
Error
TIMESTAMP
TIME
Error
TIMESTAMP
TIMESTAMP
Error
TIMESTAMP
DATE
DATE
DATE
TIME
Error
DATE
TIMESTAMP
Error
DATE
TIME
DATE
Error
TIME
TIME
TIME
TIMESTAMP
Error
INTERBASE 6
NEW FEATURES
TABLE 3.4
Operand1
Operator Operand2
Result
TIME
TIMESTAMP
DATE
Error
TIMESTAMP
TIME
Error
TIMESTAMP
TIMESTAMP
TIMESTAMP
Default clauses
CURRENT_DATE, CURRENT_TIME, and CURRENT_TIMESTAMP can be specified as the default
The value passed to the EXTRACT() expression must be DATE, TIME, or TIMESTAMP.
Extracting a part that doesnt exist in a datatype results in an error. For example:
EXTRACT (TIME FROM aTime)
35
The datatype of EXTRACT() expressions depends on the specific part being extracted:
TABLE 3.5
Extract
YEAR
SMALLINT
MONTH
SMALLINT
DAY
SMALLINT
HOUR
SMALLINT
MINUTE
SMALLINT
SECOND
DECIMAL(6,4)
WEEKDAY
SMALLINT
YEARDAY
SMALLINT
36
INTERBASE 6
NEW FEATURES
=======
5
SELECT EXTRACT (YEARDAY FROM timestamp_fld) FROM table_name;
=======
175
SELECT EXTRACT (MONTH FROM timestamp_fld) ||
'-' || EXTRACT (DAY FROM timestamp_fld) ||
'-' || EXTRACT (YEAR FROM timestamp_fld) FROM table_name;
====================
6-25-1999
When you migrate an exact numeric column to dialect 3 it is still stored as DOUBLE
PRECISION. The migration does not change the way the data is stored because INT64
cannot store the whole range that DOUBLE PRECISION can store. There is potential data
loss, so InterBase does not permit direct conversion. If you decide that you want your
data stored as INT64, you must create a new column and copy the data. Only exact
numeric columns that are created in dialect 3 are stored as INT64. The details of the
process are provided in Migrating databases to dialect 3 on page 43.
You might or might not want to change exact numeric columns to INT64 when you
migrate to dialect 3. See Do you really need to migrate your NUMERIC and DECIMAL
datatypes? on page 48 for a discussion of issues.
Dialect 3 features and changes include
37
Overflow protection. In dialect 1, if the product of two integers was bigger than 31 bits,
the product was returned modulo 232. In dialect 3, the true result is returned as a 64-bit
integer. Further, if the product, sum, difference, or quotient of two exact numeric values
is bigger than 63 bits, InterBase issues an arithmetic overflow error message and
terminates the operation. (Previous versions sometimes returned the least-significant
portion of the true result.). The stored procedure bignum below demonstrates this.
Operations involving division return an exact numeric if both operands are exact
numerics in dialect 3. When the same operation is performed in dialect 1, the result is a
DOUBLE PRECISION.
To obtain a DOUBLE PRECISION quotient of two exact numeric operands in dialect 3,
explicitly cast one of the operands to DOUBLE PRECISION before performing the division:
CREATE TABLE table 1 (n1 INTEGER, n2 INTEGER);
INSERT INTO table 1 (n1, n2) VALUES (2, 3);
SELECT n1 / n2 FROM table1;
======================
0
Similarly, to obtain a double precision value when averaging an exact numeric column,
you must cast the argument to double precision before the average is calculated:
SELECT AVG(CAST(int_col AS DOUBLE PRECISION))FROM table1;
Compiled objects
The behavior of a compiled object such as a stored procedure, trigger, check constraint,
or default value depends on the dialect setting of the client at the time the object is
compiled. Once compiled and validated by the server the object is stored as part of the
database and its behavior is constant regardless of the dialect of the client that calls it.
Example
client.
38
INTERBASE 6
NEW FEATURES
client.
Consider the following procedure:
Example
dialect 3 client.
Generators
InterBase 6 generators return a 64-bit value, and only wrap around after 264 invocations
(assuming an increment of 1), rather than after 232 as in InterBase 5. Applications should
use an ISC_INT64 variable to hold the value returned by a generator. A client using dialect
1 receives only the least significant 32 bits of the updated generator value, but the entire
64-bit value is incremented by the engine even when returning a 32-bit value to a client
that uses dialect 1. If your database was using an INTEGER field for holding generator
values, you need to recreate the field so that it can hold 64-bit integer values.
Miscellaneous issues
Resolution If you have more than 1500 elements, place the values in a temporary table
and use a SELECT subquery in place of the list elements.
39
Using isql to select from a TIMESTAMP column displays all information when client dialect
is 3.
Resolution In versions of InterBase prior to 6.0, the time portion of a timestamp
displayed only if SET TIME ON was in effect. In 6.0 client dialect 3, the time portion of the
timestamp always displays.
Older clients can still access databases that have been migrated to InterBase 6. You must
be aware, however, that they cannot access new datatypes or data stored as INT64, and
they always handle double quoted material as strings.
InterBase strongly recommends that you establish a migration testbed to check your
migration procedures before migrating production servers and databases. The testbed
does not need to be on the same platform as the production clients and servers that you
are migrating.
The migration path varies somewhat depending on whether you are replacing an existing
server or installing a new server and moving old databases there. Upgrading an existing
server costs less in money, but may cost more in time and effort. The server and all the
databases you migrate with it are unavailable during the upgrade. If you have hardware
available for a new InterBase 6 server, the migration can be done in parallel, without
interrupting service more than very briefly. This option also offers an easier return path
if problems arise with the migration.
40
INTERBASE 6
3. Shut down the version 5 server. If your current server is a Superserver, you
are not required to uninstall the server if you intend to install over it,
although uninstalling is always good practice. You cannot have multiple
versions of InterBase on the same machine. If your current server is Classic,
you must uninstall before installing InterBase 6.
4. Install the version 6 server.
Note The install does not overwrite isc4.gdb or isc4.gbk.
Note that InterBase can run only as user root or user interbase on UNIX.
6. To restore the list of valid users, follow these steps:
a. Restore isc4.gbk to isc4_old.gdb
b. Shut down the server
c. Copy isc4_old.gdb over isc4.gdb
d. Copy isc4_old.gbk over isc4.gbk
e. Restart the server
7. Delete each ODS 9 database file. Restore each database from its backup file.
This process creates InterBase 6, ODS 10, dialect 1 databases.
8. Perform a full validation of each database.
After performing these steps, you have an InterBase 6 server and InterBase 6, dialect 1
databases. See About InterBase 6, dialect 1 databases on page 43 to understand
more about these databases. See Migrating databases to dialect 3 on page 43 for a
description of how to migrate databases to dialect 3. See Migrating clients on page 51
for an introduction to client migration.
41
Note that InterBase can run only as user root or user interbase on UNIX.
4. Copy the database backup files to the new server and restore each database
from its backup file. This process creates InterBase 6, ODS 10, dialect 1
databases.
Save your backup files until your migration to dialect 3 is complete.
5. To restore the list of valid users, follow these steps:
a. Restore isc4.gbk to isc4_old.gdb
b. Shut down the server
c. Copy isc4_old.gdb over isc4.gdb
d. Copy isc4_old.gbk over isc4.gbk
e. Restart the server
6. Perform a full validation of each database on the new server.
After performing these steps, you have an InterBase 6 server and InterBase 6, dialect 1
databases. See About InterBase 6, dialect 1 databases on page 43 to understand
more about these databases. See Migrating databases to dialect 3 on page 43 for a
description of how to migrate databases to dialect 3. See Migrating clients on page 51
for an introduction to client migration.
42
INTERBASE 6
A version 5 client can access everything in the database with no further changes.
If there are object namescolumn or table names, for instancethat include any of the
17 new keywords, you must change these names in order to access these objects with a
version 6 dialect 1 client. The new ALTER COLUMN clause of ALTER TABLE makes it easy to
implement column name changes.
Version 5 clients can still access the columns.
Dialect 3 clients can access these columns as long as they delimit them with double
quotes.
The 17 new keywords are reserved words. However, the new datatypes TIME and DATE are
not available to use as datatypes. DATE columns have the old meaningboth date and
time. The new meaning of DATEdate onlyis available only in dialect 3.
All columns that were previously DATE datatype are now TIMESTAMP datatype. TIMESTAMP
contains exactly the information that DATE did in previous versions.
Exact numeric columnsthose that have a DECIMAL or NUMERIC datatype with precision
greater than 9are still stored as DOUBLE PRECISION datatypes. All arithmetic algorithms
that worked before on these columns still work as before. It is not possible to store data
as INT64 in dialect 1.
Overview
In either method, you begin by extracting the metadata from your database, examining
it for problem areas, and fixing the problems.
43
If you are performing an in-place migration, you copy corrected SQL statements from the
metadata file into a new script file, modify them, and run the script against the original
database. Then you set the database to dialect 3. There are some final steps to take in the
dialect 3 database to store old data as INT64.
If you have a utility for moving data from the old database to a newly created empty
database, you use the modified metadata file to create a new dialect 3 database and use
the utility to transfer data from the old database to the new.
In both cases, you must make changes to the new database to accommodate migrated
columns that must be stored as INT64 and column constraints and defaults that originally
contained double quotes.
The two methods are described below.
original metadata file, but this is more likely to result in problems from statements
that were left in error. InterBase recommends creating a new script file that contains
only the statements that need to be run against the original database.
For the remaining steps, use a text editor to examine and modify the metadata and script
files. Place copied statements into the new script file in the same order they occur in the
metadata file to avoid dependency errors.
4. Search for each instance of double quotes in the extracted metadata file.
These can occur in triggers, stored procedures, views, domains, table column
defaults, and constraints. Change each double quote that delimits a string to
a single quote. Make a note of any tables that have column-level constraints
or column defaults in double quotes.
Copy each changed statement to your empty script file, but do not copy ALTER TABLE
statements whose only double quotes are in column-level constraints or column
defaults.
44
INTERBASE 6
Important When copying trigger or stored procedure code, be sure to include any
associated SET TERM statements.
Quoted quotes If there is any chance that you have single or double quotes inside of
strings, you must search and replace on a case-by-case basis to avoid inappropriate
changes. The handling of quotation marks within strings is as follows:
TABLE 3.6
String:
In "peg" mode
Double-quoted:
Single-quoted:
String:
O'Reilly
Double-quoted:
"O'Reilly"
Single-quoted:
'O''Reilly'
5. In the new script file, search for occurrences of the TIMESTAMP datatype. In
most cases, these were DATE datatypes in your pre-6 database. For each one,
decide whether you want it to be TIME, TIMESTAMP, or DATE in your dialect 3
database. Change it as needed.
6. Repeat step 5 in the metadata file. Copy each changed statement to your new
script file.
7. In the new script file, search for occurrences of reserved words that are used
as object names and enclose them in double quotes; that makes them
delimited identifiers.
8. Repeat step 7 in the metadata file. Copy each changed statement to your new
script file.
9. In each of the two files, search for each instance of a DECIMAL or NUMERIC
datatype with a precision greater than 9. Consider whether or not you want
data stored in that column or with that domain to be stored as DOUBLE
PRECISION or INT64. See Do you really need to migrate your NUMERIC and
DECIMAL datatypes? on page 48 for a discussion of issues. For occurrences
that should be stored as DOUBLE PRECISION, change the datatype to that.
Leave occurrences that you want stored as INT64 alone for now. Copy each
changed statement that occurs in the metadata file to your new script file.
Perform the following steps in your new script file:
45
10. Locate each CREATE TRIGGER and CREATE DOMAIN statement and change it to
ALTER TRIGGER or ALTER DOMAIN as appropriate.
11. Locate each CREATE VIEW statement. Precede it by a corresponding DROP
statement. For example, if you have a CREATE VIEW foo statement, put a DROP
VIEW foo statement right before it, so that when you run this script against
your database, each view first gets dropped and then re-created.
12. If you have any ALTER TABLE statements that you copied because they contain
named table-level constraints, modify the statement so that it does nothing
except drop the named constraint and then add the constraint back with the
single quotes.
13. Check that stored procedure statements are ALTER PROCEDURE statements.
This should already be the case.
14. At the beginning of the script, put a CONNECT statement that connects to the
original database that you are migrating.
15. Make sure your database is backed up and run your script against the
database.
16. Use gfix to change the database dialect to 3.
gfix -sql_dialect 3 database.gdb
Note To run gfix against a database, you must attach as either the database owner or
SYSDBA.
17. At this point, DECIMAL and NUMERIC columns with a precision greater than 9
are still stored as DOUBLE PRECISION. To store the data as INT64, follow the
steps in Migrating NUMERIC and DECIMAL datatypes on page 48.
18. Validate the database using either IBConsole or gfix.
Thats it. Youve got a dialect 3 database. There is a little more work to do if you want
your NUMERIC and DECIMAL columns with a precision of greater than 9 to be stored as
INT64. At this point, they are still stored as DOUBLE PRECISION. To decide whether you want
to change they way data in these columns is stored, read
In addition, there are some optional steps you can take that are described in the following
sections, Column defaults and column constraints and Unnamed table
constraints.
IMPORTANT
46
If you ever extract metadata from the dialect 3 database that you created using the steps
above, and if you plan to use that metadata to create a new database, check to see if the
extracted metadata contains double quotes delimiting string constants in column
defaults, column constraints, or unnamed table constraints. Change any such
occurrences to single quotes before using the metadata to create the new database.
INTERBASE 6
47
If SHOW TABLE shows that InterBase stores the unnamed constraint as INTEG_2, then
issue the following statement to change the constraint:
ALTER TABLE foo
DROP CONSTRAINT INTEG_2,
ADD CONSTRAINT new_name
CHECK (col_name IN ('val1', 'val2', 'val3'));
As you migrate you databases to dialect 3, consider the following questions about
columns defined with NUMERIC and DECIMAL datatypes:
Is the precision less than 10? If so, there is no issue. You can migrate without taking any
action and there will be no change in the database and no effect on clients.
For NUMERIC and DECIMAL columns with precision greater than 9, is DOUBLE PRECISION an
appropriate way to store your data?
In many cases, the answer is yes. If you want to continue to store your data as DOUBLE
PRECISION, change the datatype of the column to DOUBLE PRECISION either before or
after migrating your database to dialect 3. This doesnt change any functionality in
dialect 3, but it brings the declaration into line with the storage mode. In a dialect 3
database, newly-created columns of this type are stored as INT64, but migrated columns
are still stored as DOUBLE PRECISION. Changing the declaration avoids confusion.
48
INTERBASE 6
DOUBLE PRECISION may not be appropriate or desirable for financial applications and
others that are sensitive to rounding errors. In this case, you need to take steps to
migrate your column so that it is stored as INT64 in dialect 3. As you make this decision,
remember that INT64 does not store the same range as DOUBLE PRECISION. Check
whether you will experience data loss and whether this is acceptable.
MIGRATING NUMERIC AND DECIMAL DATATYPES
Read Do you really need to migrate your NUMERIC and DECIMAL datatypes? on
page 48 to decide whether you have columns in a dialect 1 database that would be best
stored as 64-bit integers in a dialect 3 database. If this is the case, follow these steps for
each column:
1. Migrate your database to InterBase 6 as described in Method one: in-place
migration on page 44.
2. Use the ALTER COLUMN clause of the ALTER DATABASE statement to change the
name of each affected column to something different from its original name.
If column position is going to be an issue with any of your clients, use ALTER
COLUMN to change the positions as well.
3. Create a new column for each one that you are migrating. Use the original
column names and if necessary, positions. Declare each one as a DECIMAL or
NUMERIC with precision greater than 9.
4. Use UPDATE to copy the data from each old column to its corresponding new
column:
UPDATE tablename
SET new_col = old_col;
5. Check that your data has been successfully copied to the new columns and
drop the old columns.
the problems. Use the modified metadata file to create a new dialect 3 database and use
an application to transfer data from the old database to the new.
49
1. If you have not migrated the database to version 6, dialect 1, do so first. Back
up the database again.
2. Extract the metadata from the database using isql -x. If you are migrating a
database that contains data structures created with GDML, see Migrating
older databases on page 50.
For the following steps, use a text editor to examine and modify the metadata file.
3. Search for each occurrence of the TIMESTAMP datatype. In most cases, these
were DATE datatypes in your pre-6 database. Decide whether you want it to
be TIME, TIMESTAMP, or DATE in your dialect 3 database. Change it as needed.
4. Find all instances of reserved words that are used as object names and
enclose them in double quotes to make them delimited identifiers.
5. Search for each instance of double quotes in the extracted metadata file.
These can occur in triggers, stored procedures, views, domains, exceptions,
table column defaults, and constraints. Change each double quote to a single
quote.
6. Search for each instance of a DECIMAL or NUMERIC datatype with a precision
greater than 9. Consider whether or not you want that data stored as DOUBLE
PRECISION or INT64. See Do you really need to migrate your NUMERIC and
DECIMAL datatypes? on page 48 for a discussion of issues. For occurrences
that should be stored as DOUBLE PRECISION, change the datatype to that.
Leave occurrences that you want stored as INT64 alone for now.
7. At the beginning of the file, enter SET SQL DIALECT 3. On the next line,
uncomment the CREATE DATABASE statement and edit it as necessary to create
a new database.
8. Run the metadata file as a script to create a new database.
9. Use your data transfer utility to copy data from the old database to the new
dialect 3 database. In the case of a large database, allow significant time for
this.
10. Validate the database using gfix.
11. At this point, DECIMAL and NUMERIC columns with a precision greater than 9
are still stored as DOUBLE PRECISION. To store the data as INT64, follow the
steps in Migrating NUMERIC and DECIMAL datatypes on page 48.
50
INTERBASE 6
MIGRATING CLIENTS
Migrating clients
To migrate an older client application to InterBase 6, install the InterBase 6 client onto
the platform where the client application resides. An InterBase server then recognizes
that client as a version 6 dialect 1 client.
It is good practice to recompile and relink the application and make note of field names,
datatype use, and so on in the new application. When you recompile, state the dialect
explicitly:
SET SQL DIALECT n;
51
IMPORTANT
If you have databases that use any of the new version 6 keywords as object identifiers
and you are not migrating those databases to dialect 3, you might want to not migrate
your version 5 clients. If you migrate them to version 6 dialect 1, you lose the ability to
access those keyword columns. See New keywords on page 27.
When you recompile an existing gpre client, you must recompile it with the
gpre -sql_dialect n switch.
There are several paths that permit you to create dialect 3 clients that access all new
InterBase 6 features:
In Delphi 5, make calls to functions in the new InterBase Express (IBX) package. Because
the Delphi 5 beta includes InterBase 5, it ships with a version of IBX that does not include
calls to the new InterBase 6 Services, Install, and Licensing APIs.
To write embedded SQL applications that address all InterBase 6 dialect 3 functionality,
compile them using gpre -sql_dialect 3.
Client
How to migrate
GPRE
TABLE 3.7
52
BDE
InterClient
INTERBASE 6
If you have any schemas defined that have a source database replicating to more than
one target (within the same schema), then you should run the Create System Objects
command for each of those source databases. In such schemas, more than one entry is
placed in the log for any row modified. This does not cause any data errors, but does
cause some changes to be replicated more than once.
Note Do not run the Remove System Objects command, as this will empty the REPL_LOG
table.
If you have been using older licenses purchased from Synectics Software, those licenses
will not work with InterBase 6. You must use the version of IBReplicator for Opensource
InterBase, or buy new licenses from Borland Software Corporation for use with the
version of IBReplicator for Borland InterBase (the certified commercial version of
InterBase).
53
54
INTERBASE 6
___________________________________________________
Algorithms Explained By Ankit Fadia ankit@bol.net.in
<mailto:ankit@bol.net.in>
___________________________________________________
Encryption has become a part and parcel of our lives and we have
accepted the fact that data is going to encrypted and decrypted at
various stages. However, there is not a single encryption algorithm
followed everywhere. There are a number of algorithms existing, and I
feel there is a need to understand how they work. So this text
explains a number of popular encryption algorithms and makes you look
at them as mathematical formulas.
Data Encryption Standard or DES
The U.S government in 1977 adopted the Data Encryption Standard
(DES) algorithm. According to its developer the DES algorithm is:
It is a block cipher system which transforms 64-bit data blocks under
a 56-bit secret key under a 56-bit secret key, by means of permutation
and substitution.
Now, this tutorial will guide you through the various steps of the DES
encryption algorithm making you more confident in dealing with DES
encryption.
The following is a step by step guide to the DES algorithm, which was
originally written by Matthew Fischer and has been edited by me-:
1.) Firstly, we need to process the key.
1.1 Get a 64-bit key from the user. (Every 8th bit is considered a
parity bit. For a key to have correct parity, each byte should contain an
odd number of "1" bits.)
1.2 Calculate the key schedule.
1.2.1 Perform the following permutation on the 64-bit key. (The
parity bits are discarded, reducing the key to 56 bits. Bit 1 of the
permuted block is bit 57 of the original key, bit 2 is bit 49, and so on
with bit
56 being bit 4 of the original key.)
Permuted Choice 1 (PC-1)
57 49 41 33 25 17 9
1 58 50 42 34 26 18
10 2 59 51 43 35 27
19 11 3 60 52 44 36
63 55 47 39 31 23 15
7 62 54 46 38 30 22
14 6 61 53 45 37 29
21 13 5 28 20 12 4
1.2.2 Split the permuted key into two halves. The first 28 bits are
called C[0] and the last 28 bits are called D[0].
1.2.3
1.2.3.1 Perform one or two circular left shifts on both C[i-1] and
D[i-1] to get C[i] and D[i], respectively. The number of shifts per
iteration are given in the table below.
Iteration #
Left Shifts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1 1 2 2 2 2 2 2 1 2 2 2 2 2 2 1
46 42 50 36 29 32
1.2.3.3 Loop back to 1.2.3.1 until K[16] has been calculated.
2 Process a 64-bit data block.
2.1 Get a 64-bit data block. If the block is shorter than 64 bits, it
should be padded as appropriate for the application.
2.2 Perform the following permutation on the data block.
Initial Permutation (IP)
58
60
62
64
57
59
61
63
50
52
54
56
49
51
53
55
42
44
46
48
41
43
45
47
34
36
38
40
33
35
37
39
26
28
30
32
25
27
29
31
18
20
22
24
17
19
21
23
10
12
14
16
9
11
13
15
2
4
6
8
1
3
5
7
2.3 Split the block into two halves. The first 32 bits are called L[0],
and the last 32 bits are called R[0].
2.4 Apply the 16 subkeys to the data block. Start with i = 1.
2.4.1 Expand the 32-bit R[i-1] into 48 bits according to the bitselection function below.
Expansion (E)
32
4
8
12
16
20
1 2 3 4 5
5 6 7 8 9
9 10 11 12 13
13 14 15 16 17
17 18 19 20 21
21 22 23 24 25
24 25 26 27 28 29
28 29 30 31 32 1
2.4.2 Exclusive-or E(R[i-1]) with K[i].
2.4.3 Break E(R[i-1]) xor K[i] into eight 6-bit blocks. Bits 1-6 are
B[1], bits 7-12 are B[2], and so on with bits 43-48 being B[8].
2.4.4 Substitute the values found in the S-boxes for all B[j]. Start
with j = 1. All values in the S-boxes should be considered 4 bits wide.
2.4.4.1 Take the 1st and 6th bits of B[j] together as a 2-bit value
(call it m) indicating the row in S[j] to look in for the substitution.
2.4.4.2 Take the 2nd through 5th bits of B[j] together as a 4-bit
value (call it n) indicating the column in S[j] to find the substitution.
2.4.4.3 Replace B[j] with S[j][m][n].
Substitution Box 1 (S[1])
14 4 13
0 15 7
4 1 14
15 12 8
1 2
4 14
8 13
2 4
15 11 8 3 10 6 12 5 9
2 13 1 10 6 12 11 9 5
6 2 11 15 12 9 7 3 10
9 1 7 5 11 3 14 10 0
0 7
3 8
5 0
6 13
S[2]
15 1
3 13
0 14
13 8
8 14 6 11
4 7 15 2
7 11 10 4
10 1 3 15
3 4 9
8 14 12
13 1 5
4 2 11
7
0
8
6
2 13 12
1 10 6
12 6 9
7 12 0
0
9
3
5
5 10
11 5
2 15
14 9
S[3]
10 0 9 14 6 3 15 5 1 13 12 7 11 4 2 8
13 7 0 9 3 4 6 10 2 8 5 14 12 11 15 1
13 6 4 9 8 15 3 0 11 1 2 12 5 10 14 7
1 10 13 0 6 9 8 7 4 15 14 3 11 5 2 12
S[4]
7 13
13 8
10 6
3 15
14
11
9
0
3 0
5 6
0 12
6 10
6 9 10
15 0 3
11 7 13
1 13 8
1
4
15
9
2
7
1
4
8 5 11 12 4 15
2 12 1 10 14 9
3 14 5 2 8 4
5 11 12 7 2 14
S[5]
2 12 4 1 7 10 11 6 8
14 11 2 12 4 7 13 1 5
4 2 1 11 10 13 7 8 15
11 8 12 7 1 14 2 13 6
5 3 15 13
0 15 10 3
9 12 5 6
15 0 9 10
0 14 9
9 8 6
3 0 14
4 5 3
S[6]
12 1 10 15
10 15 4 2
9 14 15 5
4 3 2 12
9 2 6 8
7 12 9 5
2 8 12 3
9 5 15 10
0 13 3 4 14 7 5 11
6 1 13 14 0 11 3 8
7 0 4 10 1 13 11 6
11 14 1 7 6 0 8 13
S[7]
4 11 2 14
13 0 11 7
1 4 11 13
6 11 13 8
15
4
12
1
0 8 13 3 12
9 1 10 14 3
3 7 14 10 15
4 10 7 9 5
9 7 5 10
5 12 2 15
6 8 0 5
0 15 14 2
6 1
8 6
9 2
3 12
S[8]
13 2 8
1 15 13
7 11 4
2 1 14
4
8
1
7
6 15 11 1
10 3 7 4
9 12 14 2
4 10 8 13
10
12
0
15
9 3 14
5 6 11
6 10 13
12 9 0
5 0 12 7
0 14 9 2
15 3 5 8
3 5 6 11
2.4.4.4 Loop back to 2.4.4.1 until all 8 blocks have been replaced.
8
7
6
5
4
3
2
1
48
47
46
45
44
43
42
41
16 56 24 64 32
15 55 23 63 31
14 54 22 62 30
13 53 21 61 29
12 52 20 60 28
11 51 19 59 27
10 50 18 58 26
9 49 17 57 25
This has been a description of how to use the DES algorithm to encrypt
one 64-bit block. To decrypt, use the same process, but just use the
keys K[i] in reverse order. That is, instead of applying K[1] for the
first
iteration, apply K[16], and then K[15] for the second, on down to K[1].
Summaries:
Key schedule:
C[0]D[0] = PC1(key)
for 1 <= i <= 16
C[i] = LS[i](C[i-1])
D[i] = LS[i](D[i-1])
K[i] = PC2(C[i]D[i])
Encipherment:
L[0]R[0] = IP(plain block)
for 1 <= i <= 16
L[i] = R[i-1]
R[i] = L[i-1] xor f(R[i-1], K[i])
cipher block = FP(R[16]L[16])
Decipherment:
R[16]L[16] = IP(cipher block)
for 1 <= i <= 16
R[i-1] = L[i]
L[i-1] = R[i] xor f(L[i], K[i])
plain block = FP(L[0]R[0])
To encrypt or decrypt more than 64 bits there are four official modes
(defined in FIPS PUB 81). One is to go through the above-described
process for each block in succession. This is called Electronic Codebook
(ECB) mode. A stronger method is to exclusive-or each plaintext block
with the preceding ciphertext block prior to encryption. (The first block
is exclusive-or'ed with a secret 64-bit initialization vector (IV).) This is
called Cipher Block Chaining (CBC) mode. The other two modes are
Output Feedback (OFB) and Cipher Feedback (CFB).
When it comes to padding the data block, there are several options.
One is to simply append zeros. Two suggested by FIPS PUB 81 are, if
the data is binary data, fill up the block with bits that are the opposite
of the last bit of data, or, if the data is ASCII data, fill up the block
with random bytes and put the ASCII character for the number of pad
bytes in the last byte of the block. Another technique is to pad the
block with random bytes and in the last 3 bits store the original number
of data bytes.
The DES algorithm can also be used to calculate checksums up to 64
bits long (see FIPS PUB 113). If the number of data bits to be check
summed is not a multiple of 64, the last data block should be padded
with zeros. If the data is ASCII data, the first bit of each byte
should be set to 0. The data is then encrypted in CBC mode with IV =
0. The leftmost n bits (where 16 <= n <= 64, and n is a multiple of 8)
of the final ciphertext block are an n-bit checksum.
Wow, that was one heck of a paper on DES. That would be all you need
to implement DES. Well, if you still have not understood how the DES
algorithm is implemented, then I suggest you go through the following C
program:
#include <stdio.h>
static int keyout[17][48];
void des_init(),lshift(),cypher(),des_encrypt(),des_descrypt();
void des_init(unsigned char *key){
unsigned char c[28],d[28];
static int pc1[56] = {57,49,41,33,25,17,9,
01,58,50,42,34,26,18,
10,02,59,51,43,35,27,
19,11,03,60,52,44,36,
63,55,47,39,31,23,15,
07,62,54,46,38,30,22,
14,06,61,53,45,37,29,
21,13,05,28,20,12,04};
static int pc2[48] = {14,17,11,24,1,5,
3,28,15,6,21,10,
23,19,12,4,26,8,
16,7,27,20,13,2,
41,52,31,37,47,55,
30,40,51,45,33,48,
44,49,39,56,34,53,
46,42,50,36,29,32};
static int nls[17] = {
0,1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1};
static int cd[56],keyb[64];
static int cnt,n=0;
register int i,j;
for(i=0;i<8;i++) /*Read in key*/
for(j=0;j<8;j++) keyb[n++]=(key[i]>>j&0x01);
for(i=0;i<56;i++) /*Permuted choice 1*/
cd[i]=keyb[pc1[1]-1];
for(i=0;i<28;i++){
c[i]=cd[i];
d[i]=cd[i+28];
}
for(cnt=1;cnt<=16;cnt++){
for(i=0;i<nls[cnt];i++){
lshift(c); lshift(d);
}
for(i=0;i<28;i++){
cd[i]=c[i];
cd[i+28]=d[i];
}
for(i=0;i<48;i++) /*Permuted Choice 2*/
keyout[cnt][i]=cd[pc2[i]-1];
}
}
static void lshift(unsigned char shft[]){
register int temp,i;
temp=shft[0];
for(i=0;i<27;i++) shft[i]=shft[i+1];
shft[27]=temp;
}
static void cypher(int *r, int cnt, int *fout){
static int expand[48],b[8][6],sout[8],pin[48];
4,3,2,12,9,5,15,10,11,14,1,7,6,0,8,13,
4,11,2,14,15,0,8,13,3,12,9,7,5,10,6,1,/*s7*/
13,0,11,7,4,9,1,10,14,3,5,12,2,15,8,6,
1,4,11,13,12,3,7,14,10,15,6,8,0,5,9,2,
6,11,13,8,1,4,10,7,9,5,0,15,14,2,3,12,
13,2,8,4,6,15,11,1,10,9,3,14,5,0,12,7, /*s8*/
1,15,13,8,10,3,7,4,12,5,6,11,0,14,9,2,
7,11,4,1,9,12,14,2,0,6,10,13,15,3,5,8,
2,1,14,7,4,10,8,13,15,12,9,0,3,5,6,11
};
for(i=0;i<48;i++) expand[i]=r[e[i]-1]; /*Expansion Function*/
for(i=n=0;i<8;i++) {
for(j=0;j<6;j++,n++) b[i][j]=expand[n]^keyout[cnt][n];
}
/*Selection functions*/
for(scnt=n=0;scnt<8;scnt++){
row=(b[scnt][0]<<1)+b[scnt][5];
col=(b[scnt][1]<<3)+(b[scnt][2]<<2)+(b[scnt][3]<<1)+b[scnt][4];
sout[scnt]=s[scnt][(row<<4)+col];
for(i=3;i>=0;i--){
pin[n]=sout[scnt]>>i;
sout[scnt]=sout[scnt]-(pin[n++]<<i);
}
}
for(i=0;i<32;i++) fout[i]=pin[p[i]-1]; /*Permutation Function*/
}
static int p[64] = {58,50,42,34,26,18,10,2,
60,52,44,36,28,20,12,4,
62,54,46,38,30,22,14,6,
64,56,48,40,32,24,16,8,
5 = {58,50,42,34,26,18,10,2,
60,52,44,36,28,20,12,4,
62,54,46,38,30,22,14,6,
64,56,48,40,32,24,16,8,
57,49,41,33,25,17,9,1,
59,51,43,35,27,19,11,3,
61,53,45,37,29,21,13,5,
63,55,47,39,31,23,15,7};
if((in=fopen(argv[2],"rb"))==NULL){
fprintf(stderr,"\r\nCould not open input file: %s",argv[2]);
return 2;
}
if((out=fopen(argv[3],"wb"))==NULL){
fprintf(stderr,"\r\nCould not open output file: %s",argv[3]);
return 3;
}
if(argv[1][0]=='e'){
while ((n=fread(data,1,8,in)) >0){
des_encrypt(data);
printf("data enctyted");
if(fwrite(data,1,8,out) < 8){
fprintf(stderr,"\r\nError writing to output file\r\n");
return(3);
}
}
}
if(argv[1][0]=='d'){
while ((n=fread(data,1,8,in)) >0){
des_decrypt(data);
if(fwrite(data,1,8,out) < 8){
fprintf(stderr,"\r\nError writing to output file\r\n");
return(3);
}
}
}
fclose(in); fclose(out);
return 0;
}ntf(stderr,"\r\nError writing to output file\r\n");
return(3);
}
}
}
fclose(in); fclose(out);
return 0;
}
The RSA Encryption Algorithm
PERL:
#
# -d (decrypt)
# or -e (encrypt)
#
# $k is exponent, $n is modulus; $k and $n in hex
#
# use of -s was contributed by Jeff Friedl, a cool perl hacker
#
# the $e-$d (grok that? awesome hack by Jeff also) checks for -d or
-e:
#
# when perl -s sets $x for -x so that means $d is set for -d, $e for
-e
# if they are both set 1-1 = 0 so it fails if neither are set it fails
# and if either one is set we're ok! This is to get around using | ,
# as | has higher precedence than & things group wrongly.
#
$e-$d&(($k,$n)=@ARGV)==2||die"$0 -d|-e key mod <in >out\n";
#
# $v will be the digits of output per block, $w the digits of input per
block.
# If encrypting need to reduce $w so input is guaranteed to be less
than
# modulus; for decrypting reduce $v to match.
#
# blocks are based on modulus size in hex digits rounded up to nearest
even
# length (~1&1+length$n) so that things will unpack properly
#
$v=$w=1+length$n&~1;
$v-=$d*2:$w-=$e*2;
#
# Make $_ be the exponent $k as a binary bit string
#
# Add a leading 0 to make length of $k be even so that it will fill
# Bytes when packed as 2 digits per byte
#
$_=unpack('B*',pack('H*',1&length$k?"0$k":$k));
#
# strip leading 0's from $_
#
s/^0+//;
#
# Turn every 0 into "d*ln%", every 1 into "d*ln%lm*ln%". These are dc
codes
# which construct an exponentiation algorithm for that exponent.
# "d*ln%" is duplicate, square, load n, modulus; e.g. square the number
# on the stack, mod n. "d*ln%lm*ln%" does this then, load m, multiply,
# load n, modulus; e.g. then multiply by m mod n. This is the square
and
# multiply algorithm for modular exponentiation.
#
# (Kudos to Hal for shortened this one by 4 chars)
#
s/1/0lM*ln%/g;
s/0/d*ln%/g;
#
# Encryption/decryption loop. Read $w/2 bytes of data to $m.
#
while(read(STDIN,$m,$w/2)){
#
# Turn data into equivalent hex digits in $m
#
$m=unpack("H$w",$m);
#
# Run dc: 16 bit radix for input and output; $m into dc register "M";
# $n into dc register "n"; execute $_, the exponentiation program
above.
# "\U...\E" forces upper case on the hex digits as dc requires.
# Put the result in $e.
#
$a=`echo 16oOi\U$m SM$n\Esn1$_ p|dc`;
#
# Pad the result with leading 0's to $v digits, pack to raw data and
output.
#
print pack("H$v",'0'x($v+1-length$a).$a);
}
Blowfish
Blowfish is yet another popular encryption algorithm which is based on:
The following C program demonstrates the implementation of the
Blowfish encryption algorithm:
/*********************blowfish.h********************/
/* $Id: blowfish.h,v 1.3 1995/01/23 12:38:02 pr Exp pr $*/
#define MAXKEYBYTES 56 /* 448 bits */
#define bf_N 16
#define noErr 0
#define DATAERROR -1
#define KEYBYTES 8
#define subkeyfilename "Blowfish.dat"
#define UWORD_32bits unsigned long
#define UWORD_16bits unsigned short
#define UBYTE_08bits unsigned char
/* choose a byte order for your hardware */
/* ABCD - big endian - motorola */
#ifdef ORDER_ABCD
union aword {
UWORD_32bits word;
UBYTE_08bits byte [4];
struct {
unsigned int byte0:8;
unsigned int byte1:8;
unsigned int byte2:8;
unsigned int byte3:8;
} w;
};
#endif /* ORDER_ABCD */
/* DCBA - little endian - intel */
#ifdef ORDER_DCBA
union aword {
UWORD_32bits word;
UBYTE_08bits byte [4];
struct {
inline
void Blowfish_encipher(UWORD_32bits *xl, UWORD_32bits *xr)
{
union aword Xl;
union aword Xr;
Xl.word = *xl;
Xr.word = *xr;
Xl.word ^= bf_P[0];
ROUND (Xr, Xl, 1); ROUND (Xl, Xr, 2);
ROUND (Xr, Xl, 3); ROUND (Xl, Xr, 4);
ROUND (Xr, Xl, 5); ROUND (Xl, Xr, 6);
ROUND (Xr, Xl, 7); ROUND (Xl, Xr, 8);
ROUND (Xr, Xl, 9); ROUND (Xl, Xr, 10);
ROUND (Xr, Xl, 11); ROUND (Xl, Xr, 12);
ROUND (Xr, Xl, 13); ROUND (Xl, Xr, 14);
ROUND (Xr, Xl, 15); ROUND (Xl, Xr, 16);
Xr.word ^= bf_P[17];
*xr = Xl.word;
*xl = Xr.word;
}
void Blowfish_decipher(UWORD_32bits *xl, UWORD_32bits *xr)
{
union aword Xl;
union aword Xr;
Xl = *xl;
Xr = *xr;
Xl.word ^= bf_P[17];
ROUND (Xr, Xl, 16); ROUND (Xl, Xr, 15);
ROUND (Xr, Xl, 14); ROUND (Xl, Xr, 13);
ROUND (Xr, Xl, 12); ROUND (Xl, Xr, 11);
ROUND (Xr, Xl, 10); ROUND (Xl, Xr, 9);
ROUND (Xr, Xl, 8); ROUND (Xl, Xr, 7);
ROUND (Xr, Xl, 6); ROUND (Xl, Xr, 5);
ROUND (Xr, Xl, 4); ROUND (Xl, Xr, 3);
ROUND (Xr, Xl, 2); ROUND (Xl, Xr, 1);
Xr.word ^= bf_P[0];
*xl = Xr.word;
*xr = Xl.word;
}
/* FIXME: Blowfish_Initialize() ??? */
short InitializeBlowfish(UBYTE_08bits key[], short keybytes)
{
short i; /* FIXME: unsigned int, char? */
short j; /* FIXME: unsigned int, char? */
UWORD_32bits data;
UWORD_32bits datal;
UWORD_32bits datar;
union aword temp;
/* fprintf (stderr, "0x%x 0x%x ", bf_P[0], bf_P[1]); /* DEBUG */
/* fprintf (stderr, "%d %d\n", bf_P[0], bf_P[1]); /* DEBUG */
j = 0;
for (i = 0; i < bf_N + 2; ++i) {
temp.word = 0;
temp.w.byte0 = key[j];
temp.w.byte1 = key[(j+1)%keybytes];
temp.w.byte2 = key[(j+2)%keybytes];
temp.w.byte3 = key[(j+3)%keybytes];
data = temp.word;
bf_P[i] = bf_P[i] ^ data;
j = (j + 4) % keybytes;
}
datal = 0x00000000;
datar = 0x00000000;
for (i = 0; i < bf_N + 2; i += 2) {
Blowfish_encipher(&datal, &datar);
bf_P[i] = datal;
bf_P[i + 1] = datar;
}
for (i = 0; i < 4; ++i) {
for (j = 0; j < 256; j += 2) {
Blowfish_encipher(&datal, &datar);
bf_S[i][j] = datal;
bf_S[i][j + 1] = datar;
}
}
return 0;
}
=============== bf_tab.h ==============
/* bf_tab.h: Blowfish P-box and S-box tables */
static UWORD_32bits bf_P[bf_N + 2] = {
0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,
0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89,
0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917,
0x9216d5d9, 0x8979fb1b,
};
static UWORD_32bits bf_S[4][256] = {
0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,
0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99,
0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16,
0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e,
0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee,
0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,
0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef,
0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e,
0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,
0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440,
0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce,
0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,
0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e,
0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677,
0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,
0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032,
0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88,
0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,
0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e,
0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0,
0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3,
0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98,
0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88,
0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,
0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6,
0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d,
0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,
Contents
Disclaimer1
Introduction..2
Getting Started...3
T ips & Secrets................4
Choosing your target audience...5
Downloading, crypting, binding, and making the torrent6
Uploading your torrent...............8
Conclusion....9
Disclaimer
This eBook is provided as-is with no representations or warranties, either express or
implied, including, but not limited to, implied warranties of merchantability, fitness for a
particular purpose and noninfringement. You assume complete responsibility and risk
for use of any of the information made available in this book and any and all related or
advertised services.
Some jurisdictions do not allow the exclusion of implied warranties; so the above
exclusion may not apply to you.
The author of this book, its agents, representatives and employees are neither responsible
nor liable for any direct, indirect, incidental, consequential, special, exemplary, punitive,
or other damages arising out of or relating in any way to this book and/or its content or
information contained within it.
By using the information made available in this book you agree to take full responsibility
of your actions. You also agree to use the fore mentioned information according to the
laws and regulations of your jurisdiction.
This book, including any part of its content, must not be produced, reproduced, copied or
passed on without the prior written consent of the author. The book ships with
absolutely no Private Label Rights or Master Reless Rights and is licensed for personal use
by the person whose name appears on the receipt.
Introduction
Greetings!
F irst of all, let me say that Im really glad you decided to buy this detailed book about
spreading the ultimate way.
This is the first eBook, about spreading, which is so in -depth and detailed, and Im sure
you will be able to get at least 150 bots in your first day (Yes, only 150, because you
have to keep spreading to get the hang of it). This method is the one I use personally,
and get about 600 1000 downloads per 3 days!
I will show you step by step how to make a popular torrent, and where to upload it
first, then when it becomes a bit more popular (when you have some seeds) what to do
with it, and how to make it trusted on popular torrent sites like ThePirateBay. And the
beauty of this eBook is that I am doing everything in these steps as I write this ver y
sentence you are reading, so I will provide screenshots and other stuff to make this as
easy as possible. I started writing this eBook from the moment I began to set-up a
torrent for DDoSeR 3.6
All the secrets of spreading, is revealed in this book!
After reading this eBook I guarantee you that you will have your own update / install
service or spreading service, and if you dont have that, you are already too busy
watching your downloads increase hour by hour.
Getting started
Ok, as you may have guessed, we need a torrent client. A popular and easy to use one is
Torrent. You can download it from: http://www.utorrent.com. Or you can use
your favorite torrent client, but this tutorial I will be using Torrent.
When you have downloaded Torrent, you are ready to go. First of all, we need a popular
program, hopefully includes a patch / key generator (to bind our file with). There is many
ways to find a popular program, but the most common one is top 100 at ThePirateBay
(http://www.thepiratebay.org /top/300 ). If you have a fast upload speed, you can try big
torrents (which make the torrent look more legit), and if you have a slow connection with a
slow upload speed, try some smaller torrents, or consider buying a seedbox, which is
pretty cheap these days.
Put yourself in the downloaders shoes when it comes to spreading, would you download
a Photoshop crack at 45 kB, with no PE info, no leechers/seeds and the default .exe icon?
The answer is no, you would be afraid, because it looks really suspicious. But if it was a 372
megabyte Photoshop installer (I like to include a installer for the program I am making the
torrent for, it looks more legit, and I have tried to make a torrent with the same crack, just
that I excluded the installer, and got 460 more install because of the installer, so the
installer plays a big role) + a crack with some nice icon and info about the creator (PE Info) I
would run it (remember, think as the downloaders, always!)
Now lets move on to the tips & secrets.
There is always at least one guy that uploads your file to virustotal. And virustotal
distribute your sample to antivirus companies and get it detected faster. But if your file
is
30 megabyte, then they wont be able to upload it to virustotal due to the upload limit (20
megabyte)
And there will always be at least one smart guy that will look for outgoing connections
or such, so you need more time to get leechers, so make it not too big, and not too small.
30 megabyte is always enough.
3. You need history, for successful torrents, so upload a few eBooks and movies on
your account before uploading your programs.
4. The .exe extension is sometimes not suit for the torrent; lets say you want to send to
somebody as a picture. An executable will be just dumb to send, so you can rename
it to something.scr. Scr stands for screensaver, and functions the same way as an .exe
It has 952 seeders, and 45 leechers, which is a really good (and popular) torrent. Why I
chose this torrent have its reasons:
antivirus installed.
It has a key generator included, which is also good for us, so we can bind it.
T ip: I usually bind my program with the installer too, so if somebody for some reason
just downloads it for the installer, will get your program too.
Now I have downloaded the torrent, let s do the crypting & binding.
This is what I got so far, 5 files: installer, key generator, readme, screenshot of key
generator, and finally our program. What we want to do is bind the key generator with
our program. For this you have to use a crypter with b uilt-in binder, or a crypter and a
binder. There is a good and free one called Fly Crypter by BUNNN, you can get it from
http://hackh ound.org /forum/index.php?topic=13513.0 but you have to decrypt it
though. Now I am binding and crypting it using Fly Crypter:
Now I put everything back in their original folders, like it was when I downloaded it.
Open up Torrent, and click the magic wand tool:
Click Add Directory (or file, if you use a zip archive) and browse to your file/folder. Put
in the trackers you want to use (a tracker list go to: http ://pastebin.mozi lla.org /697683
) and check Start seeding, as below:
Now after you have saved your torrent, you should have something like this:
Conclusion
Its time to finish this book, so all I have to say is good luck, and have a happy spreading!
You will find this book really helpful when you are sitting there, staring at your torrent with
1 seed and 0 leechers. Using the information provided within this book will guarantee
you that you will become a professional spreader in no time. So what are you waiting for?
If you begin faster, you finish faster, and practice makes master.
Happy spreading.
THE END
Now go spread your torrent! :-)
95
Pages
Sommaire du livre
Avant de commencer................................................................................................................................. 3
1 Savoir qui est son client type, et si le blog est conu pour les attirer. .................................................... 4
2 Ecrire des bons articles cest bien Mais en faire la promotion cest mieux ! ....................................... 6
3 Mettre en avant les membres de votre communaut et les influenceurs. .............................................. 7
4 Proposer une inscription la newsletter ou de demande dinformations ............................................... 8
5 Simplifier linscription votre liste de prospects ................................................................................... 14
6 Donner des rcompenses vos lecteurs qui vous soutiennent............................................................ 16
7 Donner confiance vos lecteurs........................................................................................................... 17
8 Aller au devant de ses prospects .......................................................................................................... 18
9 Ecrire des article qui vont attirer des prospects cibls ......................................................................... 19
10 Mettez en valeur les vos articles auprs des influenceurs.................................................................. 20
11 Optimisez vos newsletters, emailings, auto-rpondeurs ................................................................. 21
12 Travaillez vos pages et messages de service .................................................................................... 25
13 Organisez un concours ....................................................................................................................... 28
14 Organisez un Web Sminaire en direct .............................................................................................. 29
15 Lancez une campagne sur les blogs, forums de votre thmatique en proposant votre livre blanc,
une formation gratuite, un guide dachat ................................................................................................. 31
16 Utilisez Google Test pour faire de lA/B Testing ................................................................................. 32
17 Optimisez vos landing pages de vente ou de rcolte demails ........................................................... 33
18 Utilisez les mots utilisez par les acheteurs et les prospects ............................................................... 35
19 Proposez un logiciel ou un service ou une application ou une checkliste .......................................... 38
20 Utilisez des logos, des labels pour rassurer .................................................................................... 39
21 Optimisez votre blog pour le Mobile.................................................................................................... 43
22 Mettez de lhumain ou du service pour devenir unique ! ................................................................. 44
23 Proposez diffrentes offres commerciales .......................................................................................... 45
24 Mettez du rel dans le virtuel .............................................................................................................. 46
25 Optimisez la page de remerciement dinscription la newsletter ....................................................... 48
26 Inciter laisser son email en change dun produit/service/Goodies/ complmentaire larticle
consult. ...................................................................................................................................................... 51
27 Faire un article Teaser o on ne fait que valoriser un contenu exclusif disponible en change dun
email. ........................................................................................................................................................... 52
28 Mettre une barre daide laction en haut du blog avec un message incitatif (ebook) ................... 53
29 Raliser une pop up large avec des lments incitatifs...................................................................... 55
30 Mettre un formulaire ds la home page la place du slider ............................................................... 64
31 Intgrez une Popup lorsque linternaute veut quitter la page Web ..................................................... 65
32 Bloguez pour une personne qui a un problme et non pas sur une thmatique ................................ 65
33 Proposez un contenu gratuit (ou payant) qui soit une mthode pratique. .......................................... 67
34 Proposez aux commentateurs de sinscrire votre newsletter........................................................... 70
35 Capitalisez sur les sites de contenus pour rabattre des visiteurs ....................................................... 73
36 Rduisez leffet Sapin de Nol sur votre Blog............................................................................... 74
37 R-engager les inactif avec des emails de ractivation...................................................................... 75
38 Raliser une bannire dintroduction personnalise pour chaque article avec la reprise du titre et des
bnfices ..................................................................................................................................................... 76
39 Faire apparatre la fentre dinscription pour un ebook lors du passage sur un lien hypertexte ........ 77
40 Mettre un lien dans les pages en haut et en bas de votre blog .......................................................... 78
41 Bien distinguer vos produits des produits en affiliation et des publicits. ........................................... 78
42 Mettre un lien dabonnement newsletter juste aprs la date de larticle ............................................. 80
43 Mettre les liens Facebook, Twitter dans vos newsletters et emailing ............................................. 80
44 Mettre un onglet vers vos Guides gratuits, bonus sur sur votre page Facebook................................ 81
45 Mettez un appel lactions incitatif sur vos boutons........................................................................... 82
46 Supprimer la navigation du site dans vos landing pages.................................................................... 82
47 Proposer plusieurs types de bonus pour inciter les internaute vos donner leur email. ................... 83
48 Proposer une inscription newsletter aprs les commentaires............................................................. 84
49 Envoyez un email X jours au commentateur dun article .................................................................... 85
50 Mettre une fentre promotionnelle sur la progression, par exemple aprs un tlchargement ou un
traitement..................................................................................................................................................... 86
51 Mettre une home page avec uniquement une incitation tlcharger des produits .......................... 86
52 Proposer un code Promo au lieu dun produit ou dun bonus ............................................................. 87
En Conclusion ............................................................................................................................................. 89
Dveloppez votre business sur Internet...................................................................................................... 91
En savoir plus .......................................................................................................................................... 94
Page 2
Avant de commencer
Bonjour !
Gnrer du trafic sur son site cest bien, mais ce qui compte le plus cest de les inciter
vous laisser leurs coordonnes pour que vous puissiez les contacter !
Cest pourquoi jai conu ce mini guide, avec 52 astuces simples et concrtes pour
amliorer la conversion de votre site Web.
Page 3
De nos jours, la plupart des blogueurs sont t tellement absorbs par la cration de contenu,
quils en oublient que ce nest pas produire du contenu tous les jours qui va assurer le
succs de leur blog, mais la promotion de celui-ci et les liens entrants quils vont obtenir.
Pour arrter cette course folle la cration de contenu, il faut revenir aux rgles de base du
succs dun blog qui va attirer des prospects et les convertir en clients.
Cest pourquoi dans ce dossier en plusieurs parties, nous allons vous expliquer comment obtenir
plus de prospects avec votre Blog.
Page 4
A noter :
- Profitez de lanalyse des pages les plus vues pour amliorer votre taux de conversion sur
ces pages fort trafic. Cela peut tre par exemple de proposer le tlchargement dun livre
blanc, via une publicit pour vos produits Attention cependant ne SURTOUT PAS mettre des
liens daffiliation (ex: Amazon, Fnac), car Google pnalise ces pages promo.
- Identifiez les pages qui devraient bien fonctionner (les pages avec vos trs bons contenus,
celles avec des mots cls trs majeurs de votre secteur) mais qui ne gnrent pas beaucoup de
travail. Vous devrez alors les optimiser (crer du nouveau contenu, obtenir des liens vers cette
page).
Pour amliorer le rfrencement de vos pages stratgiques, consultez notre CheckListe SEO
disponible au format Excel sur CE LIEN et consultable ci dessous :
Ensuite il faut identifier ses clients actuels, par exemple via lamthode des personas:
Page 5
Ensuite il faut bien valider que ce que vous pensez est bien le reflet de la vrit Et pour cela
vous devez mener une petite enqute rgulire auprs de vos clients et prospects
Pour cela nhsitez pas utiliser un outil de cration de sondage comme Survey Monkey.
A retenir : Cest bien davoir du trafic, mais cest mieux davoir du trafic cibl et pertinent !
Page 6
Mais galement en invitant les influenceurs sur son blog (blogueurs connus, stars, experts),
par exemple comme la fait Jrmy Goldyn en demandant 7 blogueurs Comment rester focus
(mise en avant via une infographie + du texte) :
Page 7
Cela prend 1h de travail, et cela permet de capter un peu de notorit mieux quen faisant
un article de blog normal.
Attention cependant apporter suffisamment de valeur ajoute dans larticle pour ne pas dcevoir
les lecteurs
Page 9
- une pop up qui saffiche quand linternaute descend dans la lecture dun article, et qui
propose des guides tlcharger.
Pour cela jutilise le plugin Unpop Boxes (30 ) qui sintgre totalement WordPress.
Par exemple la vente despaces Pub est mentionne en haut du blog via la mention sur la publicit
:
Page 11
Page 12
Noubliez pas dintgrer ces prospects dans une chane de prospection (voir cet article),
avec Aweber ou SG Auto-Rpondeur.
Cela vous permettra denvoyer automatiquement des messages pr-programms et didentifier
ainsi les prospects chauds des prospects froids.
Page 13
Cette inscription peut se faire en 1 temps, cest dire que le lecteur peut directement entrer son
email :
Soit cela se fait en 2 temps, un clic sur la publicit, puis un formulaire remplir (dans le cas de la
publicit, dun contenu expliquer en dtail).
Page 14
A noter : vous pouvez crer une page ddi pour les visiteurs que vous allez obtenir via les
rseaux sociaux.
Par exemple vous pourrez crer une page spcifique dans votre profil Twitter, Facebook
permettant vos contacts de recevoir un ebook sils vous rejoignent.
En illustration, voici ci dessous mon profil Twitter, avec comme lien dans la description un lien
direct vers la page de tlchargement de mon guide gratuit.
Page 15
De manire plus large, et quelque soit le rseau, vous pourrez crire Visitez mon blog et recevez
gratuitement un guide gratuit
Vous devez aussi prvoir des outils de promotion de vos contenus stars (eBooks, vidos..) :
Des bannires de publicits que vous pourrez publier sur dautres sites internet (sur vos
autres blogs, dans adwords, pour de la publicit Adsense sur des forums & blogs)
- Des bannires de publicits que vous pourrez utiliser dans le cadre de laffiliation, dchanges
de visibilit avec dautres sites, de sponsoring de newsletters
Page 16
Page 17
- Les articles de presse, les publications dans dautres blogs, les rcompenses, les labels
de qualit qui crdibilisent votre entreprise. Cest par exemple notre rubrique Publications
A noter : la crdibilit se base sur les principes de la persuasion que vous retrouverez dans
lexcellent livre deRobert Cialdini.
Page 18
Dune part via une icone chat disponible sur votre site qui permet au prospect de poser des
questions sil est perdu ou sil a besoin dune information avant de commande.
Dautre part pour lancer automatiquement le chat si linternaute est sur le site depuis plusieurs
dizaines secondes, mais quil ne commande pas.
Page 19
A noter : vous pouvez profiter dune mission TV grande audience pour relayer un de vos
articles.
Page 20
- Si vous avez crit un article sur une marque, vous devez le relayer aux marques cites.
Par exemple dans la partie 1 de cet article jai cit Get Plus et iAdvize, et donc jai relay larticle
auprs de ces marques :
A noter : vitez de faire ces tweets de promo de manire trop rapproche, sinon vous risquez de
justement faire trop promo.
- Si vous avez crit un article de trs grande qualit sur un sujet, vous pouvez le relayer
auprs des institutionnels et influenceurs qui ont vocation relayer des informations non
commerciales.
Par exemple, voici un Tweet adress la CCIP concernant un article sur une checkliste SEO :
Page 21
Par exemple dans notre newsletter HTML la publicit est place juste en dessous de lEdito, et
juste avant les articles du mois.
Cet emplacement trs visible permet davoir un taux de clic important.
Page 22
Cest aussi en ajoutant des appels laction la fin des emailings ou messages, par exemple via
un post-scriptum :
Dans le mme temps vous devez mettre en place une segmentation comportementale.
Derrire ce terme un peu barbare, cela veut dire uniquement avoir du pragmatisme et simplement
cibler les bonnes personnes selon leurs comportements.
Page 23
Cest dire que vous allez analyser les comportements de vos lecteurs, et ainsi les segmenter.
Cela peut se faire via :
- Un email thmatique que vous allez envoyer vos clients, et ainsi segmenter les clients
selon quils ont ouvert ou pas larticle, ou quils ont cliqu ou pas sur un lien.
Vous pouvez analyser les personnes qui ont cliqu sur des liens thmatiques et ainsi nenvoyer
ces personnes que des informations sur ce thme.
Ainsi avec des solutions demailing avec tracking, vous pourrez voir les personnes qui sont par
exemple intresss par votre produit mais qui nont pas command (vous pourrez alors les appeler
au tlphone, leur envoyer une promo).
- Un email avec une simple question afin de segmenter les personnes selon leur choix.
Par exemple vous pouvez envoyer un email vos lecteur, leur demandant sil prfre de recevoir
des informations sur deux ou trois thmes, et ainsi ne plus leur envoyer que ces informations sur
cette thmatique.
Une autre astuce est dutiliser votre signature demail comme vecteur de communication lorsque
vous rpondez des questions par email, lorsque vous communiquez avec vos lecteurs
Pour cela il suffit dutiliser votre logiciel de messagerie comme Outlook, Gmail, hotmail et
dajouter une signature avec vos produits gratuits ou payants :
Page 24
Vous pouvez automatiser vos signatures en rajoutant par exemple vos profils Twitter, Facebook,
un flux RSS avec des outils comme WiseStamp.
Page 25
Sur ConseilsMarketing.fr cest une vido qui explicative mais aussi promotionnelle qui souvre
suite au tlchargement du guide 100 conseils pour russir sur internet
Page 26
Cette URL se paramtre trs simplement depuis votre systme demailing ou dauto-rpondeur :
Page 27
A noter : ces pages de service, comme par exemple celles de confirmation de commande,
permettent aussi de vendre des produits complmentaire, faire une monte en gamme, proposer
des accessoires En effet le client vient de passer commande, cest le meilleur moment de lui
proposer une promo pour quelques euros de plus (ex: pour 10 de plus vous avez un autre
ebook).
13 Organisez un concours
De temps en temps il faut crer un vnement, cest loccasion de communiquer sur votre
blog, mais aussi den parler vos contacts, de faire de la communication sur les rseaux
sociaux et de faire participer vos fans.
Le concours peut tre un concours darticles, avec par exemple lcriture dun article de blog par
vos lecteurs avec un vote pour le meilleur.
Cest par exemple ce que nous avions fait en 2007, 2008 et 2009 avec notre concours des
meilleurs conseils marketing.
Le principe tait de contacter les influenceurs dans votre domaine, et de leur proposer de
participer un concours.
Important : comme tous les concours, vous devez dposer votre rglement chez un huissier (entre
500 et 1000 euros).
Cest aussi le moment de valoriser vos lecteurs, et de leur proposer de participer lcriture du
Blog.
Page 28
Le concours peut aussi tre un concours sponsoris ou ralis en partenariat avec une
marque.
Dans ce cas il est super important doffrir un gros cadeau qui va motiver les lecteurs (et quelques
petits pour les seconds).
Page 29
Mais il est possible daller plus loin, avec un systme de confrences live avec des dizaines
dexperts afin de crer lvnement.
Le but est de rassembler les principaux experts dun sujet pour une srie de confrences
exceptionnelles pour une semaine thmatique.
Cest par exemple le cas des sessions :
Gnies du Marketing des Indpendants, avec 12h de formation live par 12 coachs
Passeport pour 1 emploi (mi-avril 2014), avec 14 coachs qui expliquent comment trouver un
job
Page 30
Mais il est possible de combiner les outils marketing, par exemple on peut proposer un
eBook gratuit (livre blanc, guide dachat), puis ensuite proposer une confrence live avec
les experts pour concrtiser les ventes.
Cest ce que nous avons fait dans le cadre dun livre blanc collaboratif sur le marketing direct, qui a
suivi la mise en place de Web Sminaires Live :
A noter : vous pouvez trs bien proposer une publicit directe, mais souvent les taux de
transformation sont faible, car les internautes qui visitent des blogs ne sont pas dans un process
dachat.
Il est aussi possible dutiliser laffichage de publicits sur Youtube (via les publicits vido
dans Google Adsense).
A noter : LA/B testing ncessite un gros volume de tests, donc faites surtout un test A/B pour les
formulaires, pour les pubs et uniquement si vous avez plusieurs commandes / jour.
Page 32
Cela veut dire en pratique tester diffrentes manires de prsenter son offre, que cela soit le fond
ou la forme :
- Tester diffrents formulaires pour le tlchargement de vos livres blancs, eBooks
Cela peut tre la couleur du bouton, la taille du bouton, lappel laction
Des outils comme Aweber ou SG Autorpondeur vous permettent de faire des tests trs
simplement :
- Mettre une vido qui dmarre avec des explications via une interview, via un screencast
Par exemple vous avez la prsentation de la formation Googleliser.
Page 33
Ou pour le formation Bloguez comme un Pro, cest une description de lintrieur de la formation
:
Page 34
Pour cela vous pouvez utiliser des gnrateurs de dessin anims comme Powtoon (voir notre
prsentation)
A noter : pour que la vido se lance automatiquement noubliez pas de rajouter dans les
paramtres de lURL de Youtube llment &autoplay=1
Par exemple :
<iframe width=640 height=360 src=//www.youtube.com/embed/tY_y5eqKhB0?autoplay=1
frameborder=0 allowfullscreen></iframe>
Lobjectif est dutiliser des mots cls qui sont taps par vos prospects en amont de la
phase dachat (ou les mots de ceux qui ont un problme), afin de les attirer et de proposer
vos produits et services.
Pour cela vous allez crer des articles spcifiques autour de chacun de vos mots cls et un mot
cl li lachat.
Page 35
Voici quelques exemples de mots cls combiner avec les expressions thmatiques :
- Comparatif
- A quoi sert
- Comment utiliser
- Avis
- Test
- Comment faire
- solution pour
- Problme avec
- Prix de
- Promotion
- Rduction
- Pas cher
- lequel choisir
Page 36
Ce fichier Excel vous permettra de crer vos propres titres pour vos articles, mais aussi vos mots
cls pour Google Adwords.
Pour trouver des mots cls supplmentaires, utilisez le gnrateur de mots cls de Google
Adwords ou SEM Rush.
De mme noubliez pas de travailler votre discours, en transformant les fonctions en bnfices.
En effet les clients nachtent pas des fonctions, mais ils achtent :
Une solution un problme
Page 37
Un bnfice
Une image (de soi ou face aux autres)
Du rve (une vie meilleure)
Vous devez donc vendre une solution un problme, via une mthode, une checkliste, un outil
Par exemple vous pouvez traduire :
Comptabilit analytique multi-niveaux par Analysez simplement la rentabilit de vos produits,
de vos filiales avec une comptabilit analytique multi niveaux.
40h de formation vido mis jours tous les mois par Vous tes certains dtre toujours la
pointe, vous bnficiez de 40h de formation vido, ainsi quune actualisation tous mois pour tre
au courant des dernires techniques marketing
En effet le fonction nest que le moyen de prouver le bnfice que vous mettez en avant.
Page 38
Article de Blog
Installation dun blog
Mais cela peut tre par exemple un outil de calcul de ROI, une application pour automatiser une
partie du travail
Par exemple vous avez SEO Moz (outil de rfrencement), qui proposer un outil gratuit danalyse
de backlinks Open Site Explorer en plus de sa solution de SEO payante.
Page 39
- Un label de qualit
Vous pouvez obtenir des labels via des associations (ex: Produit en Bretagne).
Mais il existe aussi de nombreux label rgionaux :
Si vous navez pas accs ce genre de label, vous pouvez trs bien vous regrouper avec
plusieurs acteurs majeurs de votre profession dans une association ou un syndicat, et ainsi
crer votre propre label de qualit.
Page 40
Par exemple vous avez lassociation des professionnels du marketing mobile, lADETEM et son
label des professionnels du marketing
Il existe aussi des organismes qui dlivrent un label de qualit aprs remise dun dossier :
Page 41
Vous pouvez en mme temps rajouter une page Publications / Presse avec une page
spcifique sur votre blog comme sur ConseilsMarketing.com
Page 42
Page 43
Page 44
Page 45
Pour en savoir plus, consultez notre guide gratuit 54 business modles & 20 politiques de prix
:
Attention : ne proposez pas trop de choix, sinon vous allez faire fuir vos prospects via un dilemme
sur le bon produit choisir !
Page 46
Retenez quun bon vendeur ne doit pas se cacher derrire son site, et donc il doit tre contactable
facilement (chat, emails, demande dinformation par formulaire)
Page 47
Page 48
Idalement il vaut mieux utiliser une vido + une promotion crite, afin davoir plus dimpact, en
effet vous avez plus dimpact avec lalliance texte + vido (linternaute sera tent de vous couter
en vous voyant limage).
Et pour tre certain que linternaute coute votre vido, noubliez pas de mettre en place la
lecture automatique de la vido.
Sur Youtube cela se fait via lajout du paramtre ?rel=0&autoplay=1 juste aprs lURL qui permet
dembarquer la vido.
Pour cela il suffit saller rcuprer le code embarqu dans longlet Partager de la vido :
Puis vous copiez le code dans notre Notepad de Windows et vous ajoutez la fin de lURL le code
dautoplay (juste derrire lurl de la vido par exemple
www.youtube.com/embed/h43lHd7_0Dg?rel=0&autoplay=1 :
Sur Vimeo cest plus simple, puisque les options dintgration de Vimeo permettent directement de
lancer la vido :
Page 49
A noter : il est essentiel que cette promotion soit vraiment exclusive et irrsistible Sinon les
lecteurs vont mettre de ct votre promotion plus tard.
Il est donc essentiel dinsister sur le caractre unique de cette promotion via :
- Un prix irrsistible (ex: un mini prix, une offre satisfait ou rembourse vie, prsenter un prix
par mois ou par jour, comparer le prix une autre dpense, proposer des moyens de paiement)
- Une offre irrsistible (ex: bundle de plusieurs produits, une offre abonnement, des bonus, des
packs de produits ou plus de services, un volume important)
- Rduire le risque (ex: une offre satisfait ou rembourse, un nombre de clients dj
utilisateurs, une prsentation, des tmoignages.)
- Une offre limite dans le temps (ex: cest une offre unique valable uniquement maintenant que
vous naurez plus jamais)
Rsoudre un problme important ou rpondre un besoin urgent, en apportant une
mthode ou une solution (ex: Devenir plus Efficace en 6 semaines).
Page 50
- De lmotion en racontant une histoire (ex: moi aussi jai eu ce problme, et justement cest
pour cela que jai mis en place cette solution).
- Une rponse aux principales objections (3 5) en fin de vido, afin de rduire les derniers
doutes du prospect (ex: calcul de ROI, prsenter les conomies ralises).
- Une offre unique par rapport aux concurrents, en mettant en avant une Unique Selling
Proposition qui explique vritablement Pourquoi acheter votre produit plutt quun autre, et ses
diffrences par rapport aux concurrents.
- Une offre dessai qui pourra tre ensuite transforme en achat (ex: un accs gratuit pendant
30 jours un club prive).
Pour vous aider raliser votre offre irrsistible, vous pouvez vous inspirer des solutions
dinfluences de Robert Cialdini.
Page 51
Pour cela il faut faire un article de blog (ex: une vido, un article texte), et de proposer ensuite
de tlcharger ou daccder un document complmentaire sous une autre forme (ex : une
checkliste PDF, un plan dactions dtaill sur Excel, un mini guide,une vido).
Limportant tant de changer le format et le contenu, ce qui incitera le lecteur donner son
email et qui lui permettra daller plus loin ou de mettre les ides en pratique.
En alternative on peut proposer une vido prive, un contenu exclusif
Par exemple sur Web Marketing Junkie, dans la vido ci dessous, pour avoir accs au contenu il
faut obligatoirement rentrer son email.
La vido teaser dure moins de 2 minutes, et lobjectif est exclusivement dinciter les internautes
laisser leurs emails.
Page 52
Pour que cela marche bien, Web Marketing Junkie utilise souvent la technique du Secret, en
utilisant des arguments comme par exemple un truc totalement bizarre mais qui marche /Un truc
de fou / Un secret peu connu /Un truc qui ma totalement tonn / Une astuce que jai trouve
totalement par hasard mais qui marche mort /
Attention : le danger cest de sur-promettre, car si vous promettez de trop vous risquez de
dcevoir, et donc au final de perdre votre crdibilit.
Il faut donc faire attention, et plutt en donner plus que ce que lon a promis.
A noter : le formulaire comporte en plus une mention supplmentaire Votre email valide, ce qui
permet de rduire le nombre de personnes qui donnent des faux emails car ils ne veulent pas
tre spamms.
Le principe tant que plus cest haut dans lcran, plus cest visible et donc la barre en haut
(avec un scrolling), sera visible en permanence.
Par exemple voici la barre sur le blog de Pro Blogger :
NotificationBar
Page 54
Indiquer le bnfice via une mthode avec un chiffre prcis Formation gratuite 100 000 visiteurs
/ mois, avec un bouton dappel laction Oui on fait a !.
Page 55
Mettre de lmotion avec Vous mritez un business et une vie que vous aimez Nous pouvons
vous aider !.
Un message original Ouppsss vous avez oubli quelque chose et proposer linscription la
newsletter.
Mettre en avant les bnfices et une promesse sexy avec un visuel simple.
Page 56
Valoriser son bonus Appeler ce document un Rapport Gratuit ne lui rend pas justice, mettre en
avant un nombre limit de 3 bnfices, ajouter une valeur ce rapport (47 $), mettre du contenu
audio et texte
Mettre en avant des Secrets (les 7 aliments secrets pour vivre plus longtemps
Page 57
Mettre les bnfices du produit en indiquant ce que les clients vont obtenir, avec le nombre de
pages et les fichiers Audio en MP3
Mettre en avant les bnfices Des flots de prospects et de ventes sur Linkedin
Page 58
Page 59
Page 60
Page 61
Intgrer une iFrame avec dans la partie graphique une image, et nutiliser Aweber, SG
autorpondeur que pour la partie rpondeur
Utiliser des outils de cration de Pop up comme http://pippity.com/
- Optin Monster avec une popup avec animation pour attirer lattention
Page 62
Faire une redirection directe vers une page de vente ou une page de tlchargement
Mettre une simple question Oui ou Non pour avoir un appel laction plus fort
Page 63
Attention : si votre pop arrive top vite, si elle nest pas pertinente elle peut nuire votre image
(par exemple sur ConseilsMarketing.fr nous faisons le choix de ne pas mettre de pop up).
Page 64
Or en faisant cela vous narriverez pas convaincre vos lecteurs dacheter vos produits (ou tout
simplement de souscrire votre newsletter), car ils ne se retrouveront pas dans un message
trop gnrique ou qui ne les touche pas motionnellement.
Donc vous devez identifier qui est votre prospect type et crer votre blog autour de lui et de
ses problmes.
Par exemple:
- au lieu de bloguer sur la cration dentreprises, Bloguez pour les personnes qui veulent
crer une entreprise en tant que Freelance, ou pour ceux qui veulent se lancer dans le
commerce
- au lieu de bloguer sur les rgimes, crivez un blog pour les femmes clibataires qui ont un
job et qui veulent garder la forme, pour les jeunes mres de famille qui ont eu un enfant
Page 65
Bref, il faut cibler exactement des personnes qui ont un besoin et un problme important (et si
possible urgent), et publier du contenu (eBook, articles, vidos, infographies) autour de ce sujet
en ayant bien en tte de la personne qui vous vous adressez.
Pour cela utilisez la Mthode des Personas, cest--dire que vous allez faire une fiche
didentit de la personne type, avec :
Ses caractristiques (son ge, ses passions, son budget) et son nom (et si possible sa photo
type que vous pourrez chercher sur le Web).
Ses problmes et ses besoins
Ses leviers de motivation
Si ce nest pas le cas, cest que vous avez perdu le focus, ou que perdez du temps au lieu
dattirer les bons prospects.
Page 66
Page 67
- Soit vous rsolvez un problme via une promesse dans une priode donne (ex :
Devenir plus Efficace en 6 Semaines). Vous bas lintrt sur le bnfice.
- Soit vous apportez une solution ou une mthode cl en main lie un problme (ex : Le
Kit de Survie du Crateur dEntreprise). Vous basez lintrt sur la peur.
Page 68
- Soit vous proposez de mettre en place un nombre dactions limite dans un temps limit
(ex: 5 choses faire cette semaine pour optimiser votre blog). Le but est de jouer sur limpulsion et
la facilit mettre des actions en place.
En revanche vitez les livres blancs trop gnriques et pas assez concrets :
Le livre blanc de XXXX
Le Prcis du XXXX
eBook sur xxxx
Bien entendu, en complment il faut choisir un visuel impactant, voire plusieurs en A/B
testing, afin dattirer lil.
Ensuite crez une couverture ou un visuel 3D intressant, par exemple en utilisant http://3dpack.com/.
Page 69
Page 70
Page 71
Page 72
Page 73
Voici un exemple avec notre guide 112 conseils des as de la vente, avec plus de 3000 vues et 80
tlchargements :
Certes, ces personnes chappent au blog, mais dune part avec Slideshare on voit qui a
tlcharg le guide, en plus on voit les sites qui ont embarqu le document (des partenaires
pontentiels), et enfin cela fait de la notorit gratuite !
A noter : une astuce consiste communiquer aux influenceurs sur Twitter, Facebook une
page spcifique de votre site sans formulaire pour obtenir le document (le mettre en libre
tlchargement PDF), puis quelques semaines plus tard de mettre un formulaire.
Page 74
Par exemple votre but N1 doit tre de crer votre propre liste de prospects, or si votre Blog
ne donne pas lenvie de vous inscrire, alors vous perdez automatiquement des visiteurs
Il faut 1 message clair et incitatif, et pas plusieurs.
Par exemple gnralement il faut plutt chercher tlcharger un ebook gratuit (et ainsi
crer une liste),plutt que dessayer de vendre directement un produit (ce qui narrive
quasiment jamais lors dune premire visite).
Par exemple sur ConseilsMarketing, nous avons mis en premire position le guide gratuit, et
uniquement ensuite les offres payantes.
Page 75
Page 76
Page 77
Vous pouvez aussi mettre un lien vers vos publicits dans vos menus, afin davoir un accs
direct aux produits, aux promotions
Page 78
- mettre une zone publicitaire ou une bannire sur vos produits par exemple dans la Sidebar
(surtout si elle est longue pour profiter du scroll),
mettre en header ou en footer un lien vers Mes produits...
Page 79
Page 80
Vous pouvez aussi ajouter dans vos emailings un bouton pour vous suivre sur Twitter ou
Facebook afin daugmenter le nombre de vos fans.
Vous pouvez utiliser pour cela le plugin Aweber qui permet dajouter un lien dans la page :
Page 81
Pour cela ne laissez dans vos landing pages que les lments essentiels :
Le titre
Un rsum en mode bnfice
Le visuel de votre bonus
Un tmoignage dun client satisfait
Bouton de partage sur les Media Sociaux
Page 83
Et bien entendu faites des split testing pour vrifier le bonus qui est plus performant !
Ou encore afficher une page spcifique (ex: promotion, vente dun produit, proposer un partage),
via le pluginWordPress Comment Redirect :
Page 84
Le but est denvoyer automatique un email aux commentateurs avec par exemple une offre
spciale pour les remercier de leur activit, pour offrir une promotion exclusive
Vous pouvez par exemple utiliser le plugin Thank Me Later.
Attention : si vous avez un gros blog avec un max de commentaires, le premier lancement peut
ralentir votre serveur
Page 85
Page 86
Le principe est de mettre en home page votre page de vente, avec vos produits gratuits et
payants.
Page 87
Page 88
En Conclusion
Important : si vous avez apprci ce guide, je ne vous demande quune seule chose en retour
Que vous en parliez autour de vous ! Dune part vous allez sans doute pourvoir aider vos contacts,
mais en plus vous allez nous aider continuer offrir des guides GRATUITS comme celui-ci.
Donc, prenez juste 30 secondes pour parler de ce guide sur Twitter, Facebook, votre blog
Merci davance !
Frederic CANEVET ConseilsMarketing.com
Page 89
Page 90
Vous voulez apprendre attirer des prospects, devenir un expert reconnu dans votre secteur,
dvelopper des revenus complmentaires?
Nous vous proposons notre formation Vido "Boostez votre Business, Bloguez comme un Pro"
avec plus de 45 heures de formation en vido et un support de cours de 300 pages.
Voici le programme dtaill de la Formation:
Module 1 : Avant de lancer son blog
- Objectifs et positionnement du Blog
- Les Alertes et la veille concurrentielle sur son secteur
- Analyser la concurrence
- Russir sa Page Propos
Page 93
En savoir plus
Depuis 2006, ConseilsMarketing.com cest tous les jours les meilleurs conseils pour trouver des
prospects et fidliser ses clients.
Le rseau ConseilsMarketing.com se compose principalement des sites :
- www.ConseilsMarketing.com : le blog Marketing
- www.Entreprise-Marketing.fr : les meilleurs articles sur le Marketing
- www.Jobs-MKG.com : site doffres demplois en Marketing
- www.DevenirPlusEfficace.com : dveloppement personnel.
Mentions lgales
- Responsable de la publication et Webmaster : Frederic CANEVET
- Email : Fred@ConseilsMarketing.fr
- SIRET : 512 747 080 00012
Informations lgales:
Les images jointes ce document sont issues des blogs des vainqueurs des Golden Blog Awards Si une image de ce document vous
appartenait, veuillez envoyer un email fred@conseilsmarketing.fr afin que je la retire dans les plus brefs dlais du document original et du
site internet.
Les marques cites dans ce document restent entirement la proprit de leurs dtenteurs, si vous souhaitez les retirer, envoyez une simple
demande par email fred@conseilsmarketing.fr.
Ce guide et ces conseils n'engagent que Frdric Canevet, ils sont issus de son exprience personnelle. C'est pourquoi ni Frederic Canevet, ni
conseilsmarketing.fr ne pourront tre tenu responsable des ventuelles consquences de la mise en pratique de des conseils et astuces que
cela soit titre personnel ou professionnel.
Les textes contenus dans ce guide et ainsi que leur diffusion est totalement libre: vous pouvez diffuser ce livre PDF, reprendre tout ou partie
des articles condition de mentionner l'auteur (Frederic Canevet) et le site d'origine via un lien vers http://www.conseilsmarketing.fr/. Par
contre l'utilisation des images contenues dans ce guide et leur modification est strictement interdite (voir le paragraphe sur le copyright des
images et photos).
Page 94
The author and publisher of this ebook and the associated materials have used
their best efforts in preparing this material. The author and publisher make no
representations or warranties with respect to the accuracy, applicability, fitness,
or completeness of the contents of this material. They disclaim any warranties
expressed or implied, merchantability, or fitness for any particular purpose. The
author and publisher shall in no event be held liable for any loss or other
damages, including but not limited to special, incidental, consequential, or other
damages. If you have any doubts about anything, the advice of a competent
professional should be sought.
This material contains elements protected under International and Federal
Copywright laws and treaties. Any unauthorized reprint or use of this material is
prohibited.
http://
http://
http://
Introduction
First i just want to give major credits to all the links to threads used in this ebook.
Massive credits to all the forum members that made them, thank you.
http://
http://
http://
What is a USG?
A USG is part of a
crypter that generates a
unique version of the
stub (stub is part of
crypter used to encrypt
and decrypt the
specified file). The
purpose of this is
because FUD crypters
dont last forever, eventually crypters become
detected over a period of time. You will understand
this better later on in the ebook. (The USG is to the
right and above it is the Crypter)(But this is
probably one of the most advanced USGs you
will find, some can be very simple)
http://
http://
http://
http://
http://
http://
www.virustotal.com/
And there is also individual antivirus scanners, for example:
http://www.kaspersky.com/scanforvirus
http://www.bitdefender.com/scanner/online/free.html
http://
example:
http://
http://
All of what you just read is essential to keep in mind when making an FUD
Crypter. The sole reason behind why public Crypters always become detected
..and usually fast, is because the majority of people do not know the antivirus vs
Crypter concept.. therefore they either blindly upload there crypted files to one of
the scanner sites that distribute
also.. the antiviruses themselves are uploading there crypted files without them
even noticing. Even people who make there own Crypters arent aware of this
which is why they are always wondering why there crypted files always become
detected so fast.
http://
Anti-viruss have databases of these lines that are known to be associated with
malicious files. They use that database to check against your file to see if it
matches. If it does, then it is marked as infected. They do use other methods
of detection, but this is the one you will learn how to avoid.
http://
http://
Your crypter is going to take the contents of an infected file, encrypt them,
and place it at the bottom of a seemingly virus-free file called your stub.
Your stub file will then extract the encrypted data from itself, decrypt it, then
extract and run it. So just imagine if this stub file that is joined together with
the cryped infected file is detected? well.. then all the files you crypt will also
show up as detected since this stub is used with all the crypted files. This may
sound like a complicated and confusing process, but it isnt and i will explain
more about it later on.
http://
Heres another pic i found, (credits to hackhound) this explains all this in a
slightly different way, maybe you will understand it better:
http://
http://
seems people learn drastically easier to from video. If you have a more specific
question or issue, search google.
Ok so, from searching for a long time, i came to the conclusion that this site
teaches vb6 in the best most understandable/appealing way
http://www.vbtutor.net/vbtutor.html
just go through the table of contents and please try to go up until, not higher then,
lesson 18 and ignore all the ads on the sides and in between. You dont have to
go through all of them at once, or in the same day even. I would encourage you
to just refer back to the lessons at any given time and consistently, but slowly
moving forward each day. And remember.. to get more clarification or understand
more of it, always search youtube and google.
http://
Here is example crypter/stub projects in its simplest form that you can learn from,
there are comments explaining each part throughout the code
http://crypters.net/example-source.rar
just scim through it and try and get an idea of the different parts and what there
for, get familiar with it, if you dont fully understand it, its fine for now.
The best way for you to learn is by showing you a diverse set of tutorials, so
throughout this ebook, i will keep linking you different tuts. Heres one of the best
tutorials on how to make a simple Crypter from HF (hackforums.net if you arent
already a member, go sign up)
http://www.hackforums.net/showthread.php?tid=204038
With this you might get some more understanding of how it all fits together in a
different way and Remember, by knowing how it all works together, the more
easier it will be to undetect the code
One of the biggest issues that I should address are compatibility with different
OSs. Basically what affects the compatibility of certain OSs for example
32bit/64bit win7, xpN is almost always the RunPE module that you are using.
What I would do is really read up on the source im using and test it out first
before I go ahead and modify it.
The way i learned how to make crypters and different methods of undetecting
them is from constantly reading and modifying every Crypter i got my hands on. I
encourage you to do the same and just start searching and browsing through the
coding/vb sections on,
http://hackforums.net
http://hackhound.org
http://www.opensc.ws/forum.php
http://
http://
Once your there, you should see few options like project name, startup object, if
you want to change any of that then do it. So now go into the next tab called
Make.
Here you should see the version info, title of application, icon, and in the middle
you will see version Information with comments, version, company name, file
description..etc
All these options should be changed to anything random.. especially when
starting from someone elses source.
http://
do nothing with it. Now it may be more unlikely depending on how unique, but
the point is that ..even if your doing nothing with your stub and never crypt files,
eventually it will become detected, all will.
So to clarify, The fact that from all the other Crypters being distributed that for
example that use a specific method of execution using a specific api which has
slight relation to how your Crypter was made, will cause your crypter to also
become detected.
Now with all this in mind, i want to make sure your not getting the impression that
all vb6 crypters suck and they will all get detected easily.. because this is not
completely true. As long as you use the right techniques and have your own
unique and creative way of doing things, the longer the Crypter will last.. and just
to let you know, when a crypted file is distributed, its not like it will become
detected right away.. It takes about a week to a few weeks for a signature to
made on the file and updated into the database.
So a point i want to also get across while you understand this concept is that,
The most honest true approach you will learn in this ebook, is the fact that no
matter what undetection technique or method you use, there is no one technique
that will last forever, they all eventually become detected, which means that
theres no garantee for giving you a technique to easily just copy and paste to
make your fud crypter and live happily ever after, that would be a lie..
What This Ebook will give you, is a layout of the universal, proven
techniques that you can keep in mind so you can learn how they work, improve
upon them, and make variations of them to successfully make your own FUD
Crypters.
http://
http://
3. Now that we know the detection is coming from the RunPE module, we will put
the code back and drill down by first deleting each sub and function in the
module. We then find out the detection is coming from the CallAPIbyname
function
4. Now that we know which function is detected, we will then drill down further by
deleting each line of code. (depending on the size of the func, just delete each
segment and drill down from there, you can do the same for the modules, for
example you can delete the first half and second half of the function first)
5. Then once you found the string in the function thats causing detection the
whole undetection process comes into play. You can basically just recode the
portion of code thats causing detection in a very different or even slightly
different way and combine this what you will learn in the next chapter, or simply
only use whats in the next chapter alone.
Broad Signatures
For detecting broad signatures, its pretty much the same process, The only
difference is that you have to be aware of a few more things throughout the
process.
I will show you some examples of a broad signature in this situation,
Lets say the RtlMoveMemory api is causing detection. Now if we are taking
apart the code using the process i just showed, you will realize that the detection
is coming from the module but you wouldnt realize what is being detected inside
the module by doing the standard, remove each sub/func at a time. The reason
for this is that this api is used in multiple places throughout the module.
Sometimes you will even come across situations where variations of the same
piece of code is used throughout the module.
http://
http://
There are some vb6 crypter sources in the crypter sources section on this
page http://crypters.net/crypter-sources/
So pick which source you want to modify for the purposes of learning how
to use the techinques i will show you for undetection.
To some people, modifying another source and making it undetected, that
you didnt make from scratch yourself, means your a fake or a skid..
Now when undetecting, alot of effort and work usually has to be done.. so
why make it harder on yourself when theres already sources out there all
doing the same thing just in different forms..? Why Reinvent the Wheel??
In alot of cases, to undetect and keep your Crypter undetected, you have
to change around code, replace code, add code... to the point where
making the Crypter from scratch is almost the same thing..
Some people have different way of doing things and have their reasons..
but from what im teaching for learning purposes and for beginners, you
will start by reading other sources and modifying them,
then eventually you can just code a very sophisticated one from scratch
someday in the future.
So again.. my point is, for now especially there is no need to reinvent the
wheel..
http://
Adding junk code for modifying execution flow and various other reasons
Changing the order of all code aspects.
Changing variable names
String manipulation.
Change Assembly information
Add or change icon
The list goes can go on and on if you want to get specific and no specific
technique lasts forever, so The main thing to remember is to be very
creative and to try many.. MANY variations of ideas and techniques that
you think may confuse/distract/deceive antiviruses. Some antiviruses will
be deceived and bypassed easily with one technique even.. and another av
can be alot harder, so you would have to use variations of all these
techniques. This will definitely require dedication and effort, but can be
easy with a good set of techniques and practice. It all comes down to
experience and learning from it. I will be giving you and showing you
many examples that fall into the category of each of these methods so you
will get a perfect idea of how it all works so you can then use and improve
upon them with your own.
I will also be getting into automation tools that can do alot of these
undetection techniques for you instead of manually, but it is very
important that you understand how it all works manually because
eventually you will have to manually apply them.
http://
junk subs/functions
fake calls
fake variables
junk strings of text
fake loops
fake if/else
Basically all junk code is, is randomized portions of regular code which you
spread across your program that can either just be in between and/or throughout
your programs code, it can deceive or confuse execution but never actually
interferes too much with the process of execution to the point where it will
corrupt.
http://
http://
Heres a simple example of a Fake Call to a junk sub at beginning of sub main()
for slightly modifying execution flow
http://
http://
http://
String manipulation
Changing and encrypting strings/apis
Just like changing variables, changing strings can mess up your code if you
arent too cautious.. Especially when encrypting strings and apis.
Encrypting strings and apis are very powerful and is a must when it comes to
successfully creating a fully undetectable Crypter.
Some examples of string manipulation
Encrypt Strings
Reverse Strings
String conversion
There are many types of encryption algorithms to encrypt strings with for
example the most popular are xor, rc4, Rot, string to hex. A big issue most
people arent aware of is the fact that sometimes when encrypting strings with
some RunPE modules.. bad things happen, files become corrupt, the Crypter
itself can become corrupt...etc So always be cautious of your string manipulation.
There are some important strings to always make sure are changed or encrypted
in your Crypter.
The first to take note of is, The Key Split which is, in the example below:
meEncPass = thepassword. Change the string to something like:
aksefiaIUEHF@q#)*!qJFIAUEHFIwqNEOGq)#
and remember, this string has to be the same key split in both the stub project
and the crypter project or the crypter will not work and give you a subscript 9 out
of range error when running the crypted file.
The second to take note of is, all the strings in the RunPE module. 99% of the
time these have to be encrypted no matter which runPE module you use. So
always remember to encrypt these..
http://
http://
http://
If you dont want to, or cant download from those links, what i would do is search
through different forums with the names of the undetectors to see if there are any
other download links people are giving.
http://
you might be wondering, well what tool did i use to undetect my crypter?
I bought a pretty advanced undetector from pr!ngles on HF called pringles
undetector or src undetector for around $50 usd, i would highly recommend it but
im pretty sure he doesnt sell it anymore and also not sure if its techniques are
outdated.
Heres one of the threads with one of the versions of it (hopefully link is still alive)
http://www.hackforums.net/showthread.php?tid=220642&highlight=undetector
There should be others very similar to it or maybe even better nowdays, just
search through the sellers section of HF for undetector or something.
http://
http://
updated, But just because they are constantly being updated, dont let that
discourage you because usually a simple tweek to the method that worked a
month ago can work now and easily bypass the new detection, This is why you
must always be creative and learn from how the certain av works, what they
detect, and how they detect because it will help you GREATLY
http://
This section is undetection heaven.. people tell you and help eachother bypass
detections. In this section, lights will start flashing in your head, insights will
arise, and ideas will spark. Read through as many threads and pages as you
possibly can of undetection and malware on hackhound
Here another tactic to keep in mind.. basically WHENEVER a detection comes
up and you are stuck, search hackhound with variations of keywords related to
the av detecting it and the part of the code being detected for example,
copybytes avira which is referring to the api copybytes thats being detected and
avira being the av detecting it. Also what you can also do is just search with
variations of these same keywords related to your situation and search google..
or any other forum, you never know what you will find. I have had so many
detections solved from just doing extensive searching.
Goodluck.
Resources
If you have questions about something or want to learn more always refer to, and
search through
http://hackforums.net
http://hackhound.org
http://www.opensc.ws
http://
http://