A Few Tools for Your Computer - Page 5 - Politics Forum.org | PoFo

Wandering the information superhighway, he came upon the last refuge of civilization, PoFo, the only forum on the internet ...

Anything from household gadgets to the Large Hadron Collider (note: political science topics belong in the Environment & Science forum).

Moderator: PoFo The Lounge Mods

#15198573
tomskunk wrote:
@ckaihatsu

Linux all the way brother! I love that Termux app you recommended to me a long time. Thanks, man! I actually use it!



Awright, good to hear!

It really is a breakthrough of sorts, to suddenly have the command line available on any Android device.

And, with an FTP server ('WiFi FTP Server' for Android), or maybe Samba Server, or SambaDroid -- haven't tried them yet -- you then have a full-blown *NAS* from any-size smartphone. I've heard that the music player 'mpd' (Linux) is runnable on Termux, but I haven't tried that, either.

Any favorite apps or uses?
#15198574
@ckaihatsu

Not really, I have just been doing a lot of research and writing on cybersecurity topics like security architecture, risk assessments, various attack vectors and networks, and how threat actors use them. Also, doing research on incident response. It's been a lot of work man.
#15198575
tomskunk wrote:
@ckaihatsu

Not really, I have just been doing a lot of research and writing on cybersecurity topics like security architecture, risk assessments, various attack vectors and networks, and how threat actors use them. Also, doing research on incident response. It's been a lot of work man.



Okay, I hear ya.

Before the Termux thing I'd probably have recommended 'Turnkey Linux', for setting up 'headless servers' using whatever hardware may be laying around.

I'm mostly around it for *graphics*, though, through scripting.
#15198622
Politics_Observer wrote:@ThirdTerm

The malware you really have to watch out for is the malware that infects your firmware (which is in your BIOS chip) and rootkits that seek to hide their presence. Those are tough to remove and in the case of malware that infects your firmware, you will have to replace your BIOS chip.


I mistakenly downloaded a fake Chrome extension from the official Chrome web store, from which my system got infected with malware. It looked suspicious because the name of the creator sounded Russian. The official Chrome web store did not remove these fake extensions until a few months ago.
#15198623
@ThirdTerm

Check out my post on Ransomware. Those are some ransomware you have to watch out for including on your smartphone. I could probably add another post in regards to how to prevent ransomware. Rootkit malware that infects your BIOS is the absolute worst. You're Russian, I thought you would not have downloaded that malware onto your system.
#15198636
ThirdTerm wrote:
I mistakenly downloaded a fake Chrome extension from the official Chrome web store, from which my system got infected with malware. It looked suspicious because the name of the creator sounded Russian. The official Chrome web store did not remove these fake extensions until a few months ago.



tomskunk wrote:
@ThirdTerm

Check out my post on Ransomware. Those are some ransomware you have to watch out for including on your smartphone. I could probably add another post in regards to how to prevent ransomware. Rootkit malware that infects your BIOS is the absolute worst. You're Russian, I thought you would not have downloaded that malware onto your system.



Russians sabotaging *other* Russians -- ? What hope do the *rest* of us have -- !


= D
#15198730
@ckaihatsu @ThirdTerm

Yeah, Russian hackers will hack other Russians too if they think they can get away with it. They have done it before. A lot of people think of Russians as this monolithic group of people who all agree on everything and never turn on each other and that is simply not the case at all. They are just like anybody else anywhere. They are all individuals with their own personalities and they do hack each other and turn on each other. People here in the West don't know much about Russia.

I have gotten to know more about it since studying the language and having native Russians teaching me their language. They are not dumb either and they will want to know why you want to learn their language. But I think, as an American, it's well worth being able to write and speak Russian, especially if you are an IT/Cybersecurity professional having to defend networks against hackers given that Russian APT and criminal groups are part of the threat landscape for networks. Moreover, it makes it easier to get the other side's point of view on things and why they see things the way they do in regards to politics. Plus, Russians treat you with far far more respect when they see you speaking and writing in their language.

Anyway, you guys check out my second post in the Ransomware thread on how organizations and to some degree individuals can help protect themselves from Ransomware attack.
#15199105
@ckaihatsu @ThirdTerm

