UNDERCODE COMMUNITY
2.67K subscribers
1.23K photos
31 videos
2.65K files
80K links
πŸ¦‘ Undercode Cyber World!
@UndercodeCommunity


1️⃣ World first platform which Collect & Analyzes every New hacking method.
+ AI Pratice
@Undercode_Testing

2️⃣ Cyber & Tech NEWS:
@Undercode_News

3️⃣ CVE @Daily_CVE

✨ Web & Services:
β†’ Undercode.help
Download Telegram
πŸ¦‘ PAID HACKING PDFs
This media is not supported in your browser
VIEW IN TELEGRAM
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘Why is ODBC not a standard feature of Linux?
T.me/UndercodeTesting

1) Years ago, Microsoft announced a technology strategy called Windows Open Services Architecture (WOSA). The essence of WOSA is Open Database Connectivity (ODBC), which is a model of a universal database access service provided by the Windows platform, and database vendors provide adapters for their products.

2) Therefore, Windows applications can avoid the work of adapters written for data sources, and instead use the standardized ODBC framework to access data and concentrate on doing useful things.

3) The same idea is working elsewhere in Windows. For example, unified printer and modem access. And Microsoft did an excellent job to offset the differences between various networks. Windows network services can be run in the same way on TCP / IP, IPX / SPX and NetBEUI, because the platform abstracts the differences between these protocols on a middle layer.

4) "Microsoft is just a commercial company," the Linux community likes to think so. This statement has a lot of truth, but the true story is much more complicated. When Microsoft introduced WOSA-style abstractions into core services, it appeared as a reformer, and Unix / Linux was more like a hobble primitive.

written by undercode
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
This media is not supported in your browser
VIEW IN TELEGRAM
πŸ¦‘ EXPERT HACKING TIPS BY UNDERCODE
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁


πŸ¦‘ Using Linux as the CVS server1 version control concepts and the introduction of several version control tools
fb.com/UndercodeTesting

marked with version 1.1 of the concept of source files

πŸ¦‘source files is the most important a component of a software unit, the management of the source file is composed of the entire software management is the most important part Is the key to efficient software development. To manage source files, you must mark the source files. It is generally considered that only the file name is needed. In fact, the labeling of source files under a version maintenance tool includes two parts: File name and version. That is: the source file can be represented by the following binary tuple {filename, version}; the

1) > so-called version, the general software developers have an intuitive understanding, but it is difficult to make an accurate definition. Version, Refers to the potential existence of a specific instance of a specific object. A specific object here refers to a software component managed by a version maintenance tool, generally refers to a source file. A specific instance refers to a software developer from the software storage room A real copy of the restored software constituent unit with certain contents and attributes.

2) The definition of the version as a potential existence is based on the following Consider: The version is used as a representation part of the source file, and the software personnel's reference to it actually wants different source files corresponding to different versions, so the version is an abstraction. It is used to define the content and attributes that a specific instance should have. That is to say, the version is a potential existence of a specific instance, an abstraction of different incarnations of the source file.

3) With the above understanding of the concept of version. Everyone has a certain understanding of the version maintenance tool: the version maintenance tool should be for developers The storage method of shielded source files is transparent to developers. Developers do not need to understand what source files are in the software repository, but only need to explain what source files are needed and what source files are to be stored.The version maintenance tool is automatically completed. All this works. The theory about version maintenance also includes: version space, dimension, version representation, storage, merge and other theories, because we mainly explain the cvs linux server here, so everything is simple, friends who are interested in this aspect can read books

5) this tut talking about cvs is such a powerful tool. we first before telling cvs Introduce several other version maintenance tools.

πŸ¦‘ 1.2 Introduction to maintenance tools for several versions

1.2..1 SCCS

The full name of SCCS is Source Code Control System. Before the introduction, the concept of working file is defined. The so-called working file refers to the β€œwrite” permission obtained from the software storage room. Source files.

SCCS is a basic source file version control tool, which is suitable for the version maintenance of any text file. It is based on the version control of a single file. Generally, its software storage room and the file to be maintained are in the same directory.

