Python sending POST requests/ multipart/form-data

I’m just working on API conection at my work. I already made some GET and PUT request, but now i have problem with POST. API documantation is here. And here is my code I test but get 400 bad request: import requests files = {‘files’: (‘fv.pdf’, open(r”C:\python\API\fv.pdf”, ‘rb’))} data = {“order_documents”:[{‘file_name’:”fv.pdf”, ‘type_code’:’CUSTOMER_INVOICE’ }]} header =…

Details

Bash Shell script to check mount points on server is only displaying name and not all arguments

I am using below script to Check mount points on the server : https://github.com/echocat/nagios-plugin-check_mountpoints/blob/master/check_mountpoints.sh But the output is only displaying Filesystem name : OK: all mounts were found (/opt/xyz /opt/xyz MOUNTS/xyz /MOUNTS/xyz/xyz-pdf /MOUNTS/xyz ) Whereas I want complete arguments example : Filesystem , Used , Available , Capacity ….. Can someone please guide .Tried with…

Details

mount -t cifs fails if password is not read from prompt, how to fix?

I can successfully mount a windows network drive/share using this command: mount -t cfis //servername/sharename /mnt -o ‘username=user,sec=ntlmssp’ as running this commands prompts a password to be input and then if correct mounts. According to man mount.cifs I should be able to to this. mount -t cfis //servername/sharename /mnt -o ‘username=user,password=pwd,sec=ntlmssp’ or this PASSWD=’pwd’ mount…

Details

How to achieve SSH AllowAccess different users different subnets

I would like to know how could I do this better: SSH Allow Access for four users (admin, root, user, subadmin) three nets (192.168.1.*, 192.168.2.*, 192.168.3.*) In ssh_configd I had to do something like this: [email protected]* [email protected]* [email protected],168.198.* [email protected]* [email protected]* [email protected],168.198.* etc. Is there a better way? Something like: AllowUsers (user|admin|root|subadmin)@192.168.(1|2|3).* ??? (Due to restricted…

Details