TinyWall seems like it would be a good host-based firewall to use on Windows if anybody wants to use something with the host-based firewall that comes with Windows operating system. It's also completely free. Here is the link: https://tinywall.pados.hu/. It works just fine alongside Windows host-based firewall that comes with Windows already. When you first install it, it will stop your internet connection, so you want to go to the lower right-hand corner and elevate the privileges and put it in "learning mode" and reconnect to your internet. It's a pretty good free firewall to use alongside Windows host-based firewall and very lightweight so it doesn't slow down your system.
#15202087
Проснувшись, выпивайте чашку теплой воды с медом и лимоном.
атрофический гастрит что это такое
Это совсем не сложно и при этом эффективно в борьбе с лишним весом.Этот напиток ускоряет метаболизм, и выпивая его на голодный желудок, вы настраиваете свой организм на режим сжигания жира с самого утра.
Ешьте фрукты, а не пейте.Сок часто называют полезным продуктом, однако важно помнить, что он не относится к низкокалорийным напиткам.
серотонин триптофан
250 мл апельсинового сока содержит 110 калорий, что равнозначно двум апельсинам.Немногие из нас съедают за день два фрукта, но если у нас под рукой есть сок, то мы обычно пьем больше одного стакана.
Пейте воду вместо других напитков.Вода не содержит калорий.
#15217887
_220314_ 210317 210316 [ √ ] install Termux on my Android smartphone [PERSONAL] [PROJECT] [TO-DO] [7]
210317 [ • ] read through the 'to-do' tutorial a second time [TO-DO] [5]
210317 [ • ] do a search for the Linux 'copy' command [TO-DO] [6]


In the past year -- just recently, really -- I've found a way to tie-in my prior 'universal paradigm' (scientific method) framework into this daily-text-file to-do thing / approach....

(Note that the sample three lines of the to-do list above have been 'updated', with the check mark for a completed item, and a bullet character for the 'otherwise finished' two items. I also added the 'done' date for the first item by enclosing it, 220314, within _underscore_ characters. This process can be used to designate *any* 'completed' information to add-in after an item is finished and closed-out.)

(Also be sure to add in new items *at the top*, to push the already-existing content *downwards*, sorting the lines as desired, in groups of lines, with decreasing importance / priority going downward through the text file. I like to keep a little 'protected' area at the very top for *time-sensitive* *calendar* items, with a '---' divider right underneath.)

So here's how to make similar 'data entries' to a to-do-list-like *other* text file, maybe named 'YYMMDD_index', or by project name, or whatever. Note the nine categories in the 'universal paradigm' taxonomy in the graphic below, and the shortened 'nicknames' they correspond to in the sample text entries:


_______________________________________________________________________________
220307 sample entry
____________________________________________________YYMMDD-AND-NOTE-NAME IF ANY
DSC_1459.JPG
_____________________________________________SOURCE PHOTO IMAGE FILENAME IF ANY
1PAST|2YESNO|3AND?|4TASK|5TRY|6GOOD?|7WOULD|8SHOULD|9BEST|0

_______________________________________________________________________________
220304 [ ] digital housekeeping
____________________________________________________YYMMDD-AND-NOTE-NAME IF ANY

_____________________________________________SOURCE PHOTO IMAGE FILENAME IF ANY
1PAST|2YESNO|3AND?|4TASK|5TRY|6GOOD?|7WOULD|8SHOULD|9BEST|4

_______________________________________________________________________________
220304 [ ] update music on smartphone
____________________________________________________YYMMDD-AND-NOTE-NAME IF ANY

_____________________________________________SOURCE PHOTO IMAGE FILENAME IF ANY
1PAST|2YESNO|3AND?|4TASK|5TRY|6GOOD?|7WOULD|8SHOULD|9BEST|4

_______________________________________________________________________________
220304 PHYSICAL PROJECT
linked rods for perimeter -- star dome
____________________________________________________YYMMDD-AND-NOTE-NAME IF ANY

_____________________________________________SOURCE PHOTO IMAGE FILENAME IF ANY
1PAST|2YESNO|3AND?|4TASK|5TRY|6GOOD?|7WOULD|8SHOULD|9BEST|4


Once entered, all data can be 'grep'-ed for, as detailed in that post on this thread from a year ago.

If one was looking for all 'tasks', for example, one could do a cat 220314_index | grep -B 8 '4$' | grep -B 1 -A 8 '^[0-9].*$'
to get all of the entries, in their entirety, for all entries that have a code of '4' -- which is 'task', or 'activity / task / social organization / material input-output', from the 'universal paradigm' template.

