zzz.i2p

Development discussions
 
Tue, 16 Oct 2018, 07:52pm #1
michel
Contributor

Hello together,

is there a possibility to add/edit/delete entries in the private addressbook?
I was looking for the class net.i2p.addressbook.AddressBook but the class is not public.

Or is it possible to do that with the command line tools?

I do not want to work with the web-gui on localhost.

Kind regards
Michel

Wed, 17 Oct 2018, 01:53am #2
Qubes
I2P Legend

Probably not or not easy because it is part of router security! Use a dedicated text browser like links2 unless you want to get your hair pulled out and break your router security. You can de-source your own install but it will work only for your router.

Wed, 17 Oct 2018, 02:26pm #3
michel
Contributor

OK, thanks for the hint.
Can you tell me where I can find the entry of the private addressbook?
I cannot find a file named privatehosts.txt in the path C:\Program Files\i2p.
I can only find the entry over the webgui, the routerconsole.

Wed, 17 Oct 2018, 07:20pm #4
Qubes
I2P Legend

Just some rant that was triggered by your question! Skip to the bottom for some tools that will help or some people that will do what you want PARTIALLY and for 3-6 month only.

Favorite Quote: If you act stupid and pretend to be ignorant for to long, you will become stupid and ignorant.

Some Parallel: In the 1970's and 1980's the US auto industry lower their standards to create jobs (mechanics, parts dealers, gas stations etc). In 2008 they went bankrupt and I don't see a recovery but some half ass job of further lowering emission standards.

The consumer silicon story is a little more complicated but nevertheless similar. Besides the above reasons two more idiot ideas appealing to Powser Slaves (aka most politicians) were introduced. One is the Planned Economy (17th century idea that led to starvation and slavery see current Amazon goverment subsidies with USPS and Spy Agencies) the other Psychic Network (mostly IBM and Intell with the late commer Google). I saw a propaganda interview with some IBM dude behind a background of 1 billion dollars worth of server that was justifying his work... If you kill that "terrorist leader" (he did not say head of state) the terrorist network becomes more dangerous but if you kill "3-4 top guys" they all become peace law abiding like Gandi. If you know some history ... you begged to differ. But who cares if the money and job security is good...

