## Pentesting : what should one do if nothing is returned from Vulnerability Assessment

A typicall pentesting activity has the following step :

``   1 - information gathering + enumeration    2 - vulnerability assessment (vulnerability scanning)    3 - exploitation    4 - post exploitation (persistence, clearing tracks, etc...)    5 - report writing ``

Step 1 to 4 can be a cycle after getting a foothold.

But what do you do if you don’t get that foothold. That is, on the iteration, Step 2 (Vulnerability scanning) does not return any vulnerable service nor configuration. If social engineering is not part of the deal, does it mean it’s pretty much game over ?

## Using/ Extracting data from Interpolating Functions returned from NDEigensystem

I am relatively new to Mathematica and have been trying to use the NDEigensystem command to work with some quantum systems. I am able to get the accurate energy eigenvalues but am having problems with eigenfunctions; more specifically, I am having trouble actually calling values using the interpolating functions.

``m2 = 0.5; \[HBar] = 1; w = 0.5; \[ScriptCapitalO]2 = -\[HBar]^2/(2 m2) Laplacian[u[x, y], {x, y}] +    1/2 m2 w^2 (x^2 + y^2) u[x, y]; ``
``{vals, funs} =    NDEigensystem[{\[ScriptCapitalO]2,      DirichletCondition[u[x, y] == 0, True]},     u[x, y], {x, -10, 10}, {y, -10, 10}, 28,    Method -> {"PDEDiscretization" -> {"FiniteElement", {"MeshOptions" \ -> {"MaxCellMeasure" -> 0.5}}}}]; ``

As we can see above, I am using a simple 2d harmonic oscillator as my Hamiltonian, and then using the NDEigensystem command I am generating eigenvalues and eigenfunctions. I am able to get the right eigenvalues for my system as we can see below

However; the eigenfunctions aren’t usable, I am trying to extract the data from the interpolating functions to no avail. From what I understand the syntax is:

``\[Psi] = funs[[1]] \[Psi][2,3] ``

The above code should print the values of the first eigenfunction as {2,3} but it doesn’t seem to be working. I’m hoping to eventually integrate these functions to calculate expectation values, I would be very grateful for any help or advice.

## E: Sub-process /usr/bin/dpkg returned an error code (1) while installing postgresql

I am new to Ubuntu and was totally no idea how to solve this problem. The following is the error getting from my screen. Please help me out with this. Thank you so much. I was installing PostgreSQL then I encountered this issue. now I can not use apt-get upgrade and remove it is showing this error.

``sudo apt autoremove ``

ERRORS

``    ipt subprocess returned error exit status 2 No apport report written because MaxReports is reached already                                                               dpkg: dependency problems prevent configuration of libnss-systemd:amd64:  libnss-systemd:amd64 depends on systemd (= 237-3ubuntu10.29); however:   Package systemd is not configured yet.  dpkg: error processing package libnss-systemd:amd64 (--configure):  dependency problems - leaving unconfigured No apport report written because MaxReports is reached already                                                               dpkg: dependency problems prevent configuration of libpam-systemd:amd64:  libpam-systemd:amd64 depends on systemd (= 237-3ubuntu10.29); however:   Package systemd is not configured yet.  No apport report written because MaxReports is reached already                                                               dpkg: error processing package libpam-systemd:amd64 (--configure):  dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of postgresql-11:  postgresql-11 depends on postgresql-common (>= 194~); however:   Package postgresql-common is not configured yet.  postgresql-11 depends on tzdata; however:   Package tzdata is not configured yet.  dpkg: error processing package postgresql-11 (--configure):  dependency problems - leaving unconfigured No apport report written because MaxReports is reached already                                                               dpkg: dependency problems prevent configuration of postgresql-contrib:  postgresql-contrib depends on postgresql-contrib-11; however:   Package postgresql-contrib-11 is not installed.   Package postgresql-11 which provides postgresql-contrib-11 is not configured yet.  dpkg: error processing package postgresql-contrib (--configure):  dependency problems - leaving unconfigured No apport report written because MaxReports is reached already                                                               dpkg: dependency problems prevent configuration of postgresql:  postgresql depends on postgresql-11; however:   Package postgresql-11 is not configured yet.  dpkg: error processing package postgresql (--configure):  dependency problems - leaving unconfigured No apport report written because MaxReports is reached already                                                               dpkg: dependency problems prevent configuration of pgagent:  pgagent depends on postgresql-9.3 | postgresql-9.4 | postgresql-9.5 | postgresql-9.6 | postgresql-10 | postgresql-11; however:   Package postgresql-9.3 is not installed.   Package postgresql-9.4 is not installed.   Package postgresql-9.5 is not installed.   Package postgresql-9.6 is not installed.   Package postgresql-10 is not installed.   Package postgresql-11 is not configured yet.  dpkg: error processing package pgagent (--configure):  dependency problems - leaving unconfigured No apport report written because MaxReports is reached already                                                               Errors were encountered while processing:  sysstat  tzdata  udev  systemd  postgresql-common  libnss-systemd:amd64  libpam-systemd:amd64  postgresql-11  postgresql-contrib  postgresql  pgagent E: Sub-process /usr/bin/dpkg returned an error code (1) ``

