Justin Reichardt
a8677c97c9
Changed fgetc variables to int
...
fgetc used "char c" for all returns. Unfortunately this doesn't work for
all architectures. So an "int b" variable was created to recieve the
return before casting it into c.
2021-09-17 12:53:31 -05:00
Justin Reichardt
d125a99347
Removed old makefile instructions from README
2021-09-17 11:59:41 -05:00
Justin Reichardt
5b26e00ae8
Installs program
...
Does not setup systemd
2021-09-17 11:46:00 -05:00
Justin Reichardt
3ce1982af6
Added config.h.in file
...
cmake generates a config file. It currently just shows the version.
rhosts now prints the version at start
2021-09-17 11:28:11 -05:00
Justin Reichardt
f12ec08a46
Cmake links curl library to project
2021-09-17 11:00:27 -05:00
Justin Reichardt
fe7d96e573
Removed openfile and closefile functions
...
They are not used and so were removed
2021-09-02 16:43:27 -05:00
Justin Reichardt
be119d5922
Cleans Download
...
Currently removes comments and empty lines from downloaded file. Later
will verify contents, convert to ipv4 and ipv6, and remove duplicates
2021-09-02 15:17:49 -05:00
Justin Reichardt
cf69948108
Updated requirements
...
Added gcc and splitrequirements into Linux (and eventually Windows and
Mac)
2021-09-02 14:04:49 -05:00
Justin Reichardt
58f1163623
Included how to use rhosts
...
This is just editing the config at the moment
2021-09-02 11:21:58 -05:00
Justin Reichardt
3893dc2bd9
Revert "Added libclogs"
...
libclogs had issues when the program was split into multiple files.
So it is being removed for now and will be readded later.
2021-09-02 10:38:59 -05:00
Justin Reichardt
954aa465d4
Changed -d to --debug
...
This was done for future daemon implimentation on Windows devices
2021-08-30 11:47:17 -05:00
Justin Reichardt
74c0f189a0
Log level is set to WARNING unless -d flag is used
...
-d flag now sets logging to debug
2021-08-30 11:46:02 -05:00
Justin Reichardt
0e431bec54
Finished adding every print to clogs
2021-08-30 10:55:24 -05:00
Justin Reichardt
c286c78c1f
Added libclogs
...
Added custom logging library
2021-08-30 10:44:18 -05:00
Justin Reichardt
98d1442a41
Removed excessive comments
...
The functions are fairly self explanatory, no need to comment on every
function
2021-08-28 14:15:44 -05:00
Justin Reichardt
128b20d857
Corrected the license notice
...
Turns out the program is not called Foobar. Forgot to replace one of the
Foobar entries.
2021-08-28 14:04:45 -05:00
Justin Reichardt
a3607e7717
Improved the the Copyright
...
Changed the Licence file to Copying
Added license notices to the source files
2021-08-28 13:59:33 -05:00
Justin Reichardt
1f6dfc6d90
Changed reallocarray to realloc
...
Some of my other systems fail to find reallocarray
2021-08-27 15:53:58 -05:00
Justin Reichardt
50cdb303b9
Added download.c
...
Moved the download functions from rhosts to their own file
2021-08-27 10:10:08 -05:00
Justin Reichardt
d2d092ed31
Copy tmp file to hosts file when complete
2021-08-26 19:17:57 -05:00
Justin Reichardt
1c6d230aac
Forgot to stage the function definition
2021-08-26 19:08:35 -05:00
Justin Reichardt
f2a4447bd3
If fails to download, it will reuse the local copy
2021-08-26 19:07:45 -05:00
Justin Reichardt
bba9693138
Added libcurl to download remote repos
...
Added the functions to download and add the contents to tmpfile
Updated the Makefile and README.md
2021-08-26 18:03:17 -05:00
Justin Reichardt
7de6403f27
Added add_site_entries
...
Added the function for adding static sites
Also remembered to close the files before exiting the download_entries
function
2021-08-26 15:58:35 -05:00
Justin Reichardt
20da1348fa
downloading does everything except download
...
Creates blank entries in the tmp file
Safely closes
2021-08-26 15:32:41 -05:00
Justin Reichardt
66251c6c2a
Error checking and marking in preserve_static_entr
...
Appends "# rhosts begin\n" after static entries
Cleanly errors out if failes to write to tmp file
2021-08-26 15:13:36 -05:00
Justin Reichardt
8c377d6234
Logs static hosts
2021-08-26 14:57:55 -05:00
Justin Reichardt
4c443474e5
Added download_entries
...
It currently doesn't funtion
2021-08-26 14:53:54 -05:00
Justin Reichardt
4789384846
Parses the static entries from hosts
...
pulls the static entries and stores them in the tmp file
2021-08-26 14:39:50 -05:00
Justin Reichardt
89a122ed16
Added MAXSTRSIZE
...
To unify the string buffer sizes
2021-08-26 10:37:44 -05:00
Justin Reichardt
6ffc10a91e
main no longer opens files it doesn't use
2021-08-25 21:33:51 -05:00
Justin Reichardt
4766abd773
main checks for error returns
...
If parse_config or preserve_static_entries returns an error, main will
report it and close with an error.
2021-08-25 21:31:38 -05:00
Justin Reichardt
9b45bc2382
Created preserve_static_entries()
...
It opens hosts and a tmp file and then closes them
2021-08-25 21:28:02 -05:00
Justin Reichardt
59ac732945
Corrected the spelling of string.h
2021-08-25 21:22:05 -05:00
Justin Reichardt
a48ef05bf7
Cleaned up parse_config
...
Added comments and whitespace to make it more legible
Also added a description to determine_config_entry_value
2021-08-25 21:12:05 -05:00
Justin Reichardt
f318271a28
Parses the config file
...
Added parse_config and determine_config_entry_value functions and entry
types definitions in order to parse the config file
2021-08-25 21:02:35 -05:00
Justin Reichardt
44ce9ae07b
Added .gitignore
2021-08-24 10:33:36 -05:00
Justin Reichardt
3bf49028a4
Initialized the rhosts c files
2021-08-24 10:27:46 -05:00
Justin Reichardt
4996513636
Changed project to rhosts
...
rhosts is the new c implementation of the project. It is suppose to be
compilable for GNU/Linux and Windows minimum.
2021-08-24 10:26:16 -05:00
Justin Reichardt
24e04c58dd
Merge branch 'master' of https://gitea.jbreich.com/justin/removeadhosts
2021-08-15 12:14:00 -05:00
Justin Reichardt
78f61a2891
Cleaned up Readme
2021-08-15 12:12:23 -05:00
Justin Reichardt
1c601ee6c4
Corrected syntax
...
Added slash before dev
2021-08-11 11:52:49 -05:00
Justin Reichardt
b3c3e7a42e
Manages multiple listings seperately
...
The different listings have their own header and end and will be updated
independantly of each other.
2021-08-03 16:30:05 -05:00
Justin Reichardt
668732be30
Heads and tags each curl entry / added comments
...
Each entry has a header line and an end line to easily extract it using
sed
2021-08-03 15:16:15 -05:00
Justin Reichardt
621e9ebb2f
Retain adlistings if nothing new is pulled
...
This way if either you have no internet or all of your listing no longer
exist you will not lose everything
2021-08-03 15:06:17 -05:00
Justin Reichardt
76fdf17314
Link systemd files instead of copying
2021-08-03 14:02:34 -05:00
Justin Reichardt
bcebe356a1
Install reloads daemons
...
reloads systemd daemons on install
2021-08-03 13:57:22 -05:00
Justin Reichardt
d55ae0face
Waits until after network online
...
The service will wait until after the network is online before running
2021-08-03 13:56:51 -05:00
Justin Reichardt
ee227d0f15
Fixed initial cfgs
...
It still had ads.txt and not adlist.txt or adlistings.txt, corrected
this
2021-08-03 13:52:35 -05:00
Justin Reichardt
694ca35d27
Added systemd.path to update when a cfg is edited
2021-08-03 13:51:07 -05:00