Author Topic: How to start console command without typing long directory  (Read 1102 times)

darrenliew96

  • Full Member
  • ***
  • Posts: 146
  • Reputation: 3
How to start console command without typing long directory
« on: January 24, 2013, 07:04:35 am »
What you will need.
-iFile
-console app. Such as (msfconsole)
-time
-brain

Why this tutorial?
-Some console command require you to change directory when wanted to access the file. Such as msfconsole, you need to type in iSSH. cd /var/root/pentest/exploits/framework and then type ./msfconsole to access the console command. (the directory is the default directory of ininjas metasploit package) Which is quite annoying for some instance.

What what this tutorial about?
-This tutorial is about how to access console command fast and effective.
Such as when logon via root. We can directly launch msfconsole in iSSH by typing msfconsole.

How was this possible?
-This is possible by creating symbolic links at environment path such as usr/sbin or usr/bin. Symlink can act as shortcut in windows OS. But it was much more different than windows OS shortcut. Such as shortcut cannot replace a direct link because it's ink extension, while Symlink can make one file in another directory link to multiple location. And it is recoqnize by p0sixshell as direct link to the specific file.

For the real part.
Fire up iFile
Go to the destination of folder.
Try to recognize location of the directory or binary.
Then go parent directory until it cannot further down anymore.
Then go to /usr/sbin directory.
Press the edit button then the + button at the left side below the screen. Choose the symbolic link at the attributes section
Now for the final part.
Type in the directory or binary location at the link target box.
WARNING:NEVER ENTER THE WRONG LINK TARGET OF SYSTEM FILES. IT MAY LEAD TO SYSTEM PANIC OR BOOTLOOP.
Then press done to save the Symlink file.
Tada! All is done!

What technique is this frequently used on?
-When you jailbreak your system and first launch the cydia. It will show preparing file system. Actually, what they are doing is they aremoving the system file to second partition and Symlink it to the first partition. That is the mobile partition. This is because without moving the system file to second partition. The root partition will be outta space and eventually cannot fit in cydia apps or what we called jailbroken apps.

My tutorial had finished. Dont forget to +1 as I wrote it purely on an iPhone.

Ironman

  • Administrator
  • Hero Member
  • *****
  • Posts: 5152
  • Reputation: 252
  • Badges:
  • Computers: ASUS UL50VT
  • iDevices: iPhone 5, iPhone 4S, iPhone 4, iPhone 3GS
Re: How to start console command without typing long directory
« Reply #1 on: January 24, 2013, 09:01:50 am »
Nice one!! +1
Thanks for this. A good little tut.
Click for How to Add Our Repo
If you're going to ask questions....
At least make them good ones.

Knowledge is the one thing that can never be taken from you

Kipalo7

  • Full Member
  • ***
  • Posts: 161
  • Reputation: 13
  • Hacking: dis is for fun
  • Computers: Taken
  • iDevices: Ipod touch 3rd gen IOS 5.0.1
Re: How to start console command without typing long directory
« Reply #2 on: January 31, 2013, 07:14:11 pm »
I dont know what any of this is but i respect the time you took to make a tutoriual and belive u deserve more than one + cause it is also a high quality tut
BOOM hacked

A3MIRAL

  • Leader
  • Hero Member
  • *****
  • Posts: 2913
  • Reputation: 105
  • A3MIRAL -- Reporting for Duty
    • A3MIRAL
  • Badges:
  • Computers: Dell XPS15 (6 GB ram, Core i7 @ 2.0 GHz, 750 GB HDD @ 7200 RPM)
  • iDevices: iPod touch 3G 32GB, iPhone 5 32GB
Re: How to start console command without typing long directory
« Reply #3 on: January 31, 2013, 07:39:49 pm »
A similar tutorial for windows:

To start a command prompt in a certain directory, hold shift and right click on the directory in explorer, then hit "open command window here". Easy peasy :) (tested only on windows 7)

Ironman

  • Administrator
  • Hero Member
  • *****
  • Posts: 5152
  • Reputation: 252
  • Badges:
  • Computers: ASUS UL50VT
  • iDevices: iPhone 5, iPhone 4S, iPhone 4, iPhone 3GS
Re: How to start console command without typing long directory
« Reply #4 on: January 31, 2013, 08:25:13 pm »
Well it is a nice little tut. It lets you type a simple command in terminal to start a program. It explains everything well, and also explains the "how" and "why" as well. This is one of those things that noobs might not know. But is also the kind of thing that is often over looked. So all the more reason to have it.


Edit: Added to the FAQ in the Mod/Dev/Crypto Board
Title: How to Start Programs in Terminal Simply
« Last Edit: January 31, 2013, 08:30:32 pm by Ironman »
Click for How to Add Our Repo
If you're going to ask questions....
At least make them good ones.

Knowledge is the one thing that can never be taken from you

Don't like seeing ads? Click here to register!

Kipalo7

  • Full Member
  • ***
  • Posts: 161
  • Reputation: 13
  • Hacking: dis is for fun
  • Computers: Taken
  • iDevices: Ipod touch 3rd gen IOS 5.0.1
Re: How to start console command without typing long directory
« Reply #5 on: February 01, 2013, 05:03:22 pm »
Is this like the thing that you can use in video games like skirym to get rediculous things (on pc) or is that something else.....their both command something... I dont have a pc so im not shure but ive heard about it
BOOM hacked

LankAsif

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2406
  • Reputation: 90
  • Forum pride 8)
  • Badges:
  • Computers: i7 with bits and pieces
  • iDevices: iPod Touch 1G (Basically storage for iNinja tools), iPhone 5
Re: How to start console command without typing long directory
« Reply #6 on: February 01, 2013, 09:42:51 pm »
Is this like the thing that you can use in video games like skirym to get rediculous things (on pc) or is that something else.....their both command something... I dont have a pc so im not shure but ive heard about it
This is to make launching tools easier by not having to type out the path to file every time. You save the path and then when you want to use the tool you just use the command to run it. It's a time saver when using terminal.

Education is never achieved by wise men. it is only believed to have been achieved by fools

UberN00b

  • Hero Member
  • *****
  • Posts: 535
  • Reputation: 23
  • Perfection is a process.
  • Computers: em250-kav60 netbook
  • iDevices: iPhone 4
Re: How to start console command without typing long directory
« Reply #7 on: February 02, 2013, 06:28:52 pm »
I prefer placing files in /usr/bin/. I like making scripts such as this and I'll name this particular script "INT":
"ifconfig en0 promisc
 cd /var/mobile/pentest/exploits
 ./intercepter_ios 1 2 w"

+1 either way!
A million strands of spiderwebs weaved to make my vest!

Trcx528

  • Haxor
  • Hero Member
  • *****
  • Posts: 4540
  • Reputation: 168
  • Google it!
    • iNinjas
  • Badges:
  • Computers: 13" 2011 Macbook Pro, 120 GB SSD and 16 GB of Ram
  • iDevices: None
Re: How to start console command without typing long directory
« Reply #8 on: February 02, 2013, 10:31:51 pm »
^ This is my preferred way as well.  Preference I guess.

Alex47

  • Hero Member
  • *****
  • Posts: 1378
  • Reputation: 48
  • (I can't think of something funny to go here)
  • Computers: Asus k55v, custom built self-acclaimed tank of a pc
  • iDevices: iPhone 3G, iPod touch 4g, iPod touch 2g
Re: How to start console command without typing long directory
« Reply #9 on: February 03, 2013, 02:00:01 am »
Same but either way works, nice tut!
My Number:00110110 00110110 00110110

Don't like seeing ads? Click here to register!