Я засучил рукава и полез в сорцы.
Вот, что я нашёл:
- Код: Выделить всё
def startPortableTor():
print "(1) entering function startPortableTor()"
global tor_in, tor_out
global TOR_CONFIG
global tor_pid
global tor_proc
old_dir = os.getcwd()
print "(1) current working directory is %s" % os.getcwd()
try:
print "(1) changing working directory"
os.chdir(config.getDataDir())
os.chdir("Tor")
print "(1) current working directory is %s" % os.getcwd()
# completely remove all cache files from the previous run
#for root, dirs, files in os.walk("tor_data", topdown=False):
# for name in files:
# os.remove(os.path.join(root, name))
# for name in dirs:
# os.rmdir(os.path.join(root, name))
# now start tor with the supplied config file
print "(1) trying to start Tor"
if config.isWindows():
if os.path.exists("tor.exe"):
#start the process without opening a console window
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= 1 #STARTF_USESHOWWINDOW
tor_proc = subprocess.Popen("tor.exe -f torrc.txt".split(), startupinfo=startupinfo)
tor_pid = tor_proc.pid
else:
print "(1) there is no portable tor.exe"
tor_pid = False
else:
if os.path.exists("tor.sh"):
#let our shell script start a tor instance
os.system("chmod 0700 tor.sh")
tor_proc = subprocess.Popen("./tor.sh".split())
tor_pid = tor_proc.pid
print "(1) tor pid is %i" % tor_pid
else:
print "(1) there is no Tor starter script (tor.sh)"
tor_pid = False
if tor_pid:
#tor = subprocess.Popen("tor.exe -f torrc.txt".split(), creationflags=0x08000000)
print "(1) successfully started Tor (pid=%i)" % tor_pid
# we now assume the existence of our hostname file
# it WILL be created after the first start
# if not, something must be totally wrong.
cnt = 0
found = False
while cnt <= 20:
try:
print "(1) trying to read hostname file (try %i of 20)" % (cnt + 1)
f = open(os.path.join("hidden_service", "hostname"), "r")
hostname = f.read().rstrip()[:-6]
print "(1) found hostname: %s" % hostname
print "(1) writing own_hostname to torchat.ini"
config.set("client", "own_hostname", hostname)
found = True
f.close()
break
except:
# we wait 20 seconds for the file to appear
time.sleep(1)
cnt += 1
if not found:
print "(0) very strange: portable tor started but hostname could not be read"
print "(0) will use section [tor] and not [tor_portable]"
else:
#in portable mode we run Tor on some non-standard ports:
#so we switch to the other set of config-options
print "(1) switching active config section from [tor] to [tor_portable]"
TOR_CONFIG = "tor_portable"
#start the timer that will periodically check that tor is still running
startPortableTorTimer()
else:
print "(1) no own Tor instance. Settings in [tor] will be used"
except:
print "(1) an error occured while starting tor, see traceback:"
tb(1)
print "(1) changing working directory back to %s" % old_dir
os.chdir(old_dir)
print "(1) current working directory is %s" % os.getcwd()
А именно:
- Код: Выделить всё
print "(1) trying to read hostname file (try %i of 20)" % (cnt + 1)
f = open(os.path.join("hidden_service", "hostname"), "r")
hostname = f.read().rstrip()[:-6]
print "(1) found hostname: %s" % hostname
print "(1) writing own_hostname to torchat.ini"
config.set("client", "own_hostname", hostname)
found = True
f.close()
Отсюда видно, что ID, вроде как, берётся из директории "bin\Tor\hidden_service", из файла "hostname". Там ещё есть private key. Попробуй их положить от старого клиента.
Добавлено спустя 16 минут 34 секунды:Alex12d писал(а) 30.10.2014, 02:04:Не понимаю, зачем этот торчат и как им пользоваться. Мне пришлось зарегистрироваться повторно, потому что пароль у меня не записан, а все возможные простые комбинации моих паролей не подходят.
Ты точно про TorChat говоришь? Там никаких паролей нет, вроде бы, там ключ в файле.
Влечение к девочкам дано тебе природой. Но это лишь маленькая искра. Ты можешь обратить её во взрыв, который разрушит тебя, или в тёплое пламя, озаряющее твою жизнь и весь мир.