localhost

“Can't connect to local MySQL server” in docker-compose

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have Laravel application with MySQL and I'm trying to run it in Docker using docker-compose. But when app trying to connect DB, it throws: PDOException in Connector.php line 55: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) My docker-compose.yml: load_balancer: image: tutum/haproxy links: - web ports: - "80:80" cache: image: redis db: image: mysql environment: MYSQL_ROOT_PASSWORD: Q1w2e3r4t5 MYSQL_DATABASE: regappbase web: image: andrewmclagan/nginx-hhvm links: - db - cache

How to enable cors request with angular.js-resource

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an angular.js application and i need to do CORS request. I want to define my rest services "the angular" using angular resources, described here: http://docs.angularjs.org/tutorial/step_11 . But i haven't found a way to get this working. On google i found the following sample code: http://jsfiddle.net/ricardohbin/E3YEt/ , but this seems not to work with angular-resources. this is my app.js 'use strict'; angular.module('corsClientAngularApp', ['helloServices']) .config(function ($routeProvider) { $routeProvider .when('/', { templateUrl

(十二)DVWA全等级SQL Injection(Blind)盲注--SQLMap测试过程解析

前提是你 提交于 2019-12-03 02:30:40
一、测试前分析 前文< DVWA全等级SQL Injection(Blind)盲注-手工测试过程解析 > 通过手工测试的方式详细分析了SQL Injection(Blind)盲注漏洞的利用过程,本文则利用自动化的工具SQLMap对SQL Injection(Blind)进行漏洞检测和数据获取。 手工 VS 自动化 : ①手工测试有助于理解整个注入漏洞的利用过程,可以加深技能印象 ②自动化工具所检测的效率相对较高,而且覆盖的全面性更高,数据获取的广度和深度也可以得到更好的发挥 利用SQLMap自动化工具的检测流程大致如下: 1.判断是否存在注入点、注入类型 2.获取DBMS中所有的数据库名称 3.获取Web应用当前连接的数据库 4.列出数据库中的所有用户 5.获取Web应用当前所操作的用户 6.列出可连接数据库的所有账户-对应的密码哈希 7.列出指定数据库中的所有数据表 8.列出指定数据表中的所有字段(列) 9.导出指定数据表中的列字段进行保存 10.根据导出的数据,验证数据有效性 二、全等级SQL Injection(Blind)-漏洞利用解析 利用SQLMap工具操作,本文暂不作太过详细的去拆分细节点,各个等级的服务端代码在此也不作重复展示。 以下构造SQLMap所需的测试命令时,所需用到的工具还有:浏览器自带的F12查看Request/Response/cookie

CFNetwork SSLHandshake failed (-9807) on iOS simulator with localhost

匿名 (未验证) 提交于 2019-12-03 02:22:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to connect openssl s_server and iOS client using TCP SSL, but get CFNetwork SSLHandshake failed (-9807) . Objective-C code( from here ): - (void)viewDidLoad { [super viewDidLoad]; printf("method started \n"); NSBundle *bundle = [NSBundle bundleForClass:[self class]]; NSData *iosTrustedCertDerData = [NSData dataWithContentsOfFile:[bundle pathForResource:@"servercert" ofType:@"der"]]; OSStatus err = noErr; SecCertificateRef cert; cert = SecCertificateCreateWithData(NULL, (CFDataRef) iosTrustedCertDerData); assert(cert != NULL);

h2 mixed mode connection problem

匿名 (未验证) 提交于 2019-12-03 02:21:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I start h2 database in a servlet context listener: public void contextInitialized(ServletContextEvent sce) { org.h2.Driver.load(); String apprealPath = sce.getServletContext().getRealPath("\\"); String h2Url = "jdbc:h2:file:" + apprealPath + "DB\\cdb;AUTO_SERVER=true"; LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); StatusPrinter.print(lc); logger.debug("h2 url : " + h2Url); try { conn = DriverManager.getConnection(h2Url, "sa", "sa"); } catch (SQLException e) { e.printStackTrace(); } logger.debug("h2 database started in

docker Mule-server curl: (56) Recv failure: Connection reset by peer

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This might just be my rookie knowledge of Docker, but I can't get the networking to work. I'm trying to run a Mule-server via the pr3d4t0r/mule repository. I can run it, hot-swap applications but I can reach it. I can run a local server without Docker, and it works flawlessly. But not when I try it with Docker. When I try to do a simple curl command I get "curl: (56) Recv failure: Connection reset by peer" curl http://localhost:8090/Sven I have tried exposing the ports via -P and separately via -p 8090:8090 but no luck. When the docker is

webpack-dev-server proxy dosen&#039;t work

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to proxy /v1/* to http://myserver.com , and here is my script devServer: { historyApiFallBack: true, // progress: true, hot: true, inline: true, // https: true, port: 8081, contentBase: path.resolve(__dirname, 'public'), proxy: { '/v1/*': { target: 'http://api.in.uprintf.com', secure: false // changeOrigin: true } } }, but it doesn't work, 回答1: Update: thanks to @chimurai, setting changeOrigin: true is important to make it work. Underneath webpack-dev-server passes all the proxy configuration to http-proxy-middleware , from the

Retrofit cannot connect to my local web server on port 3000

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: My app that is using Retrofit (v1.6.1) to connect to REST web services cannot connect to my local web server (running on localhost ), this is the error I am getting. This is inside Nexus4 (v4.3) emulator, I am using Android Studio for development and I have added android.permission.INTERNET & android.permission.ACCESS_NETWORK_STATE permissions in manifest file. The error says its waited for 15s but it does not, it errors out right away. 07 - 13 15 : 57 : 53.947 820 - 840 / it . test . android . app . activity D / Retrofit : --->

java.sql.SQLException: Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: YES)

匿名 (未验证) 提交于 2019-12-03 02:18:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: The following code: Class.forName("com.mysql.jdbc.Driver"); Connection m_connection = DriverManager.getConnection("jdbc:mysql://localhost","root","root"); Throws this exception on getConnection() : java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:919) at com

Kibana on Docker cannot connect to Elasticsearch

匿名 (未验证) 提交于 2019-12-03 02:18:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I tried to create Kibana and Elasticsearch and it seems that Kibana is having trouble identifying Elasticsearch. Here are my steps: 1) Create network docker network create mynetwork --driver=bridge 2) Run Elasticsearch Container docker run -d -p 9200:9200 -p 9300:9300 --name elasticsearch_2_4 --network mynetwork elasticsearch:2.4 3) Run Kibana Container docker run -i --network mynetwork -p 5601:5601 kibana:4.6 I get a JSON output when I connect to Elasticsearch via http://localhost:9200/ through my browser. But when I open http://localhost