When SCCS works, there is a special SCCS format file that retains the encoded version of its source file, which records enough information to generate a new version, and records who has the right to modify the file and has a "lock" for that version.


The version of SCCS is a good four-tuple, namely: release number, level number, branch number, sequence number (release, level, banch, sequence)


1.2.2 RCS

πŸ¦‘ WHAT IS RCS
1) > is another basic source code management tool, which is WALTER.f .Tichy was developed at Purdue University in Indina in 1980. RCS is similar to SCCS and is also a version maintenance system based on a single file. RSC manages files through RSC files; the maintenance process using RCS is similar to SCCS. It is also carried out according to the recovery submission

2) mode.It is not a detailed description of the RCS file. It is a storage room for source files in the RCS system. It is a special encoding file that contains sufficient information for developers to restore the old version of the source file for development. it usually .V suffix

3) as its structure:

? RCS head, the portion of the recording head corresponding to the version number of the file tree,

the version? description: this section describes the nature of the attribute of each node of the tree RCS

? initial Information: One part is what was expressed when creating the first RCS version

? File content

RCS is similar to SCCS. RCS organizes the maintained versions into a tree structure. However, RCS allows multiple branches, that is, the version number of RCS is not a quadruple like SCCS. The form is: issue number, level number, ( Branch number, serial number].


written by undercode
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

The two versions of maintenance tools have in common: the "lock" method is adopted, and users who insist on having a "lock" to the current question have the right to modify the file. . mechanisms they used the so-called "lock-modify-unlock". With this well-known that only a weakness, that is not so far a multi-user concurrent use.

2 build cvs server under Linux

2.1 Introduction and rationale CVS

CVS The full name is Current Version Control. CVS is a GNU software package. Developed by Intersolv, the latest version is 1.10.8. It is a maintenance tool based on the RCS system. It explicitly stores the source files and the user ’s The working space is independent, and it has expanded the recovery submission function of RCS in a certain mode. It makes it advantageous and parallel development.

CVS concentrates the RCS files of source files under a directory according to the hierarchy of its source tree. Absolute path by environment CVSROOT defined amount of
γ€€

visible The directory can be divided into two parts: part of the $ {CVSROOT} / CVSROOT, which contains some of the desired CVS RCS file management file as another part formed a source file, software development in accordance source tree structure . constitutedγ€€

on files in the CVSROOT, in later sections, to explain in detail the structure ,, and the workspace in the source code directoryγ€€

CVS source control is performed has the following characteristics:

1, the source separation space and user space.

The CVS system places the source code files under the repository.Users must modify the files to make a copy of the files under the repository before they can modify it.2

. Concurrent access to the

CVS system allows multiple developers to obtain the same version of the source file of the same file at the same time. Of course, this is also the main reason why CVS is widely used. When a developer extracts a file, he will create a copy in his workspace that is independent of other developers. The version number of this file is the same as the "header" version of the file, unless he uses the commit command to complete the permanent upgrade of the version. At this time, other users can use the undate command to match their version number with the "latest header version number.": If the user finds that the header version has changed after checkout, a new file can be formed using the rcsmerge command of the RCS system. This new file and including the original content, but also includes content modified by the user. this weakness and other conflicts occur simultaneously on the same file modification developers, can notify them manually modify
Therefore, CVS system is a Copy-modify-Merge algorithm and The advantage of this algorithm that is not the lock-modify-unlockj mechanism used by the two systems mentioned above is that software developers can get a copy of the source file (Copy) and will not lock the file. ", Thus providing the possibility for parallel development. After getting the copy, developers can modify it in their own development environment (Modify ), Then submit your modified file and merge it with the source file to form a new version.

3. The source file sharing

CVS uses $ {CVSROOT} for different users. Users can copy different templates according to their needs. after modifying the carrier to $ {CVSROOT}. in this way users can share source files. this is of course we have established the necessary CVS server

4, independent work environment