I2P is currently on my good list because it maintains a level of knowledge that is badly needed (maybe some day I will contribute something if they do not form any unholy aliances) I wish they will add support for these 2 babies (it will eventually come even if they wanted or not Yubi u2f and Yubi NIST 2 since I'm a big fan of NIST DIN hardware security devices).
The last evil thing I heard with I2P of was some ransome notes in a kidnapping in Italy. Most likely the ones that solved that one read this forum.
Tor is on my neutral side currently sliding towards bad!

Some tips about your question: I2P uses keys that are both hardware fingerprinted during install (like most other software) with some software generation temp keys (some low level time algorithm and random number generation). These keys are used to encrypt the DB you are looking for.
Can you break that? For sure on Intel processors with a software emulation of your hardware. I've seen it done twice in 30 years. Assembly was used with single step, trace, break, traps etc...
Once some dude broke a proprietory driver and wrote a DO WHAT THE FUCK YOU WANT Licensed driver (his pay 25K-USD in 2 days). I'm not that good and will never be.
Once was done for revenge against an UnNamed software giant that cheated some guy of his pay (true I've been there). Software keys were broken and freely posted.
If you are looking for people to do that for you, there is a chino-viet group (Tien something) that breaks Windows software keys. You can download any Windows software including 10 from them for free and some OSX. Search and you will find!

A few warnings about I2P. There are many implementations on many different hardware guarded by a lot of top notch people. You are playing with fire even if you have a money printing press.

To keep some security (low level security) on the highly corrupted hardware that I'm currently using, I utilize Totems (not the player). Totems are indicators that will tell you when things go wrong and where. Everybody good enough uses them because it is hard to check everything! I don't bother to much with small intrusions but when things get bad... the termite and a UPS microwave are very close! Just a joke, I'm too old to care much!

Thu, 18 Oct 2018, 05:45am #5
michel
Contributor

Is it possible to add en entry in the private addressbook, without using the routerconsole ? for example with an notepadd++ or something like that?

Fri, 19 Oct 2018, 10:00pm #6
echelon
I2P Legend

Hi

Sorry, no idea, should be possible. Did you have had a check on SusiDNS on how that app manages it?
Also router does somehow add the addresses with the addresshelper link.
Maybe only possible in same java context, no idea.

echelon

Wed, 24 Oct 2018, 08:08pm #7
zzz
Administrator
Zzz

the API is net.i2p.client.naming.NamingService

All three addressbooks router, master, private are in a common hostsdb.blockfile file.

If you switch the naming service config from blockfile format to hosts.txt format, then you will have separate text files for each and you can just append to them with a shell script.

You could also add a subscription to a URL on your local eepsite (subscriptions are hosts.txt format) and append to that local file.

Sat, 27 Oct 2018, 01:56pm #8
Qubes
I2P Legend

lol... you can also have a text file loaded though your browser with a script.

From what I understand is that you want to know how to hack i2p, at least your router.

This is an artform and it works against tech giants and i2p too. You are wasting a lot of resources for nothing Sisif.
Here it is! Drum roll!

Watermarking Loop

You set up a eepsite and connect with a 0 length tunnel. If you want it to make it simpler just 2 routers with 0 length.

You pass watermarked files between the 2. If you know what you are doing (as far as the watermakers) you will have the encryption and compression and a better understanding of the process.

There are some standard watermarker files that people sell with the analyzing software. Everybody has their tools...

They say that there are no stupid questions. It is true. A question reveals a lot about your skills and tools. If you'd have asked for watermarking tools everybody
would have known that you are a force out there...

Sun, 04 Nov 2018, 04:53pm #9
Qubes
I2P Legend

Some BASIC hacking tools for java in general.
www.seleniumhq.org/docs/02_selenium_ide.jsp
https://nicolas.perriault.net/code/2012/introdu...

search for these oldies but goodies
htmlunit
ZAP (java)

To change your browser fingerprint profile (some included with Parrot OS)
multilogin https://multilogin.com/

I have not touch these tools in a very long time with the current routers. There are so many tools that is not even funny anymore. Overall the headless router is a very good piece of software that you should not mess with.

Mon, 12 Nov 2018, 03:56pm #10
michel
Contributor

Hello zzz,

I try
naming_service=hosts.txt
in file C:\ProgramData\i2p\addressbook\config.txt.
Did you talk about that switch ?

Sun, 18 Nov 2018, 08:16pm #11
micster
I2P Legend

To switch from using the Blockfile Naming Service database to the Hosts.txt Naming Service database, you need to edit router.config and add the following lines:

  • i2p.naming.impl=net.i2p.client.naming.HostsTxtNamingService
  • routerconsole.advanced=true

In Windows 10 you can find the file in C:\ProgramData\i2p\router.config and on Linux it will be somewhere like /var/lib/i2p/i2p-config/router.config.

Be sure to Shutdown and Restart your router for the changes to take effect. Adding the parameter routerconsole.advanced=true will allow you to edit the router.config directly from the admin interface located at http://127.0.0.1:7657/configadvanced

You will also probably have to create the two files referenced in the addressbook config.txt under the parameters master_addressbook and private_addressbook by hand.

Sun, 18 Nov 2018, 11:25pm #12
zzz
Administrator
Zzz

^^ that looks right to me. ^^
Sorry I didn't respond earlier, was out of town and am now very busy trying to catch up.

Tue, 20 Nov 2018, 01:41am #13
micster
I2P Legend

Hey zzz,

I'm a little confused about the parameter update_direct within the addressbook config.txt. The comments in the source code say:

// If false, add hosts via naming service; if true, write hosts.txt file directly
// Default false
if (Boolean.parseBoolean(settings.get("update_direct"))) {
// Direct hosts.txt access
File routerFile = new File(home, settings.get("router_addressbook"));
AddressBook master;
if (should_publish) {
File masterFile = new File(home, settings.get("master_addressbook"));
master = new AddressBook(masterFile);
} else {
master = null;
}
AddressBook router = new AddressBook(routerFile);
update(master, router, published, subscriptions, log);
} else {
// Naming service - no merging of master to router and published is supported.
update(getNamingService(settings.get("naming_service")), published, subscriptions, log);
}

If you want to write your addresses directly to master_addressbook (via external script) and have them merged with the addresses you receive from your subscriptions into your published_addressbook, would update_direct need to be set to true?

Does it matter if you write to master_addressbook (userhosts.txt) or router_addressbook (hosts.txt)?

Tue, 20 Nov 2018, 01:55am #14
micster
I2P Legend

On another note, is there a way to force an addressbook update?

When testing I would like to be able to fetch my subscriptions and see updates to the addressbook more often than once every hour or whenever they get polled.

Tue, 20 Nov 2018, 07:04pm #15
zzz
Administrator
Zzz

Not sure about update_direct, why don't you just try it?

Re: force update, click save on the subscriptions tab.

Tue, 20 Nov 2018, 07:56pm #16
micster
I2P Legend

wink Yep, you want to set update_direct=true otherwise the published host file does not get written.

Writing to either userhosts.txt or hosts.txt both seem to work. It's my understanding that userhosts.txt is never overwritten, not sure of the benefit to writing to that file versus appending to the bottom of hosts.txt yet. I will continue to experiment.