Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Shell 

CLI(Command Line Interface) In-Depth/Easy To Follow/Detailed

[Image: ZfQOqss.gif]

UNDERSTAND THIS IS FOR REAL BEGINNERS
This is not a pointless thread. This is a real topic I hear people having issues with and I think its a prevalent topic in today's new GUI formatting. Normally people don't know what goes on behind the program and this topic will explain that in a more restricted sense toward the CLI format.
[Image: 2z42LWL.gif]
Foreward

Any person in the IT field needs to know basic CLI (Command Line Interface). Now, normally people who see that when they are in the middle of a hack go, "Why do we need to do this old stuff?" or "What is this bullshit, I have Windows 8 not Windows 3.1!" Anybody who is a SUCCESSFUL HACKER has to know these basics and honestly it wouldn't hurt to know things about this area.
[Image: 2z42LWL.gif]
Deciphering CLI

So, how does it work? Its just as if your having a IM(Instant Message) session with your computer. The Computer starts off the conversation with a specific set of characters called a Prompt.
Code
Computer: Would you like to play a game?
Human: _

You proceed to type a command..

Code
Human: What kind of game?
Computer: _

The PC then executes the command and most likely displays information about the command you specified.

Code
Computer: A very fun game.
Human: _
(If you haven't caught on that's a scene from the movie War Game)

Once you get your new Prompt it means your able to put in your next instruction. :)
In today's new GUI's (Graphic User Interface) you can just give command by clicking your mouse. CLI is just like using the Search Bar in Google. You type in your Keyword and your press Enter. However, programs are restricted to the certain keywords that are embedded into that program.

Example of CLI: Let's say you want to open up and view the contents of a specific folder. From the command line, you would type a command(in this case "dir", we will discuss that too), and the computer would respond with a screen like this one.
Spoiler (Click to View)

In GUI, you would navigate to your C Drive(like a normal person) look for Users and then your name. Then it will display the same folders, just with more pizazz and pretty colors.
Spoiler (Click to View)
The point is that whichever interface you might use, the output is essentially the same.
[Image: 2z42LWL.gif]
Accessing the Command Line

There are several ways to get the Command Line using the Run Dialog Box

Windows XP: Click Start -> Select Run -> Type "cmd" or "command" (without the quotes) -> Press Enter (on your keyboard)
Windows Vista or 7: Locate the search bar in Start -> type "cmd" or "command" (without the quotes) and press Enter (on your keyboard)
Windows 8: On the keyboard hold down the windows key (4 tiles button) and press "R" -> type in "cmd" or "command" -> press Enter (on your keyboard)

Alternatively in the start menu under programs, theres an accessories link and you should click on the Command Prompt application.

If you take time to notice in this picture:
Spoiler (Click to View)
The default location the CLI refers to is the C:/Users/UserName.

At any point in the CLI you can type in the command "exit" and press Enter and the Window will close.
Spoiler (Click to View)
[Image: 2z42LWL.gif]
Command Prompt

Command Prompt is always focusd on a specific directory or folder (as most will call it). Any commands you give will be focused only on the objects found at where the command prompt is focusing. If you see a prompt look like this:
Code
C:/>
You should know that it is focused in the C Drive.
If the prompt looks like this:
Code
C:/Users/303315
It will be focused on the 303315 location.
[Image: 2z42LWL.gif]
File Names and File Formats

Windows recognizes each program and data as an individual file. Each file has a name, which is stored with the file on the drive.

Fun Fact: In true Windows DOS file types, none can be longer than 8 characters long. The file extensions can only be 3 characters long. Most computer programmers still honor those limits in reference to the basic Lets look at the unacceptable characters that cannot be included in the file name. Examples: ( / \ [ ] | + = ; , * ? ). The Period or dot is ALWAYS going to separate the file name and the file extension. This format or system was known as the "8.3 Naming System". (The name being 8 character and 3 character to represent the actual format)

All file types that are accepted throughout the system are based on Microsoft DOS. If we look at those file types by referencing the above information:
Code
john.exe
system.ini
test2.doc
driver.sys
logo [no extension just makes it a file]
teln.h
Those are the acceptable true file types that you can find on every OS.

Other File Types like:
Code
4charext.exec
waytoolong.fil
bad?char.bat
.no
These are not acceptable True file types. (inside the file names i showed the reason they were not true. char is short for character)

The extension is the MOST important part of the file type. The reason why is because the extension tells Windows what program the file should open with.
Program files use ".exe" (for executable) or ".com" (for command)
Anything that is not a program is some form of data to help support that program. Different programs use different types of files. For instance, Microsoft Word uses ".docx" (or .doc for versions prior to 2007), while WordPerfect uses ".wpd" and Powerpoint uses ".pptx" (or .ppt for older versions before 2007)

Changing the Extension of a file does NOT change its contents. All it does is confuse Windows into not knowing what program to open it with.