users make changes to develop in their own work environment, it is natural to work independently The environment is worth saying. CVS also supports a "lock" mechanism. Allows users to lock the template copy they have obtained

5, numerals

CVS To facilitate the introduction of a tag file located in the working directory of the user, and the CVS directory is a file operation he labeled specific tag file, i.e., the operation of the respective version, even if the The version has been modified.

2.2. Obtaining and installing

CVS CVS has a default installation in general Linux distributions. If your system is not installed, it does not matter, CVS can be easily obtained on the Internet. Its source code is in ftp : //202.113.29.4/pub1/unix/cvs It's documentation is at ftp://202.113.29.4/doc/cvs. Anyone can download it easily. At present his latest version is 2.10.8.

Installation The process is roughly as follows:

1. Unzip the downloaded compressed file in any directory.

2 Use the installation tool in the file package to complete the installation (with instructions). Usually it is:

make config

make install

(unavailable version, installation method may be different, specific see, it brought their own installation documentation)

γ€€

installation 2.3 server to use

after installing the CVS system we can start to install CVS repository. in the linux environment, CVS is generally based on the use of the command line And there is also GUI front-end tools, such as TKCVS etc. Here we will apply the general CVS command that is cvs [cvs options] cvs-command [command options] way to complete the configuration server.

2.3.1 software repository (repository) management

1 Create CVSROOT root directory

first edit the relevant environmental variables (CVS a few important environment variables are as follows:

CVSROOT warehouse full pathname of the root directory of

CVSREAD If set, indicates that the operation at the time of checkout all files are set to read-only

CVSBIN CVS use a lot of orders RCS, RCS tool path specified music

CVSEDITOR specify the user to write the log information used to edit When the

CVS_RSH server starts a remote CVS server, the name of the shell used

CVS_SERVER determines the name of "" cvs server "", the default is the CVS

CVSWRAPPERS cvswrapper script, which is used to specify the package file name.)

The important one is CVSROOT, It indicates the location of the warehouse is located, in the creation of a new warehouse, it is essential therefore generally necessary to add the definition of the environment variable CVSROOT as add the following two lines in the / etc / bashrc file

CVSROOT = / cvsroot

Export CVSROOT

or Directly execute

$ export CVSROOT = / cvsroot on the command line

and start creating CVSROOT at the corresponding location

$ mkdir cvsroot

$ cvs init

If there is no variable CVSROOT defined, this prompt will appear:

cvs init: No CVSROOT specified! Please use the '-d' option

cvs [initn aborted]: or set the CVSROOT environemnt variable

If you do not want to define environment variables, you can use this command:
cvs --d / cvroot init But even if you define CVSROOT, the content after the parameter --d will override it. If there is no error prompt, congratulations, your The CVS software library has been established. The

remaining question is how to use this repository for parallel software development and version control. And as a CVS administrator, you should set your user permissions. At this time, you There is a CVSROOT subdirectory under cvsroot. The following files are CVS configuration files.

There are a series of files with ls / cvsroot / CVSROOT. Their uses are as follows:

checkoutlist supports other management files in the CVSROOT directory, allowing for the setting of various CVS commands Information

commitinfo When the cvs commit command is executed, this file specifies the command to be executed when the file is submitted.

Cvswrappers Defines a wrapper program that will be executed when the file is registered or retrieved.

Editinfo allows you to log the log information before the commit command starts The executed script

history tracks all commands that affect the warehouse.

Loginfo is similar to coimmitinfo, only after the file is submitted. Executing

modules allows you to define a symbol for a group of files, otherwise you must specify the path name of the cvs repository for each file to be referenced ($ CVSROOT).

Nitify controls notifications from "" watch "". "" Watch "" by "" cvs watch add "" and "" cvs edit ""





Passwd default user passworld not stored files.

Set administrative privileges:

γ€€γ€€γ€€source files and directories under the administrator should set up warehouses right permissions to control access to all RCS files (ending in, v) is read-only, warehouse. the directory should have the right to write to the user, in order to allow it to change.

more 3.2.2 build software library

