diff --git a/docs/about.md b/docs/about.md deleted file mode 100644 index 3ee233a..0000000 --- a/docs/about.md +++ /dev/null @@ -1,53 +0,0 @@ -# Agit dum sed ille exululat cruorem atque - -## Aequus tanto coercuerat Cephisos de agmine scopulos - -Lorem markdownum fossa inanes factura? Aequore **Eurydicen** que vastius egit. -Terrebit umbras in ignotas sub animi dum rursus effigiem enim *vices niveis -ponunt* totiens colorem, opus solvi. Metus sub regna nec; sic laeva [hic -saetigerosque](http://www.illum.org/) vidi. Nec nec amara Numicius simulasse -retro placebant Sabinis dumque refovet. - -Et putando. Advehar sua patre Agaue, praeferrer matres. Igne rectum: natis -quiescet in illic rogantem, eiectas maneas, nate signum gloria, magna. - -## Obvia in tantum intumuit - -[Edita Aenea](http://haud.net/) alligat sopor pollicibusque dolor cogitur, arce -illa repetam inpetus [capienda amnem proceresque](http://iugulum.io/nec-sic) -Latonia ianua **simulavit**! Pectusque iam parva ne tanti perstat et iras deum -exercet. - -Posceret succidit habeo partem Troia, non non committere heros induitur. Soror -dixerat instruis aufer, ter enim: solis esse praepes abstitimus flammam nequiret -orbes. - -## Locus nec - -[Pudetque](http://dempto.net/) natos *pisces Iovis*,; recepit Anaxareten Echecli -est evanuit ab. Capellae sed idem caelitibus, aut cavae quem rerum extemplo -dedit. Horrida **vae** avis potest dempsisse vitibus requirere mensam, flectit. -Mihi *bene*: carerent inposito, mota! - - site_ascii.ipod(macro_wireless_torrent - meta(5, faqNetworkOasis), class( - archiveAddress(tebibyte_ddr_webcam), prebinding, maximize_data + - hacker), heap_fat + oasis_rpm(remote)); - web_parse_xp.excelSystem -= fifoHyperOperating(inputVlb, sli) - ospf * - virus(frameLeopardBackside); - if (baudMasterCgi) { - cursorLamp = managementToken(threading, resolution); - parse -= xmp; - teraflops(linux, toolbarLteAta(bookmark_type_markup, dimm_contextual)); - } - memory(sprite(-5 + 74)); - -## Semper ne armarat ecce caput - -Litore agmine, genuisse isto; est morus ferro nomen; membra, **recurvas**? Et -modo gratam adsiduis raptos curvarique est, axem dextra malas pruinosas expulit. - -Manu sparsumque colebat quare [te amor iussa](http://tantum.org/dextram) -aquaticus huius, quartus nec: quid. Dumque sit reperta, et sint et est cras -verba labori his modo fonti nemus Medea; anne tibi Terram. Structis *nobis* mihi -mihi mutataeque eiaculatur Minyis. Est quod erat: Apis est est partes vagitus -nec pondere *quas* agitante! Facibus exspectatoque; ad in utque ipso arguit? diff --git a/docs/commands.md b/docs/commands.md index 49e0012..a502ddf 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -6,4 +6,18 @@ ###awk -`awk` is used to fuck with data \ No newline at end of file +`awk` is used to extract, layout and modify data using the command line (It is way more then this but its all I use it for) + +###sed +`sed` is the '**S**tream **ED**itor' you can use to to modify files via commands and scripts using patterns, an [example](examples/seddnszone.md) can be seen here + + +| Useful Flags | Function | +| ------------- |:-------------| +| -i | in-place, writes the changes to the file | +| -f | Use a script file instead of reading the expression from STDIN | + + +###grep + +###rev \ No newline at end of file diff --git a/docs/connections.md b/docs/connections.md index 6c00ac3..878cecd 100644 --- a/docs/connections.md +++ b/docs/connections.md @@ -18,5 +18,6 @@ In these situations we will usually see a high connection count for certain serv Finding IP addresses connecting to HTTP is quite easy, all you should need to do is tail access logs to find the IP addresses -You can use a command like `tail -f /home/*/access-logs/* | awk '{print $1}'` to get a live update on connections to the webistes on the server.w [For more information on the commands used click here](commands.md) +You can use a command like `tail -f /home/*/access-logs/* | awk '{print $1}'` to get a live update on connections via HTTP/HTTPS on the server. [For more information on the commands used click here](commands.md) *__Note: This will only check sites in /home__* +##SMTP \ No newline at end of file diff --git a/docs/examples/seddnszone.md b/docs/examples/seddnszone.md new file mode 100644 index 0000000..c8a5417 --- /dev/null +++ b/docs/examples/seddnszone.md @@ -0,0 +1,73 @@ +#Using `sed` to modify a DNS zone + +Take the following DNS zone as an example, say we needed to update the IP address from 110.232.142.185 to 45.65.88.152, you could modify the file using a text editor (see [editors](/commands#editors)) + +``` +$TTL 86400 +@ IN SOA ns1.benjamyn.love. servers.benjamyn.love. ( + 2018043009 ;Serial + 3600 ;Refresh + 1800 ;Retry + 604800 ;Expire + 43200 ;Minimum TTL +) +;Name Server Information +@ IN NS ns1.benjamyn.love. +@ IN NS ns2.benjamyn.love. +;IP address of Name Server +primary IN A 110.232.142.184 +;A - Record HostName To Ip Address +memes.sh. IN A 110.232.142.185 +www IN A 110.232.142.185 +;CNAME record +ftp IN CNAME memes.sh. +``` + +In this case we can just use `sed -i s/110.232.142.185/45.65.88.152/g filename` + +The file gets changed to +``` +$TTL 86400 +@ IN SOA ns1.benjamyn.love. servers.benjamyn.love. ( + 2018043009 ;Serial + 3600 ;Refresh + 1800 ;Retry + 604800 ;Expire + 43200 ;Minimum TTL +) +;Name Server Information +@ IN NS ns1.benjamyn.love. +@ IN NS ns2.benjamyn.love. +;IP address of Name Server +primary IN A 110.232.142.184 +;A - Record HostName To Ip Address +memes.sh. IN A 45.65.88.152 <-- +www IN A 45.65.88.152 <-- +;CNAME record +ftp IN CNAME memes.sh. +``` + +You can also use sed to update things like the serial number using some regex (which will need to be incremented for the DNS zone to be properly synced out) + +The command will look like `sed -i s/.*Serial/" 2019010308 ;Serial"/g filename` (The quotes are to escape the ; character) and when run against the DNS zone it will update will look like + +``` +$TTL 86400 +@ IN SOA ns1.benjamyn.love. servers.benjamyn.love. ( + 2019010308 ;Serial <-- + 3600 ;Refresh + 1800 ;Retry + 604800 ;Expire + 43200 ;Minimum TTL +) +;Name Server Information +@ IN NS ns1.benjamyn.love. +@ IN NS ns2.benjamyn.love. +;IP address of Name Server +primary IN A 110.232.142.184 +;A - Record HostName To Ip Address +memes.sh. IN A 45.65.88.152 +www IN A 45.65.88.152 +;CNAME record +ftp IN CNAME memes.sh. +``` \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index d388039..4356922 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,17 +1,11 @@ -# Welcome to MkDocs +# Welcome to the necronomicon -For full documentation visit [mkdocs.org](https://mkdocs.org). +[Klaatu barada nikto](https://www.imdb.com/title/tt0106308/) -## Commands +## What is this? -* `mkdocs new [dir-name]` - Create a new project. -* `mkdocs serve` - Start the live-reloading docs server. -* `mkdocs build` - Build the documentation site. -* `mkdocs help` - Print this help message. +This is a compendium of all the useless facts, tips, tricks and commands that I know, enjoy -## Project layout +##Quick Links - mkdocs.yml # The configuration file. - docs/ - index.md # The documentation homepage. - ... # Other markdown pages, images and other files. +[Commands](commands) \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 6917940..5db6f29 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,7 +1,6 @@ site_name: Usefull commands and tips nav: - Home: index.md - - About: about.md - Commands: commands.md - Connections: connections.md theme: readthedocs