diff --git a/_zola/config.toml b/_zola/config.toml deleted file mode 100644 index 72b516a..0000000 --- a/_zola/config.toml +++ /dev/null @@ -1,16 +0,0 @@ -# The URL the site will be built for -base_url = "/" - -# Whether to automatically compile all Sass files in the sass directory -compile_sass = false - -# Whether to build a search index to be used later on by a JavaScript library -build_search_index = false - -[markdown] -# Whether to do syntax highlighting -# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola -highlight_code = false - -[extra] -# Put all your custom variables here diff --git a/_zola/content/tor/index.md b/_zola/content/tor/index.md deleted file mode 100644 index 007f672..0000000 --- a/_zola/content/tor/index.md +++ /dev/null @@ -1,7 +0,0 @@ -+++ -title = "Services on Tor" -+++ -- [Gemini](gemini/) -- [Gopher](gopher/) -- [Nex](nex/) -- [Web](web/) diff --git a/_zola/content/tor/web/index.md b/_zola/content/tor/web/index.md deleted file mode 100644 index 97506d6..0000000 --- a/_zola/content/tor/web/index.md +++ /dev/null @@ -1,21 +0,0 @@ -+++ -title = "Websites on Tor" -+++ -- [Alternative Frontends](frontend/) -- [Chat](chat/) -- [Cooking](cooking/) -- [E-mail](email/) -- [Forums](forum/) -- [Government](government/) -- [Guides](guide/) -- [Misc](misc/) -- [Music/Web Radio](music/) -- [News](news/) -- [Organizations](organization/) -- [Personal Sites and Blogs](personal/) -- [Projects](projects/) -- [Search Engines](search/) -- [Site Directories](directory/) -- [Tools](tools/) -- [Version Control (Git, SVN, etc)](vcs/) -- [Wikis](wiki/) diff --git a/_zola/content/tor/web/music/index.md b/_zola/content/tor/web/music/index.md deleted file mode 100644 index 3669e4f..0000000 --- a/_zola/content/tor/web/music/index.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "Music and Web Radio on Tor" -+++ -- [Deep Web Radio](http://anonyradixhkgh5myfrkarggfnmdzzhhcgoy2v66uf7sml27to5n2tid.onion/) -- [No Tone](http://lgmtjgfpqk6hpik7yygkhavqivn6wsmfa7s7vszmcxwqkpwodinbhnad.onion/) -- [Rádio CBS](http://cbsrdi4vw4orqehzp2f4a4z36pmqbr2jsbf3piofifncqdnbx6movryd.onion/radiocbs/) diff --git a/_zola/content/tor/web/organization/index.md b/_zola/content/tor/web/organization/index.md deleted file mode 100644 index add5f2f..0000000 --- a/_zola/content/tor/web/organization/index.md +++ /dev/null @@ -1,7 +0,0 @@ -+++ -title = "Organizations on Tor" -+++ -- [FSKY](http://fsky42e4xj4o4q7xiyxzodqvd75iwgztywxtbugdmixamrmui5l4vhid.onion/)* -- [Disroot](http://j4dhkkxfcsvzvh3p5djkmuehhgd6t6l7wmzih6b4ss744hegwkiae7ad.onion/en)* -- [everypizza.im](http://epim22cnhxerm2k4e3tmmjzyfzymzdemumj6uxaesjnu7tk5nwjnl7yd.onion/)* -- [riseup.net](http://vww6ybal4bd7szmgncyruucpgfkqahzddi37ktceo3ah7ngmcopnpyyd.onion/index.en.html)* diff --git a/_zola/content/tor/web/personal/index.md b/_zola/content/tor/web/personal/index.md deleted file mode 100644 index b0f5fa6..0000000 --- a/_zola/content/tor/web/personal/index.md +++ /dev/null @@ -1,69 +0,0 @@ -+++ -title = "Personal Sites on Tor" -+++ - -## With Blogs -- [0x19](http://ilsstfnqt4vpykd2bqc7ntxf2tqupqzi6d5zmk767qtingw2vp2hawyd.onion:8080/index.php) -- [Aidan](http://aemdotshis7lvjpvsutcksb53wqo2cunwdb62ednagwjiy7rdckx2eyd.onion/) -- [Alden Page](http://aldenp5fkdeagzwb7j4snypyxm76tucru2bm2b4bwdfd76k2dfti4tad.onion/) -- [Alex Xu/Hello71](http://duwq3shurnywtxq5z76dbcy7gbqyjgel4vzauxupuc4v773tiyxif5qd.onion/) -- [Alexander Hansen Færøy](http://lxwu7pwyszfevhglxfgaukjqjdk2belosfvsl2ekzx3vrboacvewc7qd.onion/) -- [Arav's dwelling](http://moq7aejnf4xk5k2bkaltli3ftkhusy2mbrd3pj23nrca343ku2mgk4yd.onion/) -- [Artemis' Blog](http://lpoaj7z2zkajuhgnlltpeqh3zyq7wk2iyeggqaduhgxhyajtdt2j7wad.onion/) -- [Ben Stokman](http://benji3up2kxewkqfcq7buxk2xd6zwy3zggnurkrm3l4cvwy2iipvyyad.onion/) -- [Ben Tasker Snippets](http://phecoopwm6x7azx26ctuqcp6673bbqkrqfeoiz2wwk36sady5tqbdpqd.onion/) -- [Ben Tasker](http://e26whn2524322mkxb3cbyk27ev2ihhq2biz35hty7gzgsyrwrygq27yd.onion/) -- [BurnyLlama's Blog](http://qwikoov6bmdskhp5o32d2ju6nntwhpdhcrjnllajdryq5gvxfamgffqd.onion/) -- [Chris Partridge](https://tweedge32j4ib2hrj57l676twj2rwedkkkbr57xcz5z73vpkolws6vid.onion/) - Howdy, I'm Chris Partridge, a Security Engineer. I do cybersecurity things with a focus on effective software security and internet-scale research. -- [Coding Otaku](http://3oamv2de6ooacy72hv3ulym3i3vvlprlkqas7hhzo4pu5nyxnji37zad.onion/) - A website about web technology, Privacy, FOSS, Minimalism, Anime, and more! -- [Colin Cogle](http://colincxvz44tojjdzbpesebml5pnyzl2g2qcy7ixhmghhkfqo64zmdyd.onion/) - Living in Connecticut, working in California, and helping people all over the world. Whether I'm managing effective teams of awesome IT workers, writing articles, creating and contributing to open-source projects, or telling awful jokes, I'm doing my part to make the world a little bit better. -- [Conduition](http://conduit4u4zsimbgvcatj6lyy36ot6k7w7bvbvivgwhbgzs7gfds7qad.onion/) - The personal blog of a pseudonymous cypherpunk. My specialties are cryptography, scriptless smart contracts, and multi-party computation. -- [Daniel](http://danielas3rtn54uwmofdo3x2bsdifr47huasnmbgqzfrec5ubupvtpid.onion/) -- [Dead End Shrine](http://blapi36sowfyuwzp4ag24xb3d4zdrzgtafez3g3lkp2rj4ho7lxhceid.onion/) -- [Etam Software](http://go7cnxivpns4x2trczyaabxwnrz7bwlxjiverkc32o4mjd5npjukpqid.onion/index.html) -- [Feeding the Cloud](http://xfdug5vmfi6oh42fp6ahhrqdjcf7ysqat6fkp5dhvde4d7vlkqixrsad.onion/) -- [Fonzi Vazquez](http://t7mhyj7a3ukowy6zpsmymxcrpspjxaqwlhmvfpf34cstzoj6c7lupxyd.onion/) -- [Hi](http://mdgdxj5d7wlgq3m6e4fvca5sgnbvejsyjh3sqh3p3tfngcnrhpuy3aid.onion/) - This is a web page about things I want to write about. I wrote it, so I'm fairly sure it's stuff I want to write about. If not, then that's an accident and you shouldn't read it. -- [Hidden Wonders](http://hidwon6exyvzjhvqnyvfrnfumhonxqu7mhc4ftv2ewmpul3vj2b2uuid.onion/) -- [Jake Jarvis](http://jarvis2i2vp4j4tbxjogsnqdemnte5xhzyi7hziiyzxwge3hzmh57zad.onion/) -- [Joseph Duffy](http://josephdepqbvoq7tm7uvynwmsji4354zmd3yp3rrtc245rilvq4ixayd.onion/) -- [Joseph Nuthalapati](http://isprwrxfqg7zx22as3e27qiz2jwo2usmjvautudhp6skrvkm77hjpzid.onion/index.html) -- [Julien Lepiller](http://c25o7knygjm3m67jy27yuynvv4pkfi25naucscmh4ubq2ggiig3v57ad.onion/en//) -- [Matt Traudt](http://tv54samlti22655ohq3oaswm64cwf7ulp6wzkjcvdla2hagqcu7uokid.onion/) -- [McRetro Network](http://mcretro4lov3ycyvikjdeer3dgl5wel5aer6xakj5mxa26a3qvrp22qd.onion/) -- [Michael Altfield](http://michaelahgu3sqef5yz3u242nok2uczduq5oxqfkwq646tvjhdnl35id.onion/) -- [Ming Di Leom's Blog](https://xw226dvxac7jzcpsf4xb64r4epr6o5hgn46dxlqk7gnjptakik6xnzqd.onion/) -- [My Unix blog](http://jentyxddh2rf47gd3e43kuebyn2xsv6h72gzh46oe4rxyovvm7xe5ead.onion/) -- [ParanoidPenguin](http://4hpfzoj3tgyp2w7sbe3gnmphqiqpxwwyijyvotamrvojl7pkra7z7byd.onion/) -- [PieroV](http://pierovggsterf4w5xplynqtl56srftc242l3g2xloqlty6nv7372xuyd.onion/) -- [Quantum](http://quantumagvxei55qyvhlj3zljkjryzzvvgckynsfr4r7tqgmiufj75qd.onion/) -- [Redshift Observatory](http://www.l24qgjfin436fqou22lusrbqmvoysp6jeey5fdn2fr7zzzv2e35jwrid.onion/) -- [Rustic Cyberpunk](http://kpz62k4pnyh5g5t2efecabkywt2aiwcnqylthqyywilqgxeiipen5xid.onion/) -- [S-Config](http://xjfbpuj56rdazx4iolylxplbvyft2onuerjeimlcqwaihp3s6r4xebqd.onion/) -- [Seth For Privacy](http://sfprivg7qec6tdle7u6hdepzjibin6fn3ivm6qlwytr235rh5vc6bfqd.onion/) -- [Seth Foster](http://zifewwhacylo5bnwyrwgmipuuchkt6efhahmvxis2by3qlcaqiye5lyd.onion/) -- [Simon Ramsay](http://ramsayswljlwqo7yvw3ovxhyzavllyduxkgh4rbobzkc263jyro6cjyd.onion/) -- [Starcom Electronics](https://y6ncaorlmtyhh6a4qmw3rtugcyaj3grh4q2hqb7c4z76c3bgc3qpehad.onion/) -- [Syst(em)](http://kcfz5m3ipji262swznq2ybir3m4b5wwwd7zckhfashp6cuuwyr6ovnyd.onion) -- [The Arcade](http://artic725lafwfqnygqxraupupg7dtbf4own767duq2bxj3t7dszvzmid.onion/blog/) -- [The CozyNet Blog](http://kfgw55ndxkdnxu42cntbm3fd7tthrxgruq4bewaxhc7iytysetmreuyd.onion/) -- [The McGovern](http://mcgovern7dgred44sj754dqvjlj26ri2fmalo6fsoj2p2nlczijeguad.onion/) -- [TheYOSH](http://theyoshxgvcjm4s2xdt6zcjym4kgskibrlos6fai26yes4bhpia5z7qd.onion/) -- [Tomas' place in cyberspace](http://pfcgmo5hwfffwhis3zty2u2ufryrnzypue34h74va6ykw5iazgcvvtqd.onion/) -- [Udonya](http://gpvdip7rd7bdy5gf7scl3rzgzgzckqw4sqxbmy6g3zijfwu4lz3ypbyd.onion/) -- [Voxel](http://voxel.fsky42e4xj4o4q7xiyxzodqvd75iwgztywxtbugdmixamrmui5l4vhid.onion/) -- [Xameren](http://xameren.fsky42e4xj4o4q7xiyxzodqvd75iwgztywxtbugdmixamrmui5l4vhid.onion/) -- [arrrr](http://arrrrv3dzzoluxubt3p24lpn7qu4rxuem3fb4kcmboji3dgpkgt4b2ad.onion/) -- [b10c](http://kd6oox7aowzt5ypwdp2o5curwkgtjjzzk33ecejomm52epjr74daoeid.onion/) - I work fulltime on open-source Bitcoin projects. I’m interesting in Bitcoin data and have been monitoring the Bitcoin network for a few years now with the goal to feed insights back into Bitcoin development. I run mempool.observer, the Bitcoin Transaction Monitor, transactionfee.info, the miningpool.observer, fork.observer, and have worked on many other projects over the past years. -- [cwoellner.com](http://cwoellfbmoo4fwpewmtwoy3nrf2rqm7aujnupj3tsawabu4m66sybead.onion/) - I use this site to write about mainly tech-related topics, but occasionally I might write about unrelated topics. -- [dotya.ml](http://6426tqrh4y5uobmo5y2csaip3m3avmjegd2kpa24sadekpxglbm34aqd.onion/) -- [getimiskon's space](http://r53zi7kxyqd72fuvhztzi25fo2bze7fqjefze7k6t6kiq74pzaq5suyd.onion/) -- [wanderlost](http://wl.zyae5rxcjcezkozdbjb6oabzegiu6erx5e3o6mcl73qzzphhu2adu5yd.onion/) -- [~funderscore](http://skhffpwzrxtv3rqtvzccsk227nvwdvkplha2ghwqvsulbfu4azgrcwyd.onion/index.html) -- [マリウス](http://z5yuzvitz4lynnaijdwmu6gkh2lnkjqmasv2jknf3biz6tkyxd4uszyd.onion/) - A blog about Japan and technology (usually not both at once) - -## Without Blogs -- [Nyx](http://tgirlfyvp3q5if55wonoletc25kmyijkokd3anaogrdpoeb4h6ibfkad.onion/) -- [Purplebored](http://niko.fsky42e4xj4o4q7xiyxzodqvd75iwgztywxtbugdmixamrmui5l4vhid.onion/) -- [Vel](http://vel.fsky42e4xj4o4q7xiyxzodqvd75iwgztywxtbugdmixamrmui5l4vhid.onion/) -- [interloper](http://intrcxv4fa72e5ovler5dpfwsiyuo34tkcwfy5snzstxkhec75okowqd.onion/) diff --git a/_zola/content/tor/web/search/index.md b/_zola/content/tor/web/search/index.md deleted file mode 100644 index afd2a1e..0000000 --- a/_zola/content/tor/web/search/index.md +++ /dev/null @@ -1,4 +0,0 @@ -+++ -title = "Search Engines on Tor" -+++ -- [Ahmia](http://juhanurmihxlp77nkq76byazcldy2hlmovfu2epvl5ankdibsot4csyd.onion/)* - Ahmia is a search engine on Tor that actively removes abuse material. Filled with spam, unfortunately. diff --git a/_zola/content/tor/web/vcs/index.md b/_zola/content/tor/web/vcs/index.md deleted file mode 100644 index e0b644d..0000000 --- a/_zola/content/tor/web/vcs/index.md +++ /dev/null @@ -1,7 +0,0 @@ -+++ -Title = "Version Control hosts on Tor" -+++ - -# Git -## Private -[Some Guy's Gitea](http://z5yuzvitz4lynnaijdwmu6gkh2lnkjqmasv2jknf3biz6tkyxd4uszyd.onion/) - Some random's Gitea, mostly (if not all) mirrors diff --git a/_zola/content/yggdrasil/web/directory/index.md b/_zola/content/yggdrasil/web/directory/index.md deleted file mode 100644 index 8e8073b..0000000 --- a/_zola/content/yggdrasil/web/directory/index.md +++ /dev/null @@ -1,5 +0,0 @@ -+++ -title = "Directories on Yggdrasil" -+++ - -- [Yggdrasil Web Directory](http://[21e:a51c:885b:7db0:166e:927:98cd:d186]/) diff --git a/_zola/content/yggdrasil/web/forum/index.md b/_zola/content/yggdrasil/web/forum/index.md deleted file mode 100644 index 5919f5d..0000000 --- a/_zola/content/yggdrasil/web/forum/index.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "Forums on Yggdrasil" -+++ - -- [Midgard Forums](http://[300:5506:25eb:d0d9::1]/) -- [Yggdrasil Community](http://[21a:34aa:c782:3ad]/) diff --git a/_zola/content/yggdrasil/web/personal/index.md b/_zola/content/yggdrasil/web/personal/index.md deleted file mode 100644 index cf79cdb..0000000 --- a/_zola/content/yggdrasil/web/personal/index.md +++ /dev/null @@ -1,20 +0,0 @@ -+++ -title = "Personal Sites on Yggdrasil" -+++ - -- [20plays](http://[200:15a4:9d2e:6f4b:7f41:82e:1b64:aa08]/) -- [Array in a Matrix](http://[300:5506:25eb:d0d9:1000:1000:1000:1001]/) -- [Kajero de Tenno Seremelo](http://[205:5e3:7fb2:da3c:ea37:7266:3d3e:acfd]/) -- [MadaMada](http://[304:6a74:dd1e:301d::222]/) -- [Neil Alexander](http://[219:3cf0:dd1d:47b9:555e:75ac:2ab5:493b]/) -- [Nikat](http://[202:a2a5:dead:ded:9a54:4ab5:6aa7:1645]/) -- [Purplebored](http://[300:5506:25eb:d0d9:1000:1000:1000:1002]/) -- [Stargrave](http://[222:3bd:cc26:9545:caaa:9fd6:ec56:cc1]/) -- [Willow](http://[21c:fb97:849f:852a:aee7:1c87:c49e:1c7e]/) -- [acetone](http://[324:71e:281a:9ed3::ace]/) -- [deavmi](http://[203:75b7:45af:ecca:d641:cd42:38dc:4788]/) -- [kk-on](http://[200:53dd:4da7:82fb:12a3:942f:b05f:c64]/) -- [terminaldweller](http://[21e:cd57:a147:322a:723b:a322:e4c8:c26e]/) -- [unixeno](http://[200:79fe:5638:81c4:a14c:4cd3:40d9:76d0]/) -- [vel](http://[300:5506:25eb:d0d9:1000:1000:1000:1003]/) -- [wanderlost](http://[300:5506:25eb:d0d9:1000:1000:1000:1000]/) diff --git a/_zola/templates/index.html b/_zola/templates/index.html deleted file mode 100644 index 02fd0d9..0000000 --- a/_zola/templates/index.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - {% block title %} - Midgard Link Directory - {% endblock title %} - - - -