if you have several development team, they work without this coherent, you can create several different software libraries .All you have to do is to redefine the environment variable CVSROOT, or use -d to set, the advantage of using multiple software libraries is that they can be on different sever, CVS version 1.0 can not use a command to change from Take out the files from the software library, and in later versions, you can take the source code on different SEVER to your working directory. The following is an example of how to create a working directory under multiple software libraries:

cvs -d server1: / CVS CO dir1

cd dir1

CVS -d server2: / root CO SDIR

CVS Update

the first command creates a working directory, remove the file out in the third command software library on sever2 in the sever1 Some files and then use all of the files on the file sever2 upgrade.

Backup and Mobile 3.2.3 software library of

backup software library files and other backup files is no different, but you need a backup tool to open locked CVS. Such , You must first register a user who can read the software library, open the CVS software library, you need to edit the '# cvs.rfl' file.

When you want to use a backup soft library to restore the original library, if the original library You have made changes after your backup. CVS will report an error. You must follow the steps below

? Get a new working directory

? Copy the file that failed the last commit (of course, you can't copy the CVS directory file)

? Work in the new directory, use commands such as cvs update or cvs diff to point out those changes, and use cvs commit to save the changes to the software library.

If you want to move a software library to another place, it is also very simple. The easiest way is to create a new directory to the directory you want to move. If you want to reuse the original directory, you can only modify it manually. CVS / repository and `` CVS / Root, unless you're good at this, it is not advisable to use.

remotely using 3.2.4 software library into the next section we explain in detail the

remote user's management 3.3CVS
as a CVS server, Two points should be satisfied. First, ensure that the software library has enough space. Second, ensure that there is no less than 32M of memory. The server generates two processes for each user connected to it, and the cost of the child process is small. But if the network The bandwidth is not enough, and the cost on the parent process is huge.

Another large cost is the diff file. When the source file is large, the cost of verifying or detecting him is also large.

3.3.1 Below we have general Rsh used for remote login as an example, to talk about the way the remote user's login authentication:

Cvs of the server should use rsh allows the user to configure .rshosts connection, assuming that the user on the remote host tom.exsample.com tom need to be connected to funame.simple .com works on this cvs server. You should edit the .rshosts of the bach directory on the server side, add

Tom.exsample.com to the tom

client to run rsh –l bach funame.simple.com 'echo @PATH

Make sure that you can connect to the CVS server, and the customer should write the displayed path to .bashrc or cshrc (instead of .logiin or .profile.)

In addition, the client can also define the environment variable CVS_SEVER. To define The location of the host. On the server side, modify the /etc/ineted.conf file to tell the server to run cvssever when getting a specific port connection. The default value of this port number is: 2041. Of course, in order not to use it every time All settings must be set and can be used on the user side by defining the environment variable CVS_AUTH_PORT.

If the client's ineted allows the original call, just add the following sentence to the /etc/ineted.conf file to 2401 stream tcp nowait root / usr / local / bin / cvs cvs –f –allow –root = / cvsroot pserver

You can also use the-T option to define the buffer directory.

β€”allow – root defines the software library available to users, if there are more on the server The software library needs to re-use this sentence. In addition, internal users can define the environment variable CVSROOT like this

: pseve: usr@funam.simple.com: / cvsroot

where usr is the user name (Linux system) funam.simple.com is the cvs server, and it is assumed that / cvsroot is the directory name of the software library. Remote users can use the following form::

etx: psever: usr@funam.silple.com: / cvsroot

: etx: It is defined as a remote user, and the rest is the same as above.

If the client's ineded uses general calls, only in / etc / seveice Add the following sentence:

cvspsever 2401 / tcp

restart ineted to read the initialization file.

CVS manages users. In the default state (such as logging in with telnet), it uses the same username and password as the Linux system. That is: as long as you Log in to the linux system and have read-only permission to $ CVSROOT. Of course, for a software developer, you must have read and write permissions to the corresponding directory to complete the source code upgrade and other work. Therefore, CVS also provides Own user authentication system to manage users more conveniently.

There can be a passwd file (which can be defined with environment variable CVS_PASSFILE) under $ CVSROOT / CVSROOT on the server side to record user information of cvs. He uses linux etc / Passwd is organized in the same way. Similarly, its passwold is also encrypted by the Linux standard. The following is the content of a passwd

anyone:

tom: xyzkue

mary: yuio: pubcvs The

first line means that when logging in as anyone, No password is required. You can even type in an empty string. Of course, in this way, you may only get read-only rights. The second line means that you need to type passwold when tom login The encrypted passworld is xyzkue. After logging in this way, you can generally get higher permissions. The
third line means that when Mary logs in, you need to type in the password. Enter the same software library as the system user. The purpose is because .cvs will record all the actions of its users in the software library. Define different identities with system users. Use cvs.

For example; using the user tom can log in in the following way:

$ cvs --d: etx : tom@funam.simple.com: / cvsroot login

(If the username tom is the same internally at the remote end, tom @ can also be omitted)

At the same time, you can use cvs loginout to revoke all environment variables.

3.3.2, using GASSAPI to access

CVS also supports TCP using GASSAPI direct access before using safe transfer, need to be recompiled CVS GASSAPI the support. -with -gassapi use connected, or connected with the -a option always use the authentication mode room GASSAPI a manner identical.

but at the time of login is required to redefine as $ CVSROOT:

$ CVS -d: gsever: usr@cvssever.com: / CVSROOT Login

3.3.3 kerberos is directly connected

simplest use rsh method described above, said primary method. The feature is that all data is passed through an extra program. It is very time-consuming. If kerberos is installed. You can connect directly with TCP.

Also CVS needs to be recompiled to get keberos support. You can use --with-krb4 to connect. This way the transmitted data is not encrypted. If you want to obtain security. must be connected to the server and the client `` --enable-encryption. at this point, you apply common variable -x to request encryption.

required on the server side Editing inetd.conf to run cvs kserver client's default port number is 1999, if you want to use a different port number to be defined at the user end CVS_CLIENT_PORT..

At this point login command should be

cvs -d: kserver: faun.example.org: / usr / local / cvsroot checkout foo

3.3.4 connect with fork

In this way, you can connect to the software library of the local hard disk through a remote protocol. In other words, he can have the same function as: local: The login command in this way is

cvs -d: fork: / usr / local / cvsroot login

and with: etx: host name is the same as the default cvs.

4 cvs server racks and application examples

4.1 server installation configuration

assume that there are currently a work project, code needs to be administrator with the cvs internal development team is three people, an ip respectively. Yes: 192.168..1.2 (user name t1), 192.168.1.3) (user name t3), 193.168.1.3 (user name t3), one remote user, the host is tom.example.com. (User name is tom )