## E: Sub-process /usr/bin/dpkg returned an error code (1) with maybe broken language-pack-en

I tried to upgrade apt on ubuntu 18.04 and got this Error:

``\$   sudo apt-get upgrade   Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following packages have been kept back:   libreoffice-avmedia-backend-gstreamer libreoffice-base-core libreoffice-calc   libreoffice-core libreoffice-draw libreoffice-gnome libreoffice-gtk3   libreoffice-impress libreoffice-math libreoffice-ogltrans libreoffice-writer   linux-generic-hwe-18.04 linux-headers-generic-hwe-18.04   linux-image-generic-hwe-18.04 openjdk-11-jdk openjdk-11-jdk-headless   openjdk-11-jre openjdk-11-jre-headless python3-uno 0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded. 4 not fully installed or removed. Need to get 0 B/250 kB of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y dpkg: error processing package language-pack-en (--configure):  package is in a very bad inconsistent state; you should  reinstall it before attempting configuration dpkg: dependency problems prevent configuration of language-pack-en-base:  language-pack-en-base depends on language-pack-en (>= 1:18.04+20180712); however:   Package language-pack-en is not configured yet.  dpkg: error processing package language-pack-en-base (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                           dpkg: dependency problems prevent configuration of language-pack-gnome-en:  language-pack-gnome-en depends on language-pack-en; however:   Package language-pack-en is not configured yet.  dpkg: error processing package language-pack-gnome-en (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                           dpkg: dependency problems prevent configuration of language-pack-gnome-en-base:  language-pack-gnome-en-base depends on language-pack-gnome-en (>= 1:18.04+20180712); however:   Package language-pack-gnome-en is not configured yet.  dpkg: error processing package language-pack-gnome-en-base (--configure):  dependency problems - leaving unconfigured No apport report written because MaxReports is reached already                                                               Errors were encountered while processing:  language-pack-en  language-pack-en-base  language-pack-gnome-en  language-pack-gnome-en-base libdvd-pkg: Checking orig.tar integrity... /usr/src/libdvd-pkg/libdvdcss_1.4.2.orig.tar.bz2: OK libdvd-pkg: `apt-get check` failed, you may have broken packages. Aborting... E: Sub-process /usr/bin/dpkg returned an error code (1) ``

I have also tested all of this page’s methods but the problem still exists…
These are the outputs of those methods :
1- using sudo dpkg –configure -a

``\$   sudo dpkg --configure -a dpkg: dependency problems prevent configuration of language-pack-en-base:  language-pack-en-base depends on language-pack-en (>= 1:18.04+20180712); however:   Package language-pack-en is not configured yet.  dpkg: error processing package language-pack-en-base (--configure):  dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of language-pack-gnome-en:  language-pack-gnome-en depends on language-pack-en; however:   Package language-pack-en is not configured yet.  dpkg: error processing package language-pack-gnome-en (--configure):  dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of language-pack-gnome-en-base:  language-pack-gnome-en-base depends on language-pack-gnome-en (>= 1:18.04+20180712); however:   Package language-pack-gnome-en is not configured yet.  dpkg: error processing package language-pack-gnome-en-base (--configure):  dependency problems - leaving unconfigured Errors were encountered while processing:  language-pack-en-base  language-pack-gnome-en  language-pack-gnome-en-base ``

2- using sudo apt-get install –f

``\$   sudo apt-get install –f Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package –f ``

3- using sudo apt-get remove ––purge language-pack-en

``\$   sudo apt-get remove ––purge language-pack-en Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package ––purge ``

4- using sudo apt-get autoremove

``\$   sudo apt-get autoremove Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded. 4 not fully installed or removed. Need to get 0 B/250 kB of archives. After this operation, 0 B of additional disk space will be used. dpkg: error processing package language-pack-en (--configure):  package is in a very bad inconsistent state; you should  reinstall it before attempting configuration dpkg: dependency problems prevent configuration of language-pack-en-base:  language-pack-en-base depends on language-pack-en (>= 1:18.04+20180712); however:   Package language-pack-en is not configured yet.  dpkg: error processing package language-pack-en-base (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                           dpkg: dependency problems prevent configuration of language-pack-gnome-en:  language-pack-gnome-en depends on language-pack-en; however:   Package language-pack-en is not configured yet.  dpkg: error processing package language-pack-gnome-en (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                           dpkg: dependency problems prevent configuration of language-pack-gnome-en-base:  language-pack-gnome-en-base depends on language-pack-gnome-en (>= 1:18.04+20180712); however:   Package language-pack-gnome-en is not configured yet.  dpkg: error processing package language-pack-gnome-en-base (--configure):  dependency problems - leaving unconfigured No apport report written because MaxReports is reached already                                                               Errors were encountered while processing:  language-pack-en  language-pack-en-base  language-pack-gnome-en  language-pack-gnome-en-base libdvd-pkg: Checking orig.tar integrity... /usr/src/libdvd-pkg/libdvdcss_1.4.2.orig.tar.bz2: OK libdvd-pkg: `apt-get check` failed, you may have broken packages. Aborting... E: Sub-process /usr/bin/dpkg returned an error code (1) ``

Any ideas ?

## dpkg returned an error code (1) while tryint to install python3

I realize that I have created a major blunder somehow but I am unable to install python3 in ubuntu and getting “Sub-process /usr/bin/dpkg returned an error code (1)”. Output of sudo apt-get install pyhton3-all is

``Errors were encountered while processing: python3-dbus python3-chardet python3-debian update-notifier-common dh-python python3-commandnotfound ufw gconf2 aisleriot python3-apport apport apport-gtk python3-aptdaemon python3-aptdaemon.gtk3widgets apturl python3-checkbox-support plainbox-provider-resource-generic plainbox-provider-checkbox python3-requests python3-plainbox checkbox-converged checkbox-gui python3-cairo python3-gi-cairo gedit gnome-orca aptdaemon gnome-software hplip-data ibus-table language-selector-gnome nautilus-share onboard python3-blinker python3-bs4 python3-cryptography python3-cupshelpers python3-cycler python3-dateutil python3-decorator python3-feedparser python3-html5lib python3-httplib2 python3-matplotlib python3-oauthlib python3-pandas python3-pexpect python3-pil:amd64 python3-pip python3-pyqt5 python3-reportlab Processing was halted because there were too many errors. E: Sub-process /usr/bin/dpkg returned an error code (1) ``

Output of Sudo dpkg –configure -a is `Errors were encountered while processing: plainbox-provider-checkbox nautilus-share gconf2 aisleriot update-notifier-common system-config-printer-common system-config-printer-udev system-config-printer-gnome apport-gtk plainbox-provider-resource-generic python3-gi-cairo unity-lens-photos unity-scope-openclipart checkbox-converged update-notifier aptdaemon ubuntu-desktop apport python3-cupshelpers checkbox-gui gnome-software ubuntu-software `

## 405 returned for specific php file, downloads when browsing [on hold]

I’ve inherited a Nginx driven site, the problem is that when browsing to a specific php file it initiates a download, but the index.php on the site gets executed.

The php file handles a return POST request from a payment gateway and is throwing a 405 when it’s called.

Happy to post my conf, but it’s 830 lines long and I dont know which lines are relevant.

## The remote server returned an error: (401) Unauthorized (SharePoint Online & C# Application) [on hold]

I am trying to insert items in SharePoint online list from c# console application using CSOM method, but every time it gives me only one error:

“The remote server returned an error: (401) Unauthorized.” Exception thrown: ‘System.Net.WebException’ in Microsoft.SharePoint.Client.dll

My question would be how can I authenticate to SharePoint online list from my C# console application?

I have checked my credentials, everything is correct still I am getting this unauthorized error.

Here is my code in c#:

Please do reply if anyone has any idea how to resolve this error!

Thanks,
Shaily

## error E: Sub-process /usr/bin/dpkg returned an error code (1) when installing file

when I try to install any file it output me this problem :

``Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 242 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up libglib2.0-0:i386 (2.48.2-0ubuntu4.4) ... dpkg: error processing package libglib2.0-0:i386 (--configure):  triggers ci file contains unknown directive `interest-await' Errors were encountered while processing:  libglib2.0-0:i386 E: Sub-process /usr/bin/dpkg returned an error code (1) ``

## “`sudo apt –fix-broken install“` error: “`Sub-process /usr/bin/dpkg returned an error code (1)“`

I’m using Ubuntu 16.04. I’m trying to use `katoolin` to install Kali tools. When trying to install the tools, I keep getting the following error:

``You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies:  fragroute : Depends: libdumbnet1 (>= 1.8) but it is not going to be installed              Depends: libevent-2.1-6 (>= 2.1.8-stable) but it is not going to be installed  gstreamer1.0-plugins-bad : Depends: gstreamer1.0-plugins-bad-faad (= 1.8.3-1ubuntu0.2)  gstreamer1.0-plugins-ugly : Depends: libgstreamer-plugins-base1.0-0 (>= 1.14.4) but 1.8.3-1ubuntu0.3 is to be installed                              Depends: libgstreamer1.0-0 (>= 1.14.4) but 1.8.3-1~ubuntu0.1 is to be installed                              Depends: libx264-155 but it is not going to be installed  sessioninstaller : Depends: aptdaemon (>= 0.30) but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). ``

As said in the error, I tried running `sudo apt --fix-broken install` but encountered the following error:

``dpkg: error processing archive /var/cache/apt/archives/libgstreamer-plugins-bad1.0-0_1.14.4-1+b1_amd64.deb (--unpack):  trying to overwrite '/usr/lib/x86_64-linux-gnu/libgstbasecamerabinsrc-1.0.so.0', which is also in package libgstreamer-plugins-good1.0-0:amd64 1.8.3-1ubuntu0.4 dpkg: regarding .../libgstreamer-plugins-base1.0-0_1.14.4-2_amd64.deb containing libgstreamer-plugins-base1.0-0:amd64:  libgstreamer-plugins-base1.0-0:amd64 conflicts with libgstreamer-plugins-bad1.0-0 (<< 1.13.1)   libgstreamer-plugins-bad1.0-0:amd64 (version 1.8.3-1ubuntu0.2) is present and installed.  dpkg: error processing archive /var/cache/apt/archives/libgstreamer-plugins-base1.0-0_1.14.4-2_amd64.deb (--unpack):  conflicting packages - not installing libgstreamer-plugins-base1.0-0:amd64 Errors were encountered while processing:  /var/cache/apt/archives/libgstreamer-plugins-bad1.0-0_1.14.4-1+b1_amd64.deb  /var/cache/apt/archives/libgstreamer-plugins-base1.0-0_1.14.4-2_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) ``

Running `sudo dpkg --configure -a` returns the following:

``dpkg: dependency problems prevent configuration of gstreamer1.0-plugins-ugly:amd64:  gstreamer1.0-plugins-ugly:amd64 depends on libgstreamer-plugins-base1.0-0 (>= 1.14.4); however:   Version of libgstreamer-plugins-base1.0-0:amd64 on system is 1.8.3-1ubuntu0.3.  gstreamer1.0-plugins-ugly:amd64 depends on libgstreamer1.0-0 (>= 1.14.4); however:   Version of libgstreamer1.0-0:amd64 on system is 1.8.3-1~ubuntu0.1.  gstreamer1.0-plugins-ugly:amd64 depends on libx264-155; however:   Package libx264-155 is not installed.  dpkg: error processing package gstreamer1.0-plugins-ugly:amd64 (--configure):  dependency problems - leaving unconfigured Processing triggers for libc-bin (2.28-10) ... ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf: No such file or directory Errors were encountered while processing:  gstreamer1.0-plugins-ugly:amd64 ``

I’ve also tried the following:

``sudo apt-get --purge remove libc6-dev-i386 libc6-dev-x32 gcc-5-multilib gcc-multilib  sudo apt autoremove -f  sudo apt-get -f install  sudo apt-get update ``

but `sudo apt --fix-broken install` still doesn’t word

How should I get `sudo apt --fix-broken install` and the rest of `katoolin` to work?