The "https://packagist.org/packages.json" file could not be downloaded - laravel-5

I want to install a package for a Laravel chat app I'm making. When running "composer require foo/bar" I got the following error in the terminal:
In RemoteFilesystem.php line 515:
The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Unable to find the socket transport "proxy_user_name" - did you forget to enable it when you configured PHP?
I'm using a VPN but it's still referring to my proxy credentials which is supposed to not see because of the VPN.
When running "composer diagnose" I get this:
Lolo#lolo:/media/lolo/project_path/project_name$
composer diagnose
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: WARNING
[Composer\Downloader\TransportException] The "http://packagist.org/packages.json" file could not be downloaded: failed to open stream: Unable to find the socket transport "foobar" - did you forget to enable it when you configured PHP?
Checking https connectivity to packagist: WARNING
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Unable to find the socket transport "foobar" - did you forget to enable it when you configured PHP?
Checking HTTP proxy: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Unable to find the socket transport "foobar" - did you forget to enable it when you configured PHP?
Checking HTTP proxy support for request_fulluri: WARNING
Unable to assess the situation, maybe packagist.org is down (The "http://packagist.org/packages.json" file could not be downloaded: failed to open stream: Unable to find the socket transport "foobar" - did you forget to enable it when you configured PHP?)
Checking HTTPS proxy support for request_fulluri: WARNING
Unable to assess the situation, maybe github is down (The "https://api.github.com/repos/Seldaek/jsonlint/zipball/1.0.0" file could not be downloaded: failed to open stream: Unable to find the socket transport "foobar" - did you forget to enable it when you configured PHP?)
Checking github.com rate limit: FAIL
[Composer\Downloader\TransportException] The "https://api.github.com/rate_limit" file could not be downloaded: failed to open stream: Unable to find the socket transport "foobar" - did you forget to enable it when you configured PHP?
Checking disk free space: OK
Composer version: 1.6.3
PHP version: 7.2.7-0ubuntu0.18.04.2
PHP binary path: /usr/bin/php7.2
What could be causing the error?

It is due to a bad proxy configuration. Try correcting your proxy or disable it (temporarily) with
unset http_proxy;
unset https_proxy;
You could use redsocks when needing to go through a proxy.

Related

failed loading cafile stream: `C:\xampp\apache\bin\curl-ca-bundle.crt'

How to solve this error ?
failed loading cafile stream: `C:\xampp\apache\bin\curl-ca-bundle.crt'
You are not providing a valid ca bundle file.
Try downloading this file and save it as C:\xampp\apache\bin\curl-ca-bundle.crt
You can read the explanation on the Certificate Verification section of the curl documentation.
libcurl performs peer SSL certificate verification by default. This is
done by using a CA certificate store that the SSL library can use to
make sure the peer's server certificate is valid.

While installing Cloudera managaer 5

]# cat 2.install-oracle-j2sdk1.7.log
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Error: Cannot find a valid baseurl for repo: base
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 7 - "Failed to connect to 2a01:c0:2:4:0:acff:fe1e:1e52: Network is unreachable"
Did you create cloudera repo files in /etc/yum.repos.d/
Check network settings (If you are under proxy, configure proxy server details)
For more details How to install CDH, check below link
http://bigdata-tips.blogspot.in/2016/03/cdh-552-installation-on-rhelcent-os-71.html

Composer install behind https proxy

On a new Server in my network i try to setup a composer project and having trouble with my internal proxy. The proxy settings are set in /etc/environment for http and https (upper and lowercase). The output i'm getting is as follows:
$ composer.phar diag
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking HTTP proxy: OK
Checking HTTP proxy support for request_fulluri: OK
Checking HTTPS proxy support for request_fulluri: FAIL
Unable to assess the situation, maybe github is down (The "https://api.github.com/repos/Seldaek/jsonlint/zipball/1.0.0" file could not be downloaded: Peer certificate CN=`codeload.github.com' did not match expected CN=`api.github.com'
failed to open stream: Cannot connect to HTTPS server through proxy)
Checking github.com rate limit: OK
Checking disk free space: OK
Checking composer version: OK
The proxy CA certificate is properly installed and working on curl, wget and git. But it looks like composer has problems to evaluate the certificates against each other, because of my own CA. The https proxy is changing the certificates (like a man in the middle and i can't change the proxy [company security]) and this probably kills it.
Before you ask: i already tried setting the HTTP(S)_PROXY_REQUEST_FULLURI export value.
Does someone know this behavior and has a workaround?

tor not working with sqlmap

root#kali:~# sqlmap --tor --tor-type=SOCKS5 -u http://www.target.com/abc.php?cat=50
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program
[*] starting at 14:18:00
[14:18:00] [WARNING] increasing default value for option '--time-sec' to 10 because switch '--tor' was provided
[14:18:00] [INFO] setting Tor SOCKS proxy settings
[14:18:00] [INFO] testing connection to the target URL
[14:18:00] [CRITICAL] unable to connect to the target URL or proxy. sqlmap is going to retry the request
[14:18:00] [WARNING] please make sure that you have Tor installed and running so you could successfully use switch '--tor' (e.g. 'https://help.ubuntu.com/community/Tor')
[14:18:01] [CRITICAL] unable to connect to the target URL or proxy. sqlmap is going to retry the request
[14:18:02] [CRITICAL] unable to connect to the target URL or proxy. sqlmap is going to retry the request
[14:18:03] [CRITICAL] unable to connect to the target URL or proxy
[*] shutting down at 14:18:03
how to fix this ???
You have to install tor apt-get install tor and then run tor in a terminal, after that you can do sqlmap --tor --tor-type socks5 --tor-port=9050 --check-tor -u http://www.target.com/abc.php?cat=50 to execute with tor.
I had a very similar issue the way that I solved it was to use proxychains and edit the proxychains conf file to route requests through tor. It is easy enough to do
I do not have kali open but you can find the file by opening the terminal and typing
locate proxychains.conf

having problems with installing composer

I'm having problems installing composer. The error being displayed is:
Connection Error [ERR_CONNECTION]: Unable to connect to getcomposer.org
Proxy http####://10.50.7.154:3128### [from Internet Settings] failed with errors:
Failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Request to https://getcomposer.org/installer failed with errors:
Failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
That's a proxy problem, right there. Please step away from the building you are in and find a regular coffeeshop with regular broadband WiFi.
Hope this helps.

Resources