The command says 'cat', or *print* the file '220314_index', to the screen, then 'grep' / retain *only* any lines that *end* with a '4'. The dollar sign means 'the end of any given line'. Also *8* lines *before* the selected ('4'-containing) line will be included, due to the -B 8 flag / option that's included in the grep command.

Here's the thing, though -- that number of *8* lines, for any given entry (multiple lines), is somewhat *arbitrary*. Sure, it certainly *looks* as though the entries will all be *about* 8 lines long, or maybe more-like around *6* lines long, judging from the sample entries above. If any entry, at any time, happened to be *less* than 8 lines, then this command would be less-than-appropriate and might reel-in *more* than the lines of just one desired entry at-a-time -- lines from the *previous* entry might be inadvertently included, which would *not* be good.

Okay, to recap, we've 'streamed' all the data entries from the 220314_index file, using the 'cat' command. We've used grep to find the 'code' number, per entry, from the taxonomy of 1-through-9 -- in this case, we're looking for a '4' from any and all entries in the text file that *have* a code of 4, and *no others*. We're also indicating that we want the preceding *8* lines above that '4'-line matched line to be included as well, since those lines are presumably with the whole entry itself.

The *problem* now is how to *limit* the multiple-lines-selection process to *just* the lines of the '4'-coded entries, so that we get those entries, and nothing else -- nothing from the *preceding* entry, which may not necessarily be a '4'-coded entry.

The rest of that (Bash) command is *another* grep command to 'cap-off' the 'top' of the entry / -ies we've found with the *first* grep command, that itself could identify the '4'-code line *only*, and then we rather-arbitrarily included a set *8* lines of content *above* the '4' line, even though we don't actually know that any searched-for entry will *be* exactly 9 ( 1 + 8 ) lines long in the text file.

So that *second* grep command is saying 'From the preceding stuff that's incoming (all of the '4'-coded lines, plus 8 additional lines *above* each '4' line), now search for any line that begins with a *number* (0-9), and also include one line before that 'digit-starting' line, plus *8* lines *after* it. The caret symbol means 'the start of any given line', and the period and asterisk mean 'zero or more characters of any kind', until the *end* of the line (the dollar sign symbol).