If you have installed cvs, it is very simple to set up a cvs server with cvs.exam.org. The steps are roughly as follows:

1) Log in as root. Create a repository (repository)

$ export CVSROOT = / cvsroot

$ mkdir / cvsroot

$ cd / cvsroot

$ cvs init

2) Set execution permissions

$ chmod / cvsroot / CVSROOT 744 (/ ccvsroo / CVSOOT is set to read-only)

$ chmod / cvsroot 764 Group number (/ cvsroot can be read and written by the development group)

3) Modify files In order to facilitate others to use, because the development team members are system users, so use the system here Username and password are better. First edit. The rhosts file is as follows:

tom.example.com. tom

modify the /etc/inetd.conf file on the server and add the following sentence

2401 stream tcp nowait root / usr / local / bin / cvs cvs -f --allow-root = / usr / cvsroot pserver

In this way, a basic cvs server is built.

We only provide a basic application here. The real details of cvs are very complicated. We only introduce some introductions. Friends who are interested can read it carefully. Installation document.

4.2 Application example

(using the cvs system on the host, you can telnet to the host, and then use it, and there is no difference with the local use, so this article has not mentioned it)

suppose that the tom in the above example wants to use the cvs system on the cvs host To develop with everyone. First it configures some of its own environment variables. First edit / etc / services to add: