The Perl script

I have a Perl script running on an old Debian 9 server (until I move to a new server) that opens an editable pane in an .shtml file, accepts only Creole markup input from a single user, and writes to two user-editable .shtml files and makes a backup copy of each when saving the edited .shtml file. The .shtml file permissions are 606 or -rw----rw-.

After editing, the non-tech-savvy user has to enter a password to trigger the script, and (in the unlikely event that he’d ever do this) ‘script’ tags come out in plain text.

Before switching servers these used to run under suEXEC (which I did not set up and don’t want to use), but they now need the permissions change to run.

The writable files

The two editable .shtml files are SSI with the virtualHost block set to IncludesNoExec.

There is no .htaccess file in the user’s public_html directory, the only other user only ever makes simple HTML edits and has no other knowledge, I manage the scripts in the cgi-bin above the public_html folder, and all files in the user directory are owner/group username.

My questions, taking into account the above:

1. is there anything I should beware of if the files permissions are 606/-rw----rw-?
2. what else could I do to further secure such an old Debian server for now?

I’ve considered changing the server port from 22 to something much higher, which I’ve done on another server, but for a couple of sites running on this old one I have no access as yet to their DNS or remote login settings, so it isn’t yet an option. Like many people, I’m not really a server admin, but have to maintain things as my co-dev died.

Hello i have this code thats not written out in the write form can someone rearrange it for me quickly Thank you [closed]

.file 1 “” .section .mdebug.abi32 .previous .nan legacy .module fp=32 .module nooddspreg .abicalls .rdata .align 2 LC0: .ascii “Enter number of elements in array00” .align 2LC1: .ascii “%d00” .align 2 LC2: .ascii “Enter %d integers1200” .align 2LC3: .ascii “Minimum element is present at location %d and its value ” .ascii “is %d.1200” .text .align 2 .globl main .set nomips16 .set nomicromips .ent main .type main, @function main: .frame $$fp,448,$$31 # vars= 416, regs= 2/0, args= 16, gp= 8 .mask 0xc0000000,-4 .fmask 0x00000000,0 .set noreorder .cpload $$25 .set nomacro addiu$$sp,$$sp,-448 sw$$31,444($$sp) sw$$fp,440($$sp) move$$fp,$$sp .cprestore 16 movz$$31,$$31,$$0 li $$2,1 # 0x1 sw$$2,32($$fp) lw$$2,%got($$LC0)($$28) nop addiu $$4,$$2,%lo($$LC0) lw$$2,%call16(puts)($$28) nop move$$25,$$2 .reloc 1f,R_MIPS_JALR,puts 1: jalr$$25 nop lw $$28,16($$fp) addiu $$2,$$fp,436 move $$5,$$2 lw $$2,%got($$LC1)($$28) nop addiu$$4,$$2,%lo($$LC1) lw $$2,%call16(__isoc99_scanf)($$28) nop move $$25,$$2 .reloc 1f,R_MIPS_JALR,__isoc99_scanf 1: jalr $$25 nop lw$$28,16($$fp) lw$$2,436($$fp) nop move$$5,$$2 lw$$2,%got($$LC2)($$28) nop addiu $$4,$$2,%lo($$LC2) lw$$2,%call16(printf)($$28) nop move$$25,$$2 .reloc 1f,R_MIPS_JALR,printf 1: jalr$$25 nop lw $$28,16($$fp) sw $$0,28($$fp) b $$L2 nop$$L3: addiu $$3,$$fp,36 lw $$2,28($$fp) nop sll $$2,$$2,2 addu $$2,$$3,$$2 move$$5,$$2 lw$$2,%got($$LC1)($$28) nop addiu $$4,$$2,%lo($$LC1) lw$$2,%call16(__isoc99_scanf)($$28) nop move$$25,$$2 .reloc 1f,R_MIPS_JALR,__isoc99_scanf 1: jalr$$25 nop lw $$28,16($$fp) lw $$2,28($$fp) nop addiu $$2,$$2,1 sw $$2,28($$fp) $$L2: lw$$2,436($$fp) lw$$3,28($$fp) nop slt$$2,$$3,$$2 bne $$2,$$0,$$L3 nop lw$$2,36($$fp) nop sw$$2,24($$fp) li$$2,1 # 0x1 sw $$2,28($$fp) b $$L4 nop$$L6: lw $$2,28($$fp) nop sll $$2,$$2,2 addiu $$3,$$fp,24 addu $$2,$$3,$$2 lw$$3,12($$2) lw$$2,24($$fp) nop slt$$2,$$3,$$2 beq $$2,$$0,$$L5 nop lw$$2,28($$fp) nop sll$$2,$$2,2 addiu$$3,$$fp,24 addu$$2,$$3,$$2 lw $$2,12($$2) nop sw $$2,24($$fp) lw $$2,28($$fp) nop addiu $$2,$$2,1 sw $$2,32($$fp) $$L5: lw$$2,28($$fp) nop addiu$$2,$$2,1 sw$$2,28($$fp)$$L4: lw $$2,436($$fp) lw $$3,28($$fp) nop slt $$2,$$3,$$2 bne$$2,$$0,$$L6 nop lw $$6,24($$fp) lw $$5,32($$fp) lw $$2,%got($$LC3)($$28) nop addiu$$4,$$2,%lo($$LC3) lw $$2,%call16(printf)($$28) nop move $$25,$$2 .reloc 1f,R_MIPS_JALR,printf 1: jalr $$25 nop lw$$28,16($$fp) move$$2,$$0 move$$sp,$$fp lw$$31,444($$sp) lw$$fp,440($$sp) addiu$$sp,$$sp,448 j$$31 nop .set macro .set reorder .end main .size main, .-main .ident “GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609”

boot – USB drive not bootable if multi-sector bootloader is written to it’s first sector

I have been working with bootloaders and tiny kernels for some time. I found that when using real USB drive, if my bootloader overwrites the partition table and other data of the MBR on target drive, it is not bootable.

But if I use a chainloader and write my bootloader to a partition, it boots up alright.
But I read that the drive is bootable if you have 55 and aa at byte 510 and 511, then the drive is bootable. But it is not. I’ve also heard about other requirements for modern hardware to detect bootable drives, but I don’t know any specifics.

I would like to know more about it, and thanks in advance.

A math parser written in Python that uses the conversion from Infix to Postfix

I've written this code over the past few days and it seems to be working. However, I'm not an experienced programmer, so I don't know if my code is efficient enough. Any advice for improvements or new approaches to this challenge would be greatly appreciated.

def lex(task):

def isOperator(c):
return c in "+-*/^"

# Push “(“onto Stack
postfix, stack = (), ("(")
# add “)” to the end of task
# Position in task
pos = 0
# operators with precedence
operator = {"+": 1, "-": 1, "*": 2, "/": 2,"^": 3, "(": 0, ")": 0}
# Using variables to avoid IndexError
lastTok = ""
nextTok = ""

while pos < len(task):

lastTok = task(pos - 1) if pos else ""
nextTok = task(pos + 1) if pos < len(task) - 1 else ""

if current.isnumeric() or isOperator(current) and not lastTok.isnumeric() and nextTok.isnumeric():

for c in task(pos + 1:):
if c.isnumeric() or c == ".":
current += c
pos += 1
else:
break
# Add operands to Postfix expression
postfix.append(current)
# If left paranthesis, push to stack
elif current == "(":
stack.append(current)

elif isOperator(current):
# Pop from stack top each operator with same or higher precedence
while operator(stack(-1))  >= operator(current):
postfix.append(stack.pop())
# Avoid out of index error
if not stack:
break
# Add current to stack
stack.append(current)

elif current == ")":
# Pop from stack to postfix until left paranthesis is stack top
while stack(-1) != "(":
postfix.append(stack.pop())
# Remove the left paranthesis
del stack(-1)

else:
raise ValueError(f"Illegal character at position {pos}")

pos += 1

return postfix

# Position in task
pos = 0

# if the task has one element its over
while len(task) > 1:

if current in "+-*/^":

# Get numbers left from operator; merge together
num1 = float(task(pos - 2))
num2 = float(task(pos - 1))

if current == "+":
task(pos - 2:pos + 1) = (num1 + num2)

elif current == "-":
task(pos - 2:pos + 1) = (num1 - num2)

elif current == "*":
task(pos - 2:pos + 1) = (num1 * num2)

elif current == "/":
task(pos - 2:pos + 1) = (num1 / num2)

elif current == "^":
task(pos - 2:pos + 1) = (num1 ** num2)

# List size changed, position needs to be adjusted
pos -= 1

else:
# If we encounter operands we move on
pos += 1

return evaluate(postfix)

def isOperator(c):
return c in "+-*/^"

# Push “(“onto Stack
postfix, stack = (), ("(")
# add “)” to the end of task
# Position in task
pos = 0
# operators with precedence
operator = {"+": 1, "-": 1, "*": 2, "/": 2,"^": 3, "(": 0, ")": 0}
# Using variables to avoid IndexError
lastTok = ""
nextTok = ""

while pos < len(task):

lastTok = task(pos - 1) if pos else ""
nextTok = task(pos + 1) if pos < len(task) - 1 else ""

if current.isnumeric() or isOperator(current) and not lastTok.isnumeric() and nextTok.isnumeric():

for c in task(pos + 1:):
if c.isnumeric() or c == ".":
current += c
pos += 1
else:
break
# Add operands to Postfix expression
postfix.append(current)
# If left paranthesis, push to stack
elif current == "(":
stack.append(current)

elif isOperator(current):
# Pop from stack top each operator with same or higher precedence
while operator(stack(-1))  >= operator(current):
postfix.append(stack.pop())
# Avoid out of index error
if not stack:
break
# Add current to stack
stack.append(current)

elif current == ")":
# Pop from stack to postfix until left paranthesis is stack top
while stack(-1) != "(":
postfix.append(stack.pop())
# Remove the left paranthesis
del stack(-1)

else:
raise ValueError(f"Illegal character at position {pos}")

pos += 1

return postfix

# Position in task
pos = 0

# if the task has one element its over
while len(task) > 1:

if current in "+-*/^":

# Get numbers left from operator; merge together
num1 = float(task(pos - 2))
num2 = float(task(pos - 1))

if current == "+":
task(pos - 2:pos + 1) = (num1 + num2)

elif current == "-":
task(pos - 2:pos + 1) = (num1 - num2)

elif current == "*":
task(pos - 2:pos + 1) = (num1 * num2)

elif current == "/":
task(pos - 2:pos + 1) = (num1 / num2)

elif current == "^":
task(pos - 2:pos + 1) = (num1 ** num2)

# List size changed, position needs to be adjusted
pos -= 1

else:
# If we encounter operands we move on
pos += 1

return evaluate(postfix)



client – How much Bitcoin core software can be individually written at the end of the miner and how much code can you not touch? Where does Bitcoin draw the line?

I've read Bitcoin content all over the Internet and no one has yet demystified the fact that different versions of the Bitcoin core work simultaneously. I know how soft forks work and how they are backward compatible and how not to break consensus. But no one has found an explanation of how much of the Bitcoin software can be individually written or not.

Please explain about powerful solo miners and pool miners.

What programming language is Regex written in?

When I try to rewrite certain regex functions (e.g. replacing a string) in Python, regex is always faster.

Is regex written in C?

Algebra – Is it possible to extend a polynomial written as a product with a symbolic area?

Thank you for your reply to Mathematica Stack Exchange!

• Please be sure answer the question. Provide details and share your research!

But avoid

• Ask for help, clarify, or respond to other answers.
• Make statements based on opinions; Support them with references or personal experiences.

Use MathJax to format equations. MathJax reference.

For more information, see our tips on writing great answers.

What is the command to see which files are currently being written or read on Linux?

Just like the top command, which specifies which process is running in the system and how it works
Which process runs and takes CPU. I want to know in the running system what the system is currently doing with the file, e.g. B. where it writes to the storage space. I don't want to use the watch command because I'm talking about the entire system, as is currently the case where a file is read or written across the file system. If reading is not available, I'm fine, but writing is definitely important to me.
I am trying to check the state of the system and I want to monitor which files are currently being written to the file system.

Google SHEET script in which the text TOTAL SALE "should be automatically written in the last non-empty cell in a column at night 1

LOVE HELP,
I want a ** Google SHEET script in which the text TOTAL SALE "should be automatically written in the last non-empty cell in a column
(H: H) at a certain time or at night 1
HELP ME OUT> THANKS IN ADVANCE **
SRI

Look at all the numbers, from two digits to 10 digits, which are only written with the numbers 1, 2, 3, 5, 7. Identify those that are perfect squares

Surgical method with a smaller number of digits:

n = 8;
(list = Flatten(Table(Tuples({1, 2, 3, 4, 5, 7}, i), {i, 2, n}), 1);
list2 = Table(FromDigits(list((j))), {j, 1, Length(list)});
result0 = Select(list2, IntegerQ(Sqrt(#)) &);) //  AbsoluteTiming // First

40.3677688


An alternative approach:

result1 = Select(FreeQ(0 | 6 | 8 | 9) @* IntegerDigits)@
(Range(3, Ceiling(N @ Sqrt(FromDigits(ConstantArray(7, n)))))^2); //
AbsoluteTiming // First

 0.03486

result0 == result1

 True


We get the result for 10 digits in a split second:

result10digits = Select(FreeQ(0 | 6 | 8 | 9) @* IntegerDigits)@
(Range(3, Ceiling(N@Sqrt(FromDigits(ConstantArray(7, 10)))))^2); //
AbsoluteTiming // First

0.2668

Length @ result10digits

714