These two grep commands effectively find the *bottom* end of all desired entries ('4'), up through the *top* line of (only) those found entries (which begins with a digit, for the entries' YYMMDD date number), plus the '______' divider line *above* that date number, whatever it is. I put in an '8' as a good rough parameter to use, but if *your* entries happen to vary much in number-of-lines then this parameter may need to be adjusted.

Similarly the grep commands could be altered, to maybe look for all 'done' items, by looking for a *check mark* ('√'), or an 'x', or a bullet character, or for *all* of them -- see last year's introductory post for how to do this kind of multiple-criteria kind of search.

Of course, as before, one may want to spin-off '.999' files, to receive cut-and-pasted 'done' entries out of the main YYMMDD_index file, for 'YYMMDD.999_index' files, while updating the *main* YYMMDD_index file for each new day.


universal paradigm SLIDES TEMPLATE

Spoiler: show
Image



universal paradigm DATABASE

Spoiler: show
Image
#15217892
Just noticed that since the standard '1PAST...' line *also* begins with a digit, maybe one would want to grep for *two* digits at the beginning of a line, so as to soundly *bypass* all of the '1PAST' lines:

cat 220314_index | grep -B 8 '4$' | grep -B 1 -A 8 '^[0-9][0-9].*$'
#15217900
tomskunk wrote:@ckaihatsu @ThirdTerm

TinyWall seems like it would be a good host-based firewall to use on Windows if anybody wants to use something with the host-based firewall that comes with Windows operating system. It's also completely free. Here is the link: https://tinywall.pados.hu/. It works just fine alongside Windows host-based firewall that comes with Windows already. When you first install it, it will stop your internet connection, so you want to go to the lower right-hand corner and elevate the privileges and put it in "learning mode" and reconnect to your internet. It's a pretty good free firewall to use alongside Windows host-based firewall and very lightweight so it doesn't slow down your system.



Yeah, that's exactly what I'm gonna do. Put free tinywall firewall on my Windows box. Gee, it's free so I wonder how they make their money? I always go with free when it comes to security. :roll:

Yeah, I'm gonna put an unknown firewall with no credentials from an anonymous source on my Windows machine, so it can exfil everything it wants to Beijing on it's own schedule. :lol:

#15217941
_______________________________________________________________________________
220307 sample entry
____________________________________________________YYMMDD-AND-NOTE-NAME IF ANY
DSC_1459.JPG
_____________________________________________SOURCE PHOTO IMAGE FILENAME IF ANY
1PAST|2YESNO|3AND?|4TASK|5TRY|6GOOD?|7WOULD|8SHOULD|9BEST|0


Okay, just to wrap-up this nerd fest, I'll posit a more-*solid* approach to this 'scenario' of 'get all the lines of any specified entries, no matter how many lines long each may be'.

So for the sample entry above (etc.), one could do the aforementioned

cat 220314_index | grep -B 8 '4$' | grep -B 1 -A 8 '^[0-9][0-9].*$'


*Or* one could do 'grep' searches that *really nail* 'the-last-line-of-the-entry', followed by a foolproof way of identifying the unequivocal *top* / beginning of the entry.

One might argue that 'a-line-ending-in-a-number' isn't specific-enough, since someone might quickly put in a photo filename (like the sample 'DSC_1459' above) and if they left-off the '.JPG' extension, then *that* line would end with a number, '9', which would throw-off the regular, desired results provided by that line of Bash scripting.

So, to 'upgrade', let's focus on the 'fixed', *predictable* portions of any given entry, meaning the 'code block' at the end:

CODE=4

cat 220315_index | tr '\n' '~' | sed 's/[0-9]~~/&\n\n/g' | grep "$CODE~~$"


This is a little trick I developed and used recently on some Bash scripting, to generate Sunflow scene scripts. It's a 'fundamental' function, in my estimation, since it effectively distinguishes, and marks, the break between one entry block and the next. So it's a preliminary, 'prerequisite' step to the actual 'grep'-finding, per-line, of the category / 'code' that we're after, a '4' in this example. This approach takes advantage of an *iteration*, or 'pipeline' of functionality, and is *not* a 'straight-line' to searching-for and retaining the type-'4' entries from the source text file.

This is an 'intelligent' approach, to tackle the technique in *two* steps, in a top-down divide-and-conquer kind of way. Since grep functions on a *line-by-line* basis, all we have to do is *align* *our* input (multi-line 'entries') to correspond to *grep's* form of input, which is its *per-line* basis.

So that's what the sed command does -- after the previous 'tr' command first *translates* all carriage returns / end-of-line characters to tilde '~' characters (so don't use tilde characters in the text file), the sed command then looks for that distinct end-of-entry-positioned number code (0-9), now followed by two tilde characters. (The three forward-slashes in the sed command are *separators*, for four parameters total. Ignore the beginning 's' and the ending 'g' and just look at the middle-two 'compartments' -- the first is the *search-for* text string, and the second is the *replace-by* text string.)

I'm telling sed to 'Search for any single number, anywhere in the text file (now all one line, due to the use of the tilde character as a substitution for line breaks), followed by two tilde characters. This is effectively *unique* and is obviously a parallel to the original grep-search for a single number at the end of the line that it's in.

Once found, that search term -- the number and two tilde characters -- are *retained* (the ampersand symbol), *plus* two carriage returns are *added*. This, again, is unique because we're *adding back* these end-of-entry carriage returns, and *no other* carriage returns exist anywhere else in the text file.

Our 'entries' now line-up / correspond-to, grep's line-by-line basis of functioning, so that one line now equals one entry in this 'index' text file.

