[Python] Symlink shell 03-19-2012, 08:34 PM
#1
Here is some simply script. I was little drunk, so sorry if there is any errors ![Smile Smile](https://sinister.ly/images/smilies/set/smile.png)
For Linux :
For Windows :
![Smile Smile](https://sinister.ly/images/smilies/set/smile.png)
For Linux :
Code:
#Symlink Shell by c0ax aka KaiT_AleX
#Greetz b0ne^, baltazar
#Visit ljuska.org & darkartists.info
#Usage python symlink.py /home/username/fileuwant newfilename
#symlink.py /home/ljuska/config.php ljuskacon.txt
import os, sys
if sys.platform == 'linux' or sys.platform == 'linux2':
clsshit = 'clear'
else:
clsshit = 'cls'
os.system(clsshit)
else:
curr = sys.argv[1]
file = sys.argv[2]
secnddir = os.getcwd() + file
if os.path.islink(secnddir):
print "Link Exist"
print "Please change name of file"
print "Visit ljuska.org"
pass
else:
print "Making link"
print "File " + file + " created."
print "Visit ljuska.org"
os.symlink(curr, secnddir)
#EOF
#Script by c0ax aka KaiT_AleX
For Windows :
Code:
#Symlink Shell by c0ax aka KaiT_AleX
#Greetz b0ne^, baltazar
#Visit ljuska.org & darkartists.info
#Usage symlink.py /home/username/fileuwant newfilename
#symlink.py /home/ljuska/config.php ljuskacon.txt
import os, sys
if sys.platform == 'linux' or sys.platform == 'linux2':
clsshit = 'clear'
else:
clsshit = 'cls'
os.system(clsshit)
else:
curr = sys.argv[1]
file = sys.argv[2]
secnddir = os.getcwd() + file
if os.path.islink(secnddir):
print "Link Exist"
print "Please change name of file"
print "Visit ljuska.org"
pass
else:
print "Making link..."
print "File " + file + " created."
print "Visit ljuska.org"
os.system('mklink' + secnddir + curr)
#EOF
#Script by c0ax aka KaiT_AleX
![[Image: 1308031172619.gif?w=356&h=140]](http://thechive.files.wordpress.com/2011/06/1308031172619.gif?w=356&h=140)
Don't learn to hack, hack to learn.