Midgard Link Directory

- {% block content %} -

- This is a collection of links to sites and services on darknets maintained - by the Midgard community. -

-
- -
-
- -
-
-

I2P

-

- The Invisible Internet Project (I2P) is a fully encrypted - private network layer. It protects your activity and - location. Every day people use the network to connect with - people without worry of being tracked or their data being - collected. In some cases people rely on the network when they - need to be discrete or are doing sensitive work. -

-
-
-
- -
-
- -
-
-

Tor

-

- Tor is a free overlay network for enabling anonymous - communication. Built on free and open-source software and - more than seven thousand volunteer-operated relays - worldwide, users can have their Internet traffic routed via - a random path through the network. -

-
-
-
- -
-
- -
-
-

Yggdrasil

-

- Yggdrasil is a new experimental compact - routing scheme. It is designed to be a - future-proof and decentralised alternative - to the structured routing protocols - commonly used today on the Internet, as - well as an enabling technology for future - large-scale mesh networks. -

-
-
-
-
- {% endblock content %} - - - diff --git a/_zola/templates/page.html b/_zola/templates/page.html deleted file mode 100644 index a55ee97..0000000 --- a/_zola/templates/page.html +++ /dev/null @@ -1,4 +0,0 @@ -{% extends "index.html" %} -{% block content %} -{{ page.content | replace(from="%5B", to="[") | replace(from="%5D", to="]") | safe }} -{% endblock content %} diff --git a/assets/css/linkdir.css b/assets/css/linkdir.css deleted file mode 100644 index fe7ceaf..0000000 --- a/assets/css/linkdir.css +++ /dev/null @@ -1,44 +0,0 @@ -body { - font-family: Arial; - background-color: #B8B7B4; - color: black; -} - -.card { - background-color: #D0CEC4; - display: flex; - align-items: center; - border: solid; - border-radius: 7px; - border-width: 2px; - border-color: white; - margin-bottom: 10px; -} - -a, a:link, a:visited, a:hover { - color: blue; - text-decoration: none; -} - -.card-link, -.card-link a, -.card-link a:link, -.card-link a:visited, -.card-link a:hover { - color: black !important; - text-decoration: none; -} - -h2, p { - display: block; -} - -.icon img { - width: 150px; - margin-left: 10px; - margin-right: 10px; -} - -ul { - list-style: none; -} diff --git a/assets/images/logo/i2p.svg b/assets/images/logo/i2p.svg deleted file mode 100644 index 0c0d008..0000000 --- a/assets/images/logo/i2p.svg +++ /dev/null @@ -1,2001 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/logo/tor.svg b/assets/images/logo/tor.svg deleted file mode 100644 index 84fd9b4..0000000 --- a/assets/images/logo/tor.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/assets/images/logo/yggdrasil.svg b/assets/images/logo/yggdrasil.svg deleted file mode 100644 index 660ad3b..0000000 --- a/assets/images/logo/yggdrasil.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/code/linkgen.c b/code/linkgen.c new file mode 100644 index 0000000..9cc7489 --- /dev/null +++ b/code/linkgen.c @@ -0,0 +1,167 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* compile with `clang listgen.c -std=c89 -I/usr/include/libxml2 -lxml2' */ +#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE_EXTENDED 500 + +#include +#include +#include +#include +#include +#include +#include +#include + +#define SMALL 1024 /* 1.0KiB */ +#define BIG 524288 /* 512KiB */ + +char *files_list[BIG]; +char *filename; +int i = 0; + +regex_t regex; +int result; + +void help(char program[]) { + fprintf(stderr, "Usage: %s /path/to/xml\n", program); + fprintf(stderr, "For example, %s /srv/http/users/*/site-meta.xml\n", program); + exit(EXIT_FAILURE); +} + +char* get_child(const char *parent, const char *tag, xmlDocPtr doc, xmlNodePtr node) { + /* get the content of a nested element */ + static char out[BIG]; + xmlNodePtr child_node = NULL; + while (node != NULL) { + if (!xmlStrcmp(node->name, (const xmlChar *)parent)) { + child_node = node->children; + break; + } else { + node = node->next; + } + } + + while (child_node != NULL) { + if (!xmlStrcmp(child_node->name, (const xmlChar *)tag)) { + sprintf(out, "%s", xmlNodeListGetString(doc, child_node->xmlChildrenNode, 1)); + return out; + } + child_node = child_node->next; + } + + return "NOT_FOUND"; +} + +char* get_tag(const char* tag, xmlDocPtr doc, xmlNodePtr node) { + /* get the content of an element */ + static char out[BIG]; + while (node != NULL) { + if (!xmlStrcmp(node->name, (const xmlChar *)tag)) { + sprintf(out, "%s", xmlNodeListGetString(doc, node->xmlChildrenNode, 1)); + return out; + } + node = node->next; + } + return "NOT_FOUND"; +} + +const char* gen_xhtml(const char* filename) { + /* This function is more close to being the actual main one, + it's where the HTML is generated. */ + xmlDocPtr source = xmlReadFile(filename, NULL, 0); + xmlNodePtr cur = NULL; + static char out[BIG]; + + /* these just check if the file is really messed up */ + if (source == NULL) { + fprintf(stderr, "failed to parse file\n"); + xmlFreeDoc(source); + } else { + cur = xmlDocGetRootElement(source); + } + + if (cur == NULL) { + fprintf(stderr, "empty\n"); + xmlFreeDoc(source); + exit(EXIT_FAILURE); + } + + if (xmlStrcmp(cur->name, (const xmlChar *) "linklist")) { + fprintf(stderr, "%s: root tag must be \n", filename); + xmlFreeDoc(source); + exit(EXIT_FAILURE); + } + + cur = cur->xmlChildrenNode; + + strcat(out, + "\n" + "\n" + "\n" + " \n" + " \n" + " \n"); + sprintf(out, "%s Midgard Link Directory - %s/", out, get_tag("network", source, cur)); + sprintf(out, "%s%s/", out, get_tag("protocol", source, cur)); + sprintf(out, "%s%s\n", out, get_tag("category", source, cur)); + strcat(out, + " \n" + " \n" + "
\n" + "

linkdir

\n"); + + char *temp = get_tag("network", source, cur); + + if (!strcmp(temp, "i2p")) { + strcat(out, + " i2p\n" + " tor\n" + " ygg\n"); + } else if (!strcmp(temp, "tor")) { + strcat(out, + " i2p\n" + " tor\n" + " ygg\n"); + } else if (!strcmp(temp, "ygg")) { + strcat(out, + " i2p\n" + " tor\n" + " ygg\n"); + } + + strcat(out, + "
\n" + " \n" + "\n"); + return out; +} + + +int add_to_array(const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf) { + result = regcomp(®ex, ".*.xml$", 0); + result = regexec(®ex, fpath, 0, NULL, 0); + if (!result) { + files_list[i] = (char*) malloc (PATH_MAX); + sprintf(files_list[i], "%s", fpath); + i++; + } + return EXIT_SUCCESS; +} + +int main(int argc, char *argv[]) { + if (argc != 2) { + help(argv[0]); + } + + i = 0; + nftw(argv[1], add_to_array, 20, 0); + int file_count = i; + + for (i = 0; i < file_count; i++) { + printf("[%05d]\t%s\n", i, files_list[i]); + printf("%s", gen_xhtml(files_list[i])); + } + + return 0; +} diff --git a/code/testing/template.xml b/code/testing/template.xml new file mode 100644 index 0000000..0d51b35 --- /dev/null +++ b/code/testing/template.xml @@ -0,0 +1,25 @@ + + + tor + http + organization + + FSKY + eng + http://fsky42e4xj4o4q7xiyxzodqvd75iwgztywxtbugdmixamrmui5l4vhid.onion/ + + A tech collective dedicated to hosting public online services and helping with open + source development. + + + + Midgard + eng + http://midgardmvjfdvespsrfr3fmcyjwmnqhvsmiea7wqoyrrn5rpzp6zo5ad.onion/ + + A collection of services focused on promoting darknets for a free and + open internet + + + + diff --git a/linkdir/404.html b/linkdir/404.html deleted file mode 100644 index f8414f0..0000000 --- a/linkdir/404.html +++ /dev/null @@ -1,3 +0,0 @@ - -404 Not Found -

404 Not Found

diff --git a/linkdir/index.html b/linkdir/index.html deleted file mode 100644 index d8d5a16..0000000 --- a/linkdir/index.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - Midgard Link Directory - - - - -

Midgard Link Directory

- -

- This is a collection of links to sites and services on darknets maintained - by the Midgard community. -

-
- -
-
- -
-
-

I2P

-

- The Invisible Internet Project (I2P) is a fully encrypted - private network layer. It protects your activity and - location. Every day people use the network to connect with - people without worry of being tracked or their data being - collected. In some cases people rely on the network when they - need to be discrete or are doing sensitive work. -

-
-
-
- -
-
- -
-
-

Tor

-

- Tor is a free overlay network for enabling anonymous - communication. Built on free and open-source software and - more than seven thousand volunteer-operated relays - worldwide, users can have their Internet traffic routed via - a random path through the network. -

-
-
-
- -
-
- -
-
-

Yggdrasil

-

- Yggdrasil is a new experimental compact - routing scheme. It is designed to be a - future-proof and decentralised alternative - to the structured routing protocols - commonly used today on the Internet, as - well as an enabling technology for future - large-scale mesh networks. -

-
-
-
-
- - - - diff --git a/linkdir/robots.txt b/linkdir/robots.txt deleted file mode 100644 index 49b6b2e..0000000 --- a/linkdir/robots.txt +++ /dev/null @@ -1,4 +0,0 @@ -User-agent: * -Disallow: -Allow: / -Sitemap: /sitemap.xml diff --git a/linkdir/sitemap.xml b/linkdir/sitemap.xml deleted file mode 100644 index 5355a85..0000000 --- a/linkdir/sitemap.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - / - - - /tor/ - - - /tor/web/ - - - /tor/web/music/ - - - /tor/web/organization/ - - - /tor/web/personal/ - - - /tor/web/search/ - - - /tor/web/vcs/ - - - /yggdrasil/web/directory/ - - - /yggdrasil/web/forum/ - - - /yggdrasil/web/personal/ - - diff --git a/linkdir/tor/index.html b/linkdir/tor/index.html deleted file mode 100644 index 2e8ecfc..0000000 --- a/linkdir/tor/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - Midgard Link Directory - - - - -

Midgard Link Directory

- - - - - - - diff --git a/linkdir/tor/web/index.html b/linkdir/tor/web/index.html deleted file mode 100644 index 239da6d..0000000 --- a/linkdir/tor/web/index.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - Midgard Link Directory - - - - -

Midgard Link Directory

- - - - - - - diff --git a/linkdir/tor/web/music/index.html b/linkdir/tor/web/music/index.html deleted file mode 100644 index bc764a4..0000000 --- a/linkdir/tor/web/music/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - Midgard Link Directory - - - - -

Midgard Link Directory

- - - - - - - diff --git a/linkdir/tor/web/organization/index.html b/linkdir/tor/web/organization/index.html deleted file mode 100644 index 6591013..0000000 --- a/linkdir/tor/web/organization/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - Midgard Link Directory - - - - -

Midgard Link Directory

- - - - - - - diff --git a/linkdir/tor/web/personal/index.html b/linkdir/tor/web/personal/index.html deleted file mode 100644 index 7b051df..0000000 --- a/linkdir/tor/web/personal/index.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - Midgard Link Directory - - - - -

Midgard Link Directory

- -

With Blogs

- -

Without Blogs

- - - - - - diff --git a/linkdir/tor/web/search/index.html b/linkdir/tor/web/search/index.html deleted file mode 100644 index ef22d1e..0000000 --- a/linkdir/tor/web/search/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - Midgard Link Directory - - - - -

Midgard Link Directory

- -
    -
  • Ahmia* - Ahmia is a search engine on Tor that actively removes abuse material. Filled with spam, unfortunately.
  • -
- - - - - diff --git a/linkdir/tor/web/vcs/index.html b/linkdir/tor/web/vcs/index.html deleted file mode 100644 index 284ac2a..0000000 --- a/linkdir/tor/web/vcs/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - Midgard Link Directory - - - - -

Midgard Link Directory

- -

Git

-

Private

-

Some Guy's Gitea - Some random's Gitea, mostly (if not all) mirrors

- - - - - diff --git a/linkdir/yggdrasil/web/directory/index.html b/linkdir/yggdrasil/web/directory/index.html deleted file mode 100644 index e97e3b5..0000000 --- a/linkdir/yggdrasil/web/directory/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - Midgard Link Directory - - - - -

Midgard Link Directory

- - - - - - - diff --git a/linkdir/yggdrasil/web/forum/index.html b/linkdir/yggdrasil/web/forum/index.html deleted file mode 100644 index f1107b1..0000000 --- a/linkdir/yggdrasil/web/forum/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - Midgard Link Directory - - - - -

Midgard Link Directory

- - - - - - - diff --git a/linkdir/yggdrasil/web/personal/index.html b/linkdir/yggdrasil/web/personal/index.html deleted file mode 100644 index 9f14f55..0000000 --- a/linkdir/yggdrasil/web/personal/index.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - Midgard Link Directory - - - - -

Midgard Link Directory

- - - - - - -