These entry-lines are now passed along to the grep command which looks for the '$CODE' value (a variable defined as the '4' that we're looking for), followed by two tilde characters, and at the end of a given line (the dollar sign). Success. All that remains is to add on a final 'tr' translate command, to change those special tilde characters back into the actual line breaks that they substituted for.

cat 220315_index | tr '\n' '~' | sed 's/[0-9]~~/&\n\n/g' | grep "$CODE~~$" | tr '~' '\n'


I'll even argue that this kind of 'meta' (sorry) functionality is most-to-the-point of many, if not all, database operations, meaning that one can most likely find the database-type functionality they need from this kind of Bash scripting, according to specific need.
#15218131
ckaihatsu wrote:
database-type functionality



Okay, real quick, here's an example of database-type functionality from this 'universal paradigm' framework example, using a *lookup table*, which is just a text file of information that can be referenced from outside (as according to a single-digit unique code number, per line), for pulling-in that associated / related information -- effectively a *relational database*.

Keep in mind that computers are supposed to *save* us time and effort, so lookup tables (as through Bash) is a way to make sure that we don't have to manually type-in any data *redundantly*.

(An everyday-way of doing this is called 'markup' -- anyone who's ever used *abbreviations* throughout their document, followed by a search-and-replace to fill in the full words or phrases, has used this kind of 'markup' / 'lookup table' approach.)

Here's the taxonomy, and it's also in a text file called '220316 universal paradigm TABLE'.


9. OPTIMIZATION / PERFECTION / FINE-TUNING

8. CONCEIVABLE / IMAGINED / GOAL / WISHFUL THINKING

7. EXPECTED / REASONED / THEORIZED

6. OBSERVED (after) / EXECUTION / HOW-IT-WENT

5. EXPERIMENTATION by SCALE or SCOPE (core, periphery)

4. ACTIVITY / TASK / SOCIAL ORGANIZATION / MATERIAL INPUT-OUTPUT

3. HYPOTHESIS (of new situation) / RESPONSE

2. ANALYSIS (of RELEVANT PAST) / CONFIRMATION

1. OBSERVED (before) / RELEVANT PAST / RESEARCH


And here's the sample data format again, in '220316_index'.

_______________________________________________________________________________
220307 sample entry
____________________________________________________YYMMDD-AND-NOTE-NAME IF ANY
DSC_1459.JPG
_____________________________________________SOURCE PHOTO IMAGE FILENAME IF ANY
1PAST|2YESNO|3AND?|4TASK|5TRY|6GOOD?|7WOULD|8SHOULD|9BEST|0


So let's update the script that we're using to retrieve certain entries' contents, by code:


CODE=4

LOOKUPLINE=$(grep "$CODE" "220316 universal paradigm TABLE")

cat 220316_index | tr '\n' '~' | sed 's/[0-9]~~/&\n\n/g' | grep "$CODE~~$" | \

sed "s#\s*1PAST.*9BEST|[0-9]#$LOOKUPLINE#g" | tr '~' '\n'


The code number being searched for is still '4', and then we've added another variable, 'LOOKUPLINE', which uses grep to grab the corresponding (4th) entry-line in our lookup-table file, '220316 universal paradigm TABLE', which is '4. ACTIVITY / TASK / SOCIAL ORGANIZATION / MATERIAL INPUT-OUTPUT'.

The overall prior 'entries-to-lines' conversion process remains intact, and once we have our selected entry-lines we then do a sed search-and-replace to conveniently *delete* the '1PAST...' code block line, since it's no longer needed -- the code of '4' has been decided-upon and provided for the entries retrieved. The default, form-provided code block is now replaced with its corresponding '$LOOKUPLINE' looked-up label ('4. ACTIVITY...'), from the static / reference lookup-table file.

(Note that sed's three parameter separators, usually a forward-slash, is now a '#' pound sign, so as to avoid interference with the incoming stream of text from the lookup file, that happens to contain forward-slashes. Also, the options are all contained within *double*-quotes instead of the typical *single* quotes, so that the '$LOOKUPLINE' variable within will be correctly processed to yield its actual value, '4. ACTIVITY...' in this case.)

So the whole sed command reads 'Look for a space character followed by any consecutive number of the same (spaces) (the asterisk), followed by '1PAST', followed by any and all characters up through '9BEST', and also the '|' pipe symbol, and also any single-digit ('code') number after that. Replace that entire code-block text segment with the code-line line-entry label from the lookup text file.

And, of course, finally, all tilde characters are translated back into line breaks, for a return to the original formatting in the source 'index' file, that you see on the screen.


Also:

Consciousness, A Material Definition

Spoiler: show
Image
#15218305
(It looks like the spaces in front of the '1PAST...' line didn't get passed through, so you may want to just add in those spaces yourself. If you use a monospace font you can line up all the lines on their right edges, to the character.)
  • 1
  • 3
  • 4
  • 5
  • 6
  • 7

Hmmm, it the Ukraine aid package is all over mains[…]

So the evidence shows that it was almost certainl[…]

Yes, and that conditional statement is not necessa[…]

Russia-Ukraine War 2022

https://www.youtube.com/watch?v=Q0pAf3aBt18 How […]