All files are stored on the hard drive in binary(http://bit.ly [WARNING: potentially infected]/11rIRMw) format. But every program has its own way of reading and writing this binary data. Every unique method of binary organization is called a file format. In order for programs to understand eachothers format, there had to be a common database of binary. This is now called "Ascii" or "American Standard Code for Information Interchange. Ascii defines 256 eight-bit characters. Alphabet letters, numbers, symbols.
Heres the full chart.
Spoiler (Click to View)

Ascii was great for a base of communication. Soon after, people around the world were being involved with computers and they needed their own version that incorporates their language. Eventually, the Unicode is invented and now it incorporates every character in most languages. the first 256 will always be the same as a tribute to Ascii.
[Image: 2z42LWL.gif]
Drives and Folders

When working with a CLI environment, you need to be able to focus the prompt at a specific drive and then the specific folder thast contains the programs and files you need to access. This can be a bit more complicated than it sounds like.

When Windows is booted, drives get assigned a letter(or name) to each hard drive partition(http://bit.ly [WARNING: potentially infected]/141ssE2) and to each disc or floppy drive. This is the order they are booted
Code
A:/   <- Floppy
B:\   <- Floppy (if installed)
C:\   <-Hard drive
all the way to
Z:\   <- Hard drive (if have more than one installed)

Optical Drives (or Disc Drives) are labelled a letter right after the last hard drive is installed

Whatever the Drive may be called, Windows uses a /141tHTz]Hierarchical directory to organize the contents of those drives. All files are pulled into a group called a Folder. You'll hear techies say "Directory" instead. That's a term used in the DOS days. A folder can be inside another folder (called subfolders). However, 2 files cannot be named the same thing. Any folder that starts as the first folder of many more is called the "root".

When you describe a drive, you use its letter and a colon.
Code
Example:
The C drive
C:
To describe as a root you add a backslash
C:\

The exact location of a file is called its Path.
Code
Possible paths
C:\Program Files
C:\WINNT\System32
B:\Reports
D:\
You should focus on PowerShell as it's far more powerful.
Really good tut! Nice basics. Helpful for noobs and CLI beginners.
Nice thread man. This should help out a decent amount of people who don't know anything about CLI.
Posted in the wrong section. CLI discussion goes here: https://hackforums.net/forumdisplay.php?fid=49
(May 30, 2013 01:14 AM)muzzy. Wrote:  Posted in the wrong section. CLI discussion goes here: https://hackforums.net/forumdisplay.php?fid=49

you see. that's debatable. The thing is, this is for beginners. And that section, made for experts, would find that useless.

(May 29, 2013 09:37 PM)Lawliet Lawsford Wrote:  Nice thread man. This should help out a decent amount of people who don't know anything about CLI.

Updated, Thanks for leaving the positive feedback. Much needed :)
This should be mandatory to read for all newbies, you did a good job writing this ;)
(Jun 2, 2013 11:55 AM)ViniPuh Wrote:  This should be mandatory to read for all newbies, you did a good job writing this ;)

Haha thank you, when i was a skid 5 years back i needed a Base to start on, and i wish i had a thread to start off with, and well this is exactly what i feel all noobies needed to start out with. it took me a week to write the first part in MS word and then i had to format it on here. and yeah well it just kept going. thanks for the positive feedback :)
>a humorous equation equaling the current year
>coding in batch
>bald man playing baseball with uneasy look on his face
(Jun 3, 2013 01:19 PM)eeee Wrote:  >a humorous equation equaling the current year
>coding in batch
>bald man playing baseball with uneasy look on his face

Uhm... this just is not relevant to my amazing tutorial right here.. 🤦‍♂
And of course, some aspiring bureaucrat had to move this to a section where it is 100% certainly not going to be read by the intended group, the newbies.. facepalm
(Jun 4, 2013 10:55 AM)ViniPuh Wrote:  And of course, some aspiring bureaucrat had to move this to a section where it is 100% certainly not going to be read by the intended group, the newbies.. facepalm

HAHAHA thatll be the person that knew nobody will look at this damn section... whatever... just report it and move on i guess.🤦‍♂
Hey. I really enjoyed your tutorial, though I wish you had more entries for me to learn from. It gave me alot of information that I didn't know from other tutorials! I was wondering if you could please make some more tutorials for me to go off of? 👍
(Jun 10, 2013 11:51 AM)copycatr Wrote:  Hey. I really enjoyed your tutorial, though I wish you had more entries for me to learn from. It gave me alot of information that I didn't know from other tutorials! I was wondering if you could please make some more tutorials for me to go off of? 👍

Totally, I am gonna be going over the fundamentals of commands in my next tut. It'll be about another week before I post. if not, ill make sure to post tonight.
Good work with the thread dude. Keep up the great work.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by HackersNov 11, 2025 09:42 AM 0 201 Nov 11, 2025 09:42 AM
Last Post: Hackers
by HackersDec 11, 2024 05:11 PM 21 524 Dec 11, 2024 05:11 PM
Last Post: padrino
by HackersDec 11, 2024 08:31 AM 23 679 Dec 11, 2024 08:31 AM
Last